Merge "No need flavor and network in managing server"

This commit is contained in:
Jenkins 2017-09-07 03:23:04 +00:00 committed by Gerrit Code Review
commit 054a78fe7c

View File

@ -48,10 +48,9 @@ Proposed change
API. This needs to add a new workflow which will skip schduling comparing API. This needs to add a new workflow which will skip schduling comparing
with server create workflow. with server create workflow.
* We will collect the image, network information from the adoptable nodes, and * We will collect the image, network information from the manageable nodes,
will check if the resource existing in glance and neutron. For images, it and will check if the resource existing in glance and neutron.
will be None if we can't find it, but for neutron port, it should be a must For images and neutron ports, it will be None if we can't find them.
when determine wheter the node can be managed.
Alternatives Alternatives
@ -80,25 +79,17 @@ REST API impact
"properties": { "properties": {
'name': {'type': 'string', 'minLength': 1, 'maxLength': 255}, 'name': {'type': 'string', 'minLength': 1, 'maxLength': 255},
'description': {'type': 'string', 'minLength': 1, 'maxLength': 255}, 'description': {'type': 'string', 'minLength': 1, 'maxLength': 255},
'availability_zone': {'type': 'string', 'minLength': 1, 'metadata': {'type': 'object',
'maxLength': 255}, 'patternProperties': {
'^[a-zA-Z0-9-_:. ]{1,255}$': {
'type': 'string', 'maxLength': 255
}
},
'additionalProperties': False
}
'node_uuid': {'type': 'string', 'format': 'uuid'}, 'node_uuid': {'type': 'string', 'format': 'uuid'},
'flavor_uuid': {'type': 'string', 'format': 'uuid'},
'networks': {
'type': 'array', 'minItems': 1,
'items': {
'type': 'object',
'properties': {
'port_type': {'type': 'string', 'minLength': 1,
'maxLength': 255},
'port_id': {'type': 'string', 'format': 'uuid'},
},
'required': ['port_id'],
'additionalProperties': False,
},
},
}, },
'required': ['name', 'node_uuid', 'flavor_uuid', 'networks'], 'required': ['name', 'node_uuid'],
'additionalProperties': False, 'additionalProperties': False,
} }
@ -113,25 +104,22 @@ REST API impact
"name": "test_server", "name": "test_server",
"ports": [ "ports": [
{ {
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d", "address": "a4:dc:be:0e:82:a5",
"vif_port_id": "12345678-1234-1234-1234-123456789012", "uuid": "1ec01153-685a-49b5-a6d3-45a4e7dddf53",
"href": "http://127.0.0.1:6385/v1/nodes/6d85703a-565d-469a-96ce-30b6de53079d/ports", "neutron_port_id": "a9b94592-1d8e-46bb-836b-c7ba935b0136"
"rel": "self"
}, },
{ {
"uuid": "6d85703a-565d-469a-96ce-30b6de53079d", "address": "a4:dc:be:0e:82:a6",
"vif_port_id": "12345678-1234-1234-1234-123456789013", "uuid": "1ec01153-685a-49b5-a6d3-45a4e7dddf54",
"href": "http://127.0.0.1:6385/nodes/6d85703a-565d-469a-96ce-30b6de53079d/ports", "neutron_port_id": "a9b94592-1d8e-46bb-836b-c7ba935b0137"
"rel": "bookmark"
} }
], ],
"portgroups": [],
"power_state": "power on", "power_state": "power on",
"provision_state": "active", "provision_state": "active",
"created_at": "2016-10-17T04:12:44+00:00",
"uuid": "f978ef48-d4af-4dad-beec-e6174309bc71", "uuid": "f978ef48-d4af-4dad-beec-e6174309bc71",
"properties": {},
"instance_info": {},
"resource_class": 'gold', "resource_class": 'gold',
"image_source": "03239419-e588-42b6-a70f-94f23ed0c9e2"
} }
] ]
} }