Resource Management and Accounting Notebook - page 11 of 150

EditDeleteAnnotateNotarize
First PagePrevious PageNext PageLast PageTable of ContentsSearch

Date and Author(s)

Sample XML Structure for Allocation Manager


  
  
Sample XML Structure for Allocation Manager
</head>  
<body>
This document is a sample request/response XML syntax and a list  
of services (Class/Method Pairs) <br>for the allocation manager.  
<p><b>Generic Request:</b>  
<p><request type="<i>ServiceType</i>" id="<i>TransacionId</i>">  

<br>       <command  
<i>CommandAttributes</i>><i>CommandBody</i></command>  
<br>        [<arg  
name="<i>ArgKey</i>"><i>ArgValue</i></arg>...]  
<br>         
[<data><i>RequestData</i></data>] <br></request>  

<p><b>Generic Response:</b>  
<p><response id="<i>TransacionId</i>">  
<br>         
<code><i>ReturnCode</i></code>  
<br>         
[<message><i>ReturnMessage</i></message>]  

<br>         
[<data><i>ResponseData</i></data>] <br></response>  
<p><b>Request Examples:</b>  
<p><request type="AllocationManager" id="12345678">  
<br>        <command class="user"  
method="query"/> <br>        <arg  
name="select">defaultaccount</arg>  

<br>        <arg  
name="username">scottmo</arg> <br></request>  
<p>        or maybe (but less likely)  
<p><request type="AllocationManager" id="12345678">  
<br>        <command  
service="GetDefaultAccount"></command>  
<br>        <arg  
name="username">scottmo</arg> <br></request>  

<p><b>Response Examples:</b>  
<p><response id="12345678"> <br>         
<code>0</code> <br>         
<message>The default account for scottmo is mscfops</message>  
<br>        <data>mscfops</data>  

<br><response>  
<p>        or maybe if returning complex  
replies with metadata  
<p><response id="12345678"> <br>         
<code>0</code> <br>         
<message>The default account for scottmo is mscfops</message>  

<br>        <data>  
<br>                 
<row>  
<br>                     
<col type="string" length="20" name="account">mscfops</col>  
<br>                 
</row> <br>        </data>  

<br> <response>  
<p>        or for an error condition  
<p><response id="12345678"> <br>         
<code>500</code> <br>         
<message>scottmo is not a valid user</message> <br><response>  

