Use just ids in all request templates for flavors/images

While the API allows for strings which happen to end in an ID for
flavorRef/imageRef, the common path is really just the ID itself, and
we should have the samples do this. The use of full urls in our
samples makes it seem like this is more meaningful than it really is,
and that you could pass a url to a remote system, for instance, which
won't work at all.

Change-Id: I669619b627f954232712d54498b3744353d25451
This commit is contained in:
Sean Dague 2015-12-14 10:04:46 -05:00
parent 19f4c3a8b3
commit f9f3946e0d
37 changed files with 70 additions and 70 deletions

View File

@ -1,6 +1,6 @@
{
"rebuild" : {
"imageRef" : "http://openstack.example.com/v2/32278/images/70a599e0-31e7-49b7-b260-868f441e862b",
"imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b",
"name" : "foobar",
"adminPass" : "seekr3t",
"accessIPv4" : "1.2.3.4",
@ -15,4 +15,4 @@
}
]
}
}
}

View File

@ -1,8 +1,8 @@
{
"server" : {
"name" : "new-server-test",
"imageRef" : "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "http://openstack.example.com/flavors/1",
"imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
}

View File

@ -2,7 +2,7 @@
"rebuild" : {
"accessIPv4": "4.3.2.1",
"accessIPv6": "80fe::",
"imageRef" : "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
"imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b",
"name" : "new-server-test",
"metadata" : {
"meta_var" : "meta_val"

View File

@ -3,10 +3,10 @@
"accessIPv4": "1.2.3.4",
"accessIPv6": "fe80::",
"name" : "new-server-test",
"imageRef" : "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "http://openstack.example.com/openstack/flavors/1",
"imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
}
}
}
}

View File

@ -1,8 +1,8 @@
{
"server" : {
"name" : "new-server-test",
"imageRef" : "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "http://openstack.example.com/openstack/flavors/1",
"imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
},
@ -14,4 +14,4 @@
}
]
}
}
}

View File

@ -3,8 +3,8 @@
"accessIPv4": "1.2.3.4",
"accessIPv6": "80fe::",
"name" : "new-server-test",
"imageRef" : "http://glance.openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "http://openstack.example.com/openstack/flavors/1",
"imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
}

View File

@ -1,6 +1,6 @@
{
"rebuild": {
"imageRef" : "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b",
"OS-DCF:diskConfig": "AUTO"
}
}
}

View File

@ -1,10 +1,10 @@
{
"server" : {
"name" : "new-server-test",
"imageRef" : "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "http://openstack.example.com/openstack/flavors/1",
"imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
}
}
}
}

View File

