User Tools

Site Tools


ov:craterrest

The following REST interfaces are available on the Crater module:

  1. GET: /rules
    • It shows the OpenFlow rules.
    • body: empty
    • return value: HTTP 200, xml
      <rules>
        <rule>{value: string}</rule>
      </rules>
  2. POST: /network
    • It sets the physical topology of the network and returns the OpenFlow rules computed for basic communication.
    • body: xml
        <network>
          <elements>
            <element vid="{value: int}" type="{value: string [node_type]}" alias="{value: string}" name="{value: uint64}" />
          </elements>
          <links>
            <link n0="{value: string}" i0="{value: string}" n1="{value: string}" i1="{value: string}" weight="{value: int}" />
          </links>
        </network>
    • return value: HTTP 200, xml
      <rules>
        <rule>{value: string}</rule>
      </rules>
  3. POST: /user
    • It adds the user {id} to the virtual network with the home connected to {host} and {port} and returns the configuration to create the user Personal Network (VMs allocation and OpenFlow rules).
    • body: xml
      <user>
        <id>{value: string}</id>
        <home>
         <host>{value: string}</host>
         <port>{value: string}</port>
        </home>
      </user>
    • return value: HTTP 200, xml
      <config>
        <rules>
          <rule>{value: string}</rule>
        </rules>
        <virt>
      	{ libvirt configuration }
        </virt>
      </config>
  4. POST: /user/{user id: string}
    • It adds the service identified by an OpenStack configuration to the user {id} Personal Network and returns its configuration.
    • body: xml
      <services>
        <service>
         { OpenStack configuration }
        </service>
      </services>
    • return value: HTTP 200, xml
      <config>
        <rules>
          <rule>{value: string}</rule>
        </rules>
        <virt>
      	{ libvirt configuration }
        </virt>
      </config>
  5. DELETE: /network/{element name: string}
    • It removes a non-active node from the physical network and returns the new configuration. Currently not implemented.
    • body: empty
    • return value: HTTP 200, xml
      <config>
        <rules>
          <rule>{value: string}</rule>
        </rules>
        <virt>
      	{ libvirt configuration }
        </virt>
      </config>
  6. DELETE: /user/{user id: string}
    • It removes the Personal Network of the user {user id}. Currently not implemented.
    • body: empty
    • return value: HTTP 200, xml
      <config>
        <rules>
          <rule>{value: string}</rule>
        </rules>
        <virt>
      	{ libvirt configuration }
        </virt>
      </config>
  7. DELETE: /user/{user id: string}/{service id: string}
    • It removes the service {service id} from the Personal Network of the user {user id}.
    • body: empty
    • return value: HTTP 200, xml
      <config>
        <rules>
          <rule>{value: string}</rule>
        </rules>
        <virt>
      	{ libvirt configuration }
        </virt>
      </config>
ov/craterrest.txt · Last modified: 2018/04/11 10:29 by 130.251.17.67