<p><b>Component: Allocation Manager</b> <br>   
<table width="100%" border=1> 
  <tbody> 
  <tr> 
    <td><b>Class</b></td> 
    <td><b>Method</b></td> 
    <td><b>Description</b></td> 
    <td><b>Used By</b></td> 
    <td><b>RequestArgs</b></td></tr> 
  <tr> 
    <td>Account</td> 
    <td>Create</td> 
    <td>Create a new account</td> 
    <td>Bank Admin</td> 
    <td>AccountName, [Active, AccountType, defaultMachineACL]</td></tr> 
  <tr> 
    <td>Account</td> 
    <td>Delete</td> 
    <td>Remove an account</td> 
    <td>Bank Admin</td> 
    <td>AccountName</td></tr> 
  <tr> 
    <td>Account</td> 
    <td>Modify</td> 
    <td>Change properties of an account</td> 
    <td>Bank Admin</td> 
    <td>AccountName, [Active, AccountType, defaultMachineACL]</td></tr> 
  <tr> 
    <td>Account</td> 
    <td>Query</td> 
    <td>Request account information such as type, active, parent,  
    creationdate</td> 
    <td>Bank Admin <br>Account Admin</td> 
    <td>[AccountName, Active, Select]</td></tr> 
  <tr> 
    <td>Account</td> 
    <td>Balance</td> 
    <td>Request account balance</td> 
    <td>Bank Admin <br>Account Admin</td> 
    <td>AccountName, [Machine]</td></tr> 
  <tr> 
    <td>Account</td> 
    <td>Deposit</td> 
    <td>Make a deposit into an account</td> 
    <td>Bank Admin <br>Peer Allocation Manager</td> 
    <td>AccountName, Amount, [UserName, Allocation,  <br>AllocationType,  
      ActivationDate,ExpirationDate,MachineACL]</td></tr> 
  <tr> 
    <td>Account</td> 
    <td>Withdraw</td> 
    <td>Make a withdrawal from an account</td> 
    <td>Bank Admin <br>Scheduler <br>Peer Allocation Manager</td> 
    <td>[AccountName, UserName, Amount, Wallclock, <br>Processors, JobId,  
      QuoteId, Machine, Nodes, QOS, <br>Memory, Class, Disk, NodeType,  
      Tracebackinfo]</td></tr> 
  <tr> 
    <td>Account</td> 
    <td>Refund</td> 
    <td>Issue a refund to an account</td> 
    <td>Bank Admin</td> 
    <td>[JobId, AccountName, UserName, Amount, Wallclock, <br>Processors,  
      Machine]</td></tr> 
  <tr> 
    <td>Account</td> 
    <td>Transfer</td> 
    <td>Transfer credits between accounts</td> 
    <td>Bank Admin</td> 
    <td>SourceAccount, TargetAccount, Amount, [Machines, <br>SourceUser,  
      TargetUser, Method]</td></tr> 
  <tr> 
    <td>User</td> 
    <td>Create</td> 
    <td>Add a user profile</td> 
    <td>Bank Admin</td> 
    <td>UserName, [RealName, PhoneNumber, Email, <br>Description,  
      DefaultAccount, BankAdmin]</td></tr> 
  <tr> 
    <td>User</td> 
    <td>Delete</td> 
    <td>Remove a user from the bank</td> 
    <td>Bank Admin</td> 
    <td>UserName</td></tr> 
  <tr> 
    <td>User</td> 
    <td>Modify</td> 
    <td>Change properties of a user</td> 
    <td>Bank Admin</td> 
    <td>UserName, [RealName, PhoneNumber, Email, <br>Description,  
      DefaultAccount, BankAdmin]</td></tr> 
  <tr> 
    <td>User</td> 
    <td>Query</td> 
    <td>Request user information such as email, phone, fullname,  
      defaultaccount, admin</td> 
    <td>Bank Admin <br>User</td> 
    <td>[UserName, Select]</td></tr> 
  <tr> 
    <td>User</td> 
    <td>Balance</td> 
    <td>Request User Balance</td> 
    <td>Bank Admin <br>User</td> 
    <td>UserName, [AccountName, Machine]</td></tr> 
  <tr> 
    <td>Subaccount</td> 
    <td>Create</td> 
    <td>Add a user to an account</td> 
    <td>Bank Admin <br>Account Admin</td> 
    <td>UserName, AccountName, [AccountAdmin, Active,   
    <br>DefaultAccount]</td></tr> 
  <tr> 
    <td>Subaccount</td> 
    <td>Delete</td> 
    <td>Remove a user from an account </td> 
    <td>Bank Admin <br>Account Admin</td> 
    <td>UserName, AccountName</td></tr> 
  <tr> 
    <td>Subaccount</td> 
    <td>Modify</td> 
    <td>Change properties of a subaccount</td> 
    <td>Bank Admin <br>Account Admin</td> 
    <td>UserName, AccountName, [AccountAdmin, Active,  

<br>DefaultAccount]</td></tr> 
  <tr> 
    <td>Subaccount</td> 
    <td>Query</td> 
    <td>Request information about members of an account such as type, active,  
      admin, depositmask</td> 
    <td>Bank Admin <br>Account Admin <br>User</td> 
    <td>[UserName, AccountName, Select]</td></tr> 
  <tr> 
    <td>Subaccount</td> 
    <td>Transfer</td> 
    <td>Transfer credits between subaccounts (within an account)</td> 
    <td>Bank Admin <br>Account Admin</td> 
    <td>AccountName, SourceUser, TargetUser, Amount, [Machines, Method]</td></tr> 
  <tr> 
    <td>Allocation</td> 
    <td>Create</td> 
    <td>Add a new allocation -- potentially internally called by  
      Account.Deposit</td> 
    <td>not implemented</td> 
    <td></td></tr> 
  <tr> 
    <td>Allocation</td> 
    <td>Delete</td> 
    <td>Remove an allocation</td> 
    <td>Bank Admin</td> 
    <td>AllocationId</td></tr> 
  <tr> 
    <td>Allocation</td> 
    <td>Modify</td> 
    <td>Change properties of an allocation</td> 
    <td>Bank Admin</td> 
    <td>AllocationId, [ActivationDate, ExpirationDate, AllocationType,  
      MachineACL]</td></tr> 
  <tr> 
    <td>Allocation</td> 
    <td>Query</td> 
    <td>Request allocation information such as active, expirationdate, type,  
      hostACL</td> 
    <td>Bank Admin <br>Account Admin</td> 
    <td>[AccountName, Active, AllocationId, AllocationType, Machines,  
    Select]</td></tr> 
  <tr> 
    <td>Reservation</td> 
    <td>Create</td> 
    <td>Make a new reservation</td> 
    <td>Bank Admin <br>Scheduler</td> 
    <td>[AccountName, UserName, Amount, Wallclock, Processors, JobId, Machine,  
      Nodes, Memory, Disk, Class, QOS, NodeType, QuoteId, TracebackInfo]</td></tr> 
  <tr> 
    <td>Reservation</td> 
    <td>Delete</td> 
    <td>Remove a reservation</td> 
    <td>Bank Admin <br>Scheduler</td> 
    <td>[ResId, JobId]</td></tr> 
  <tr> 
    <td>Reservation</td> 
    <td>Modify</td> 
    <td>Change properties of a reservation</td> 
    <td>not implemented</td> 
    <td></td></tr> 
  <tr> 
    <td>Reservation</td> 
    <td>Query</td> 
    <td>Request reservation information</td> 
    <td>Bank Admin <br>Account Admin <br>Scheduler</td> 
    <td>[ResId, JobId, AccountName, Expired, Machine, Select]</td></tr> 
  <tr> 
    <td>Quotation</td> 
    <td>Create</td> 
    <td>Request a new price quote</td> 
    <td>Bank Admin <br>User <br>Scheduler <br>MetaScheduler</td> 
    <td>[AccountName, UserName, JobId, Processors, Wallclock, Machine, Nodes,  
      Memory, Disk, Class, QOS, NodeType]</td></tr> 
  <tr> 
    <td>Quotation</td> 
    <td>Delete</td> 
    <td>Remove a price quote</td> 
    <td>Bank Admin <br>Scheduler <br>MetaScheduler</td> 
    <td>QuoteId</td></tr> 
  <tr> 
    <td>Quotation</td> 
    <td>Modify</td> 
    <td>Update a price quote</td> 
    <td>not implemented</td> 
    <td></td></tr> 
  <tr> 
    <td>Quotation</td> 
    <td>Query</td> 
    <td>Request information about an existing price quote</td> 
    <td>Bank Admin <br>User <br>Scheduler <br>MetaScheduler</td> 
    <td></td></tr> 
  <tr> 
    <td>Bank</td> 
    <td>Help</td> 
    <td>Request Command Usage</td> 
    <td>Bank Admin <br>Account Admin <br>User</td> 
    <td></td></tr> 
  <tr> 
    <td>Bank</td> 
    <td>Version</td> 
    <td>Request Code Version</td> 
    <td>Bank Admin <br>Account Admin <br>User <br>Scheduler  
    <br>MetaScheduler</td> 
    <td></td></tr> 
  <tr> 
    <td>Bank</td> 
    <td>Ping</td> 
    <td>Determine if the allocation manager is alive</td> 
    <td>Bank Admin <br>Account Admin <br>User <br>Scheduler  
    <br>MetaScheduler</td> 
    <td></td></tr> 
  <tr> 
    <td>Bank</td> 
    <td>Transfer</td> 
    <td>Transfer credits between banks</td> 
    <td>Bank Admin <br>Peer Allocation Manager</td> 
    <td>SourceAccount, TargetAccount, TargetBank, Amount, [SourceUser,  
      TargetUser, Method, MachineACL]</td></tr> 
  <tr> 
    <td>JournalEntry</td> 
    <td>Create</td> 
    <td>Log Transaction</td> 
    <td>internal</td> 
    <td></td></tr> 
  <tr> 
    <td>JournalEntry</td> 
    <td>Query</td> 
    <td>Request Transaction Information</td> 
    <td>Bank Admin <br>Account Admin <br>User</td> 
    <td>[TransactionType, AccountName, UserName, JobId, StartDate, EndDate,  
      Machine, Select]</td></tr></tbody></table><br>  </p>

</p>
</body>
</html>
</body>  
</html>  


</pre>
</p>
</body>
</html>