@ -1,8 +1,8 @@
{
"server": {
"name": "new-server-test",
"imageRef": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef": "http://openstack.example.com/openstack/flavors/1",
"imageRef": "70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef": "1",
"metadata": {
"My Server Name": "Apache1"
},

View File

@ -1,8 +1,8 @@
{
"server": {
"name": "new-server-test",
"imageRef": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef": "http://openstack.example.com/openstack/flavors/1",
"imageRef": "70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef": "1",
"metadata": {
"My Server Name": "Apache1"
},

View File

@ -2,7 +2,7 @@
"rebuild": {
"accessIPv4" : "1.2.3.4",
"accessIPv6" : "80fe::",
"imageRef": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
"imageRef": "70a599e0-31e7-49b7-b260-868f441e862b",
"name": "new-server-test",
"metadata": {
"meta_var": "meta_val"

View File

@ -1,8 +1,8 @@
{
"server": {
"name": "new-server-test",
"imageRef": "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef": "http://openstack.example.com/openstack/flavors/1",
"imageRef": "70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef": "1",
"metadata": {
"My Server Name": "Apache1"
},
@ -13,4 +13,4 @@
}
]
}
}
}

View File

@ -1,6 +1,6 @@
{
"rebuild": {
"imageRef": "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
"imageRef": "70a599e0-31e7-49b7-b260-868f441e862b",
"name": "foobar",
"adminPass": "seekr3t",
"metadata": {

View File

@ -1,8 +1,8 @@
{
"server" : {
"name" : "new-server-test",
"imageRef" : "http://glance.openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "http://openstack.example.com/openstack/flavors/1"
"imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "1"
},
"OS-SCH-HNT:scheduler_hints": {
"same_host": "48e6a9f6-30af-47e0-bc04-acaed113bb4e"

View File

@ -3,11 +3,11 @@
"accessIPv4": "1.2.3.4",
"accessIPv6": "80fe::",
"name" : "new-server-test",
"imageRef" : "http://glance.openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "http://openstack.example.com/openstack/flavors/1",
"imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
},
"security_groups": [{"name": "test"}]
}
}
}

View File

@ -1,8 +1,8 @@
{
"server" : {
"name" : "new-server-test",
"imageRef" : "http://openstack.example.com/openstack/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "http://openstack.example.com/openstack/flavors/1",
"imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
},

View File

@ -1,6 +1,6 @@
{
"rebuild" : {
"imageRef" : "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
"imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b",
"name" : "foobar",
"adminPass" : "seekr3t",
"metadata" : {
@ -14,4 +14,4 @@
],
"preserve_ephemeral": true
}
}
}

View File

@ -2,11 +2,11 @@
"rebuild" : {
"accessIPv4" : "1.2.3.4",
"accessIPv6" : "80fe::",
"imageRef" : "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
"imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b",
"name" : "foobar",
"adminPass" : "seekr3t",
"metadata" : {
"meta_var" : "meta_val"
}
}
}
}

View File

@ -3,8 +3,8 @@
"accessIPv4": "1.2.3.4",
"accessIPv6": "80fe::",
"name" : "new-server-test",
"imageRef" : "http://glance.openstack.example.com/images/70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "http://openstack.example.com/flavors/1",
"imageRef" : "70a599e0-31e7-49b7-b260-868f441e862b",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
}

View File

@ -1,6 +1,6 @@
{
"rebuild" : {
"imageRef" : "%(versioned_compute_endpoint)s/images/%(uuid)s",
"imageRef" : "%(uuid)s",
"name" : "%(name)s",
"adminPass" : "%(pass)s",
"accessIPv4" : "%(access_ip_v4)s",

View File

@ -1,8 +1,8 @@
{
"server" : {
"name" : "new-server-test",
"imageRef" : "%(glance_host)s/images/%(image_id)s",
"flavorRef" : "%(host)s/flavors/1",
"imageRef" : "%(image_id)s",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
}

View File

@ -2,7 +2,7 @@
"rebuild" : {
"accessIPv4": "%(access_ip_v4)s",
"accessIPv6": "%(access_ip_v6)s",
"imageRef" : "%(glance_host)s/images/%(image_id)s",
"imageRef" : "%(image_id)s",
"name" : "new-server-test",
"metadata" : {
"meta_var" : "meta_val"

View File

@ -3,8 +3,8 @@
"accessIPv4": "%(access_ip_v4)s",
"accessIPv6": "%(access_ip_v6)s",
"name" : "new-server-test",
"imageRef" : "%(compute_endpoint)s/images/%(image_id)s",
"flavorRef" : "%(compute_endpoint)s/flavors/1",
"imageRef" : "%(image_id)s",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
}

View File

@ -1,8 +1,8 @@
{
"server" : {
"name" : "new-server-test",
"imageRef" : "%(compute_endpoint)s/images/%(image_id)s",
"flavorRef" : "%(compute_endpoint)s/flavors/1",
"imageRef" : "%(image_id)s",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
},

View File

@ -3,8 +3,8 @@
"accessIPv4": "%(access_ip_v4)s",
"accessIPv6": "%(access_ip_v6)s",
"name" : "new-server-test",
"imageRef" : "%(glance_host)s/openstack/images/%(image_id)s",
"flavorRef" : "%(compute_endpoint)s/flavors/1",
"imageRef" : "%(image_id)s",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
}

View File

@ -1,6 +1,6 @@
{
"rebuild": {
"imageRef" : "%(compute_endpoint)s/images/%(image_id)s",
"imageRef" : "%(image_id)s",
"OS-DCF:diskConfig": "AUTO"
}
}

View File

@ -2,8 +2,8 @@
"server" : {
"OS-DCF:diskConfig": "AUTO",
"name" : "new-server-test",
"imageRef" : "%(compute_endpoint)s/images/%(image_id)s",
"flavorRef" : "%(compute_endpoint)s/flavors/1",
"imageRef" : "%(image_id)s",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
}

View File

@ -1,8 +1,8 @@
{
"server": {
"name": "new-server-test",
"imageRef": "%(compute_endpoint)s/images/%(image_id)s",
"flavorRef": "%(compute_endpoint)s/flavors/1",
"imageRef": "%(image_id)s",
"flavorRef": "1",
"metadata": {
"My Server Name": "Apache1"
},

View File

@ -1,8 +1,8 @@
{
"server": {
"name": "new-server-test",
"imageRef": "%(compute_endpoint)s/images/%(image_id)s",
"flavorRef": "%(compute_endpoint)s/flavors/1",
"imageRef": "%(image_id)s",
"flavorRef": "1",
"metadata": {
"My Server Name": "Apache1"
},

View File

@ -2,7 +2,7 @@
"rebuild": {
"accessIPv4" : "%(access_ip_v4)s",
"accessIPv6" : "%(access_ip_v6)s",
"imageRef": "%(glance_host)s/images/%(image_id)s",
"imageRef": "%(image_id)s",
"name": "new-server-test",
"metadata": {
"meta_var": "meta_val"

View File

@ -1,8 +1,8 @@
{
"server": {
"name": "new-server-test",
"imageRef": "%(compute_endpoint)s/images/%(image_id)s",
"flavorRef": "%(compute_endpoint)s/flavors/1",
"imageRef": "%(image_id)s",
"flavorRef": "1",
"metadata": {
"My Server Name": "Apache1"
},

View File

@ -1,6 +1,6 @@
{
"rebuild": {
"imageRef": "%(glance_host)s/images/%(uuid)s",
"imageRef": "%(uuid)s",
"name": "%(name)s",
"adminPass": "%(pass)s",
"metadata": {

View File

@ -1,8 +1,8 @@
{
"server" : {
"name" : "new-server-test",
"imageRef" : "%(glance_host)s/openstack/images/%(image_id)s",
"flavorRef" : "%(compute_endpoint)s/flavors/1"
"imageRef" : "%(image_id)s",
"flavorRef" : "1"
},
"OS-SCH-HNT:scheduler_hints": {
"same_host": "%(uuid)s"

View File

@ -3,8 +3,8 @@
"accessIPv4": "%(access_ip_v4)s",
"accessIPv6": "%(access_ip_v6)s",
"name" : "new-server-test",
"imageRef" : "%(glance_host)s/openstack/images/%(image_id)s",
"flavorRef" : "%(compute_endpoint)s/flavors/1",
"imageRef" : "%(image_id)s",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
},

View File

@ -1,8 +1,8 @@
{
"server" : {
"name" : "new-server-test",
"imageRef" : "%(compute_endpoint)s/images/%(image_id)s",
"flavorRef" : "%(compute_endpoint)s/flavors/1",
"imageRef" : "%(image_id)s",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
},

View File

@ -2,7 +2,7 @@
"rebuild" : {
"accessIPv4" : "%(access_ip_v4)s",
"accessIPv6" : "%(access_ip_v6)s",
"imageRef" : "%(glance_host)s/images/%(uuid)s",
"imageRef" : "%(uuid)s",
"name" : "%(name)s",
"adminPass" : "%(pass)s",
"metadata" : {

View File

@ -3,8 +3,8 @@
"accessIPv4": "%(access_ip_v4)s",
"accessIPv6": "%(access_ip_v6)s",
"name" : "new-server-test",
"imageRef" : "%(glance_host)s/images/%(image_id)s",
"flavorRef" : "%(host)s/flavors/1",
"imageRef" : "%(image_id)s",
"flavorRef" : "1",
"metadata" : {
"My Server Name" : "Apache1"
}