Hyrax: BES Administrative Commands: Difference between revisions

From OPeNDAP Documentation
⧼opendap2-jumptonavigation⧽
Line 78: Line 78:
Element form:
Element form:
  <hai:GetConfig />
  <hai:GetConfig />
<hai:GetConfig module="module-name" />
<!-- <hai:GetConfig module="module-name" /> -->


Retrieves the BES configuration file.  
Retrieves the BES configuration file.  
'''Note''': There's a bit of a problem: I cannot figure out the actual modules, I can only know the names of all of the files in the directories that match a certain pattern. And in order to know to ask for a certain module (or file) name, you will have to know what those names are.
I think a simpler solution, which will be good enough for a prototype, is for me to send back all of the config files in one response. The 'child' configuration files are generally very small, so it won't add much to the response.


===== Request Example =====
===== Request Example =====
Line 94: Line 90:
===== Response Example =====
===== Response Example =====
   
   
  <hai:BesConfig>
  <hai:BesConfig module="''name''">
       ''...BES Configuration Content...''
       ''...BES Configuration Content...''
  </hai:BesConfig>
  </hai:BesConfig>


===== Response Example alternative =====
===== Response Example =====


<pre>
<pre>
Line 104: Line 100:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml version="1.0" encoding="ISO-8859-1"?>
<hai:BesAdminCmd xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
<hai:BesAdminCmd xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
     <hai:Config fileName="/Users/jimg/src/shrew/etc/bes/bes.conf">
     <hai:Config module="bes.conf">
     ...
     ...
     </hai:Config>
     </hai:Config>


     <hai:Config fileName="/Users/jimg/src/shrew/etc/bes/modules/h4.conf">
     <hai:Config module="h4.conf">
     ...
     ...
     </hai:Config>
     </hai:Config>
Line 118: Line 114:
</pre>
</pre>


<!--
===== Request Example =====
===== Request Example =====
  <?xml version="1.0" encoding="UTF-8"?>
  <?xml version="1.0" encoding="UTF-8"?>
Line 131: Line 128:
  </hai:BesConfig>
  </hai:BesConfig>


 
-->
.


=== SetConfig ===
=== SetConfig ===

Revision as of 23:33, 27 May 2011

BES Administration Commands

The general form for all of the HAI commands is as follows: Namespace: http://xml.opendap.org/ns/bes/admin/1.0#

<?xml version="1.0" encoding="UTF-8"?>
 <hai:BesAdminCmd xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
     ...
 </hai:BesAdminCmd>

Start

Example:

<hai:Start />

Starts the master beslistener process. If a beslistner is already running nothing will be done.


Request Example
<?xml version="1.0" encoding="UTF-8"?>
 <hai:BesAdminCmd xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
     <hai:Start />
 </hai:BesAdminCmd>
Response Example
<?xml version="1.0" encoding="UTF-8"?>
 <hai:BesAdminCmd xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
     <hai:OK/>
 </hai:BesAdminCmd>
<?xml version="1.0" encoding="UTF-8"?>
 <hai:ParseError xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
     message text
 </hai:ParseError>
<?xml version="1.0" encoding="UTF-8"?>
 <hai:BESError xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
     message text
 </hai:BESError>


StopNow

Example:

<hai:StopNow/>

Stops all beslistener processes; does not wait for current transmissions to complete


Request Example
<?xml version="1.0" encoding="UTF-8"?>
 <hai:BesAdminCmd xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
     <hai:StopNow/>
 </hai:BesAdminCmd>
Response Example
<?xml version="1.0" encoding="UTF-8"?>
 <hai:BesAdminCmd xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
     <hai:OK/>
 </hai:BesAdminCmd>
<?xml version="1.0" encoding="UTF-8"?>
 <hai:ParseError xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
     message text
 </hai:ParseError>
<?xml version="1.0" encoding="UTF-8"?>
 <hai:BESError xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
     message text
 </hai:BESError>



GetConfig

Element form:

<hai:GetConfig />

Retrieves the BES configuration file.

Request Example
<?xml version="1.0" encoding="UTF-8"?>
 <hai:BesAdminCmd xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
     <hai:GetConfig />
 </hai:BesAdminCmd>
Response Example
<hai:BesConfig module="name">
     ...BES Configuration Content...
</hai:BesConfig>
Response Example

<?xml version="1.0" encoding="ISO-8859-1"?>
<hai:BesAdminCmd xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
    <hai:Config module="bes.conf">
    ...
    </hai:Config>

    <hai:Config module="h4.conf">
    ...
    </hai:Config>

    ...

</hai:BesAdminCmd>


SetConfig

Element form:

<hai:SetConfig>
     ...BES Configuration Content...
</hai:SetConfig>
<hai:SetConfig module="module-name">
     ...Module Name Configuration Content...
</hai:SetConfig>

Retrieves the BES configuration file.


Request Example
<?xml version="1.0" encoding="UTF-8"?>
 <hai:BesAdminCmd xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
     <hai:SetConfig>
     ...BES Configuration Content...
     </hai:SetConfig>
 </hai:BesAdminCmd>
Response Example

Submits a new bes.conf file to the BES.

Request Example
<?xml version="1.0" encoding="UTF-8"?>
 <hai:BesAdminCmd xmlns:hai="http://xml.opendap.org/ns/bes/admin/1.0#">
     <hai:SetConfig module="ncml_module">
     ...NcML Module Configuration Content...
     </hai:SetConfig>
 </hai:BesAdminCmd>
Response Example

Returns a status indicating what happened (Was the configuration accepted, was it valid, did the bes restart, etc)

.