YaST/Web/Development/Registration

From openSUSE

(Difference between revisions)
Revision as of 12:47, 14 October 2009
Jdsn (Talk | contribs)

� Previous diff
Revision as of 12:48, 14 October 2009
Jdsn (Talk | contribs)

Next diff →
Line 62: Line 62:
'''GET''': get registration status '''GET''': get registration status
 +
This will return the machines' guid. This only exists if there once was a successful registration. This will return the machines' guid. This only exists if there once was a successful registration.
 +
'''NOTE: This is just a guess! Only the registration server knows if the machine is registered''' '''NOTE: This is just a guess! Only the registration server knows if the machine is registered'''

Revision as of 12:48, 14 October 2009

Development Documentation for the Registration via WebYaST

Here are two diagrams showing how the registration is supposed to work.


REST API


  • /registration/configuration

GET: get registration server and certificate information

returns:

 <registrationconfig>
   <server>
     <url>https://myregistration.server.com/center/regsvc</url>
   </server>
   <certificate>
     <data>
       <![CDATA[
-----BEGIN CERTIFICATE-----
MIIFIDCCBAigAwIBAgIJAPP6cY6saTFlMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYD
VQQGEwJERTEPMA0    .........     60QTef32lxeuVH9Kve8gGZiMwDqcJfl
J8NLO3kNW3Zys2p4agg22yttmUs=
-----END CERTIFICATE-----
]]>
     </data>
   </certificate>
 </registrationconfig>


PUT: set new registration server and certificate

post data:

 <registrationconfig>
   <server>
     <url>https://somewhere.else.com/center/regsvc</url>
   </server>
   <certificate>
     <data>
       <![CDATA[
-----BEGIN CERTIFICATE-----
MIIFIDCCBAigAwIBAgIJAPP6cY6saTFlMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYD
VQQGEwJERTEPMA0    .........     60QTef32lxeuVH9Kve8gGZiMwDqcJfl
J8NLO3kNW3Zys2p4agg22yttmUs=
-----END CERTIFICATE-----
]]>
     </data>
   </certificate>
 </registrationconfig>


The return is the same as for GET.

  • /registration/registration


GET: get registration status

This will return the machines' guid. This only exists if there once was a successful registration.

NOTE: This is just a guess! Only the registration server knows if the machine is registered

returns:

   <registration>
 <!- if there is a guid -->
      <guid>abcdefg1234567</guid>
 <!- if there is no guid -->
       <guid />
   </registration>


POST: runs registration and returns the result

post data:

   <registration>
     <options>
       <debug>2</debug>
       <forcereg>false</forcereg>    <!- if omitted, the default is false -->
       <nooptional>true</nooptional> <!- if omitted, the default is false -->
       <nohwdata>true</nohwdata>     <!- if omitted, the default is false -->
     </options>
     <arguments>
        <argument>
          <name>key</name>
          <value>val</value>
        </argument>
        ...
     </arguments>
   <registration>


returns:

   <registration>
      <status>finished|missinginfo|error</status>
      <exitcode>1234</exitcode>
      <guid>systemsguid</guid>??
      <missingarguments>
        <argument>
          <name>missingkey</name>
          <type>string|text|number</type>
        </argument>
        ...
      </missingarguments>
      <changedrepos>
        <repo>
           <name>repoName</name>
           <alias>myRepoName</alias>
           <urls>
             <url>http://some.host/repo/xy</url>
             ...
           </urls>
           <priority>80</priority>
           <autorefresh>true</autorefresh>
           <enabled>true</enabled>
           <status>added|deleted</status>
        </repo>
        ...
      </changedrepos>
      <changedservices>
        <service>
          <name>some-serv1</name>
          <url>http://some.host/services/serv1</url>
          <status>added|deleted</status>
        </service>
        ...
      </changedservices>
   </registration>