← Back to team overview

openstack team mailing list archive

Add Optional (networks) parameter to the Create server OS API

 

Dear All,

I have added a new blueprint (https://blueprints.launchpad.net/nova/+spec/add-options-network-create-os-apis) and I am thinking of adding an optional "networks" parameter to the create server OS API. I am targeting this feature by Diablo-3 milestone.

Sample of XML and JSON Create server Request

Server Create Request: XML 
<?xml version="1.0" encoding="UTF-8"?>

<server xmlns="http://docs.nttpflab.com/servers/api/v1.0";
        name="new-server-test" imageId="1" flavorId="1">
  <metadata>
    <meta key="My Server Name">Apache1</meta>
  </metadata>
  <personality>
    <file path="/etc/banner.txt">
        ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp
    </file>
  </personality>
  <networks>
      <network id="1" fixed_ip="10.0.1.3">
      <network id="2" fixed_ip="10.0.2.12">
  </networks>
</server>

Server Create Request: JSON 
{
    "server" : {
        "name" : "new-server-test",
        "imageId" : 1,
        "flavorId" : 1,
        "metadata" : {
            "My Server Name" : "Apache1" 
        },
        "personality" : [
            {
                "path" : "/etc/banner.txt",
                "contents" : "ICAgICAgDQoiQSBjbG91ZCBkb2VzIG5vdCBrbm93IHdoeSBp" 
            } 
        ]
        "networks" : [
             { "id": "1", "fixed_ip": "10.0.1.3"},
             { "id": "2", "fixed_ip": "10.0.2.12"},
        ]
    }
}

I would like to seek Nova PTL and community opinion to decide whether this needs to be added as a new OS extension or just make changes in the existing v1.0 and v1.1 OS API.
 
Thanks and Best Regards,
Tushar Patil.