Add flavor-access to core for V3 API
Adds the flavor-access plugin to the core list for the V3 API. This is part of the process of adding all of the flavor related extensions to core, with the exception of rxtx, as per the discussion here: https://etherpad.openstack.org/p/NovaV3APICore Note that since the alias changes from os-flavor-access to flavor-access the api samples move directory and quite a few of other api samples as well as flavor access is included by default. Partially implements blueprint nova-v3-api DocImpact Change-Id: I9abc7df8f4620d462b0d381a2c0ed180c48f220e
This commit is contained in:
parent
cf08e77139
commit
332741760e
@ -2,11 +2,11 @@
|
||||
"flavor_access": [
|
||||
{
|
||||
"flavor_id": "10",
|
||||
"tenant_id": "fake_tenant"
|
||||
"tenant_id": "openstack"
|
||||
},
|
||||
{
|
||||
"flavor_id": "10",
|
||||
"tenant_id": "openstack"
|
||||
"tenant_id": "fake_tenant"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor_access>
|
||||
<access tenant_id="fake_tenant" flavor_id="10"/>
|
||||
<access tenant_id="openstack" flavor_id="10"/>
|
||||
<access tenant_id="fake_tenant" flavor_id="10"/>
|
||||
</flavor_access>
|
@ -5,6 +5,6 @@
|
||||
"vcpus": 2,
|
||||
"disk": 10,
|
||||
"id": "10",
|
||||
"os-flavor-access:is_public": false
|
||||
"flavor-access:is_public": false
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns="http://docs.openstack.org/compute/api/v1.1"
|
||||
xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3"
|
||||
xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3"
|
||||
name="test_flavor"
|
||||
ram="1024"
|
||||
vcpus="2"
|
||||
disk="10"
|
||||
id="10"
|
||||
os-flavor-access:is_public="False"
|
||||
flavor-access:is_public="False"
|
||||
/>
|
@ -3,6 +3,7 @@
|
||||
"disabled": false,
|
||||
"disk": 10,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": false,
|
||||
"id": "10",
|
||||
"links": [
|
||||
{
|
||||
@ -15,7 +16,6 @@
|
||||
}
|
||||
],
|
||||
"name": "test_flavor",
|
||||
"os-flavor-access:is_public": false,
|
||||
"ram": 1024,
|
||||
"swap": 0,
|
||||
"vcpus": 2
|
@ -0,0 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="test_flavor" ram="1024" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="10" id="10" flavor-access:is_public="False">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/10" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/10" rel="bookmark"/>
|
||||
</flavor>
|
@ -4,6 +4,7 @@
|
||||
"disabled": false,
|
||||
"disk": 1,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "1",
|
||||
"links": [
|
||||
{
|
||||
@ -16,7 +17,6 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.tiny",
|
||||
"os-flavor-access:is_public": true,
|
||||
"ram": 512,
|
||||
"swap": 0,
|
||||
"vcpus": 1
|
||||
@ -25,6 +25,7 @@
|
||||
"disabled": false,
|
||||
"disk": 20,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "2",
|
||||
"links": [
|
||||
{
|
||||
@ -37,7 +38,6 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.small",
|
||||
"os-flavor-access:is_public": true,
|
||||
"ram": 2048,
|
||||
"swap": 0,
|
||||
"vcpus": 1
|
||||
@ -46,6 +46,7 @@
|
||||
"disabled": false,
|
||||
"disk": 40,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "3",
|
||||
"links": [
|
||||
{
|
||||
@ -58,7 +59,6 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.medium",
|
||||
"os-flavor-access:is_public": true,
|
||||
"ram": 4096,
|
||||
"swap": 0,
|
||||
"vcpus": 2
|
||||
@ -67,6 +67,7 @@
|
||||
"disabled": false,
|
||||
"disk": 80,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "4",
|
||||
"links": [
|
||||
{
|
||||
@ -79,7 +80,6 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.large",
|
||||
"os-flavor-access:is_public": true,
|
||||
"ram": 8192,
|
||||
"swap": 0,
|
||||
"vcpus": 4
|
||||
@ -88,6 +88,7 @@
|
||||
"disabled": false,
|
||||
"disk": 160,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "5",
|
||||
"links": [
|
||||
{
|
||||
@ -100,7 +101,6 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.xlarge",
|
||||
"os-flavor-access:is_public": true,
|
||||
"ram": 16384,
|
||||
"swap": 0,
|
||||
"vcpus": 8
|
@ -1,22 +1,22 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavors xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" os-flavor-access:is_public="True">
|
||||
<flavors xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" flavor-access:is_public="True">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" os-flavor-access:is_public="True">
|
||||
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" flavor-access:is_public="True">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/2" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/2" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" os-flavor-access:is_public="True">
|
||||
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" flavor-access:is_public="True">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/3" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/3" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" os-flavor-access:is_public="True">
|
||||
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" flavor-access:is_public="True">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/4" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/4" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" os-flavor-access:is_public="True">
|
||||
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" flavor-access:is_public="True">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/5" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/5" rel="bookmark"/>
|
||||
</flavor>
|
@ -2,11 +2,11 @@
|
||||
"flavor_access": [
|
||||
{
|
||||
"flavor_id": "10",
|
||||
"tenant_id": "fake_tenant"
|
||||
"tenant_id": "openstack"
|
||||
},
|
||||
{
|
||||
"flavor_id": "10",
|
||||
"tenant_id": "openstack"
|
||||
"tenant_id": "fake_tenant"
|
||||
}
|
||||
]
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor_access>
|
||||
<access tenant_id="fake_tenant" flavor_id="10"/>
|
||||
<access tenant_id="openstack" flavor_id="10"/>
|
||||
<access tenant_id="fake_tenant" flavor_id="10"/>
|
||||
</flavor_access>
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"flavor_access": [
|
||||
{
|
||||
"flavor_id": "10",
|
||||
"tenant_id": "openstack"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor_access>
|
||||
<access tenant_id="openstack" flavor_id="10"/>
|
||||
</flavor_access>
|
@ -3,6 +3,7 @@
|
||||
"disabled": false,
|
||||
"disk": 1,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "1",
|
||||
"links": [
|
||||
{
|
||||
@ -15,7 +16,6 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.tiny",
|
||||
"os-flavor-access:is_public": true,
|
||||
"ram": 512,
|
||||
"swap": 0,
|
||||
"vcpus": 1
|
@ -0,0 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" flavor-access:is_public="True">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
|
||||
</flavor>
|
@ -3,6 +3,7 @@
|
||||
"disabled": false,
|
||||
"disk": 10,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "10",
|
||||
"links": [
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="test_flavor" ram="1024" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="10" id="10">
|
||||
<flavor xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="test_flavor" ram="1024" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="10" id="10" flavor-access:is_public="True">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/10" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/10" rel="bookmark"/>
|
||||
</flavor>
|
@ -3,6 +3,7 @@
|
||||
"disabled": false,
|
||||
"disk": 1,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "1",
|
||||
"links": [
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1">
|
||||
<flavor xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" flavor-access:is_public="True">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
|
||||
</flavor>
|
@ -4,6 +4,7 @@
|
||||
"disabled": false,
|
||||
"disk": 1,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "1",
|
||||
"links": [
|
||||
{
|
||||
@ -24,6 +25,7 @@
|
||||
"disabled": false,
|
||||
"disk": 20,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "2",
|
||||
"links": [
|
||||
{
|
||||
@ -44,6 +46,7 @@
|
||||
"disabled": false,
|
||||
"disk": 40,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "3",
|
||||
"links": [
|
||||
{
|
||||
@ -64,6 +67,7 @@
|
||||
"disabled": false,
|
||||
"disk": 80,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "4",
|
||||
"links": [
|
||||
{
|
||||
@ -84,6 +88,7 @@
|
||||
"disabled": false,
|
||||
"disk": 160,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "5",
|
||||
"links": [
|
||||
{
|
||||
|
@ -1,22 +1,22 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavors xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1">
|
||||
<flavors xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" flavor-access:is_public="True">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2">
|
||||
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" flavor-access:is_public="True">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/2" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/2" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3">
|
||||
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" flavor-access:is_public="True">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/3" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/3" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4">
|
||||
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" flavor-access:is_public="True">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/4" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/4" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5">
|
||||
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" flavor-access:is_public="True">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/5" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/5" rel="bookmark"/>
|
||||
</flavor>
|
||||
|
@ -1,5 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="test_flavor" ram="1024" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="10" id="10" os-flavor-access:is_public="False">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/10" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/10" rel="bookmark"/>
|
||||
</flavor>
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"flavor_access": [{
|
||||
"flavor_id": "10",
|
||||
"tenant_id": "openstack"
|
||||
}]
|
||||
}
|
@ -1,4 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor_access>
|
||||
<access tenant_id="openstack" flavor_id="10"/>
|
||||
</flavor_access>
|
@ -1,5 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" os-flavor-access:is_public="True">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
|
||||
</flavor>
|
@ -3,6 +3,7 @@
|
||||
"disabled": false,
|
||||
"disk": 1,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "1",
|
||||
"links": [
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" rxtx_factor="1.0">
|
||||
<flavor xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" flavor-access:is_public="True" rxtx_factor="1.0">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
|
||||
</flavor>
|
@ -4,6 +4,7 @@
|
||||
"disabled": false,
|
||||
"disk": 1,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "1",
|
||||
"links": [
|
||||
{
|
||||
@ -25,6 +26,7 @@
|
||||
"disabled": false,
|
||||
"disk": 20,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "2",
|
||||
"links": [
|
||||
{
|
||||
@ -46,6 +48,7 @@
|
||||
"disabled": false,
|
||||
"disk": 40,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "3",
|
||||
"links": [
|
||||
{
|
||||
@ -67,6 +70,7 @@
|
||||
"disabled": false,
|
||||
"disk": 80,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "4",
|
||||
"links": [
|
||||
{
|
||||
@ -88,6 +92,7 @@
|
||||
"disabled": false,
|
||||
"disk": 160,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "5",
|
||||
"links": [
|
||||
{
|
||||
|
@ -1,22 +1,22 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavors xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" rxtx_factor="1.0">
|
||||
<flavors xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" flavor-access:is_public="True" rxtx_factor="1.0">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" rxtx_factor="1.0">
|
||||
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" flavor-access:is_public="True" rxtx_factor="1.0">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/2" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/2" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" rxtx_factor="1.0">
|
||||
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" flavor-access:is_public="True" rxtx_factor="1.0">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/3" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/3" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" rxtx_factor="1.0">
|
||||
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" flavor-access:is_public="True" rxtx_factor="1.0">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/4" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/4" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" rxtx_factor="1.0">
|
||||
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" flavor-access:is_public="True" rxtx_factor="1.0">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/5" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/5" rel="bookmark"/>
|
||||
</flavor>
|
||||
|
@ -3,6 +3,7 @@
|
||||
"disabled": false,
|
||||
"disk": 10,
|
||||
"ephemeral": 0,
|
||||
"flavor-access:is_public": true,
|
||||
"id": "100",
|
||||
"links": [
|
||||
{
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="flavortest" ram="1024" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="10" id="100" rxtx_factor="2.0">
|
||||
<flavor xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="flavortest" ram="1024" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="10" id="100" flavor-access:is_public="True" rxtx_factor="2.0">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/100" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/100" rel="bookmark"/>
|
||||
</flavor>
|
@ -113,10 +113,10 @@
|
||||
"compute_extension:flavor_access": "",
|
||||
"compute_extension:flavor_access:addTenantAccess": "rule:admin_api",
|
||||
"compute_extension:flavor_access:removeTenantAccess": "rule:admin_api",
|
||||
"compute_extension:v3:os-flavor-access": "",
|
||||
"compute_extension:v3:os-flavor-access:discoverable": "",
|
||||
"compute_extension:v3:os-flavor-access:remove_tenant_access": "rule:admin_api",
|
||||
"compute_extension:v3:os-flavor-access:add_tenant_access": "rule:admin_api",
|
||||
"compute_extension:v3:flavor-access": "",
|
||||
"compute_extension:v3:flavor-access:discoverable": "",
|
||||
"compute_extension:v3:flavor-access:remove_tenant_access": "rule:admin_api",
|
||||
"compute_extension:v3:flavor-access:add_tenant_access": "rule:admin_api",
|
||||
"compute_extension:flavor_disabled": "",
|
||||
"compute_extension:v3:os-flavor-disabled": "",
|
||||
"compute_extension:v3:os-flavor-disabled:discoverable": "",
|
||||
|
@ -64,7 +64,7 @@ CONF.register_opts(api_opts, api_opts_group)
|
||||
API_V3_CORE_EXTENSIONS = set(['consoles', 'extensions', 'flavors', 'ips',
|
||||
'limits', 'servers', 'server-metadata',
|
||||
'keypairs', 'console-output', 'versions',
|
||||
'flavor-manage'])
|
||||
'flavor-manage', 'flavor-access'])
|
||||
|
||||
|
||||
class FaultWrapper(base_wsgi.Middleware):
|
||||
|
@ -26,7 +26,7 @@ from nova.compute import flavors
|
||||
from nova import exception
|
||||
from nova.openstack.common.gettextutils import _
|
||||
|
||||
ALIAS = 'os-flavor-access'
|
||||
ALIAS = 'flavor-access'
|
||||
soft_authorize = extensions.soft_extension_authorizer('compute',
|
||||
'v3:' + ALIAS)
|
||||
authorize = extensions.extension_authorizer('compute', 'v3:%s' % ALIAS)
|
||||
@ -217,7 +217,7 @@ class FlavorAccess(extensions.V3APIExtensionBase):
|
||||
|
||||
name = "FlavorAccess"
|
||||
alias = ALIAS
|
||||
namespace = "http://docs.openstack.org/compute/ext/%s/api/v3" % ALIAS
|
||||
namespace = "http://docs.openstack.org/compute/core/%s/api/v3" % ALIAS
|
||||
version = 1
|
||||
|
||||
def get_resources(self):
|
||||
|
@ -71,7 +71,7 @@ class FlavorManageController(wsgi.Controller):
|
||||
ephemeral_gb = vals.get('ephemeral', 0)
|
||||
swap = vals.get('swap', 0)
|
||||
rxtx_factor = vals.get('rxtx_factor', 1.0)
|
||||
is_public = vals.get('os-flavor-access:is_public', True)
|
||||
is_public = vals.get('flavor-access:is_public', True)
|
||||
|
||||
try:
|
||||
flavor = flavors.create(name, memory, vcpus, root_gb,
|
||||
|
@ -139,8 +139,8 @@ class FlavorAccessTest(test.NoDBTestCase):
|
||||
self.assertEqual(d1['id'], d2['id'])
|
||||
|
||||
def test_list_flavor_access_public(self):
|
||||
# query os-flavor-access on public flavor should return 404
|
||||
req = fakes.HTTPRequestV3.blank('/flavors/fake/os-flavor-access',
|
||||
# query flavor-access on public flavor should return 404
|
||||
req = fakes.HTTPRequestV3.blank('/flavors/fake/flavor-access',
|
||||
use_admin_context=True)
|
||||
self.assertRaises(exc.HTTPNotFound,
|
||||
self.flavor_access_controller.index,
|
||||
@ -154,7 +154,7 @@ class FlavorAccessTest(test.NoDBTestCase):
|
||||
self.assertEqual(result, expected)
|
||||
|
||||
def test_list_with_no_context(self):
|
||||
req = fakes.HTTPRequestV3.blank('/flavors/2/os-flavor-access')
|
||||
req = fakes.HTTPRequestV3.blank('/flavors/2/flavor-access')
|
||||
|
||||
def fake_authorize(context, target=None, action=None):
|
||||
raise exception.PolicyNotAuthorized(action='index')
|
||||
@ -242,23 +242,23 @@ class FlavorAccessTest(test.NoDBTestCase):
|
||||
def test_show(self):
|
||||
resp = FakeResponse()
|
||||
self.flavor_action_controller.show(self.req, resp, '0')
|
||||
self.assertEqual({'id': '0', 'os-flavor-access:is_public': True},
|
||||
self.assertEqual({'id': '0', 'flavor-access:is_public': True},
|
||||
resp.obj['flavor'])
|
||||
self.flavor_action_controller.show(self.req, resp, '2')
|
||||
self.assertEqual({'id': '0', 'os-flavor-access:is_public': False},
|
||||
self.assertEqual({'id': '0', 'flavor-access:is_public': False},
|
||||
resp.obj['flavor'])
|
||||
|
||||
def test_detail(self):
|
||||
resp = FakeResponse()
|
||||
self.flavor_action_controller.detail(self.req, resp)
|
||||
self.assertEqual([{'id': '0', 'os-flavor-access:is_public': True},
|
||||
{'id': '2', 'os-flavor-access:is_public': False}],
|
||||
self.assertEqual([{'id': '0', 'flavor-access:is_public': True},
|
||||
{'id': '2', 'flavor-access:is_public': False}],
|
||||
resp.obj['flavors'])
|
||||
|
||||
def test_create(self):
|
||||
resp = FakeResponse()
|
||||
self.flavor_action_controller.create(self.req, {}, resp)
|
||||
self.assertEqual({'id': '0', 'os-flavor-access:is_public': True},
|
||||
self.assertEqual({'id': '0', 'flavor-access:is_public': True},
|
||||
resp.obj['flavor'])
|
||||
|
||||
def test_add_tenant_access(self):
|
||||
|
@ -91,7 +91,7 @@ class FlavorManageTest(test.NoDBTestCase):
|
||||
self.app = fakes.wsgi_app_v3(init_only=('servers', 'flavors',
|
||||
'flavor-manage',
|
||||
'os-flavor-rxtx',
|
||||
'os-flavor-access'))
|
||||
'flavor-access'))
|
||||
|
||||
self.expected_flavor = {
|
||||
"flavor": {
|
||||
@ -103,7 +103,7 @@ class FlavorManageTest(test.NoDBTestCase):
|
||||
"id": 1234,
|
||||
"swap": 512,
|
||||
"rxtx_factor": 1,
|
||||
"os-flavor-access:is_public": True,
|
||||
"flavor-access:is_public": True,
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,7 +180,7 @@ class FlavorManageTest(test.NoDBTestCase):
|
||||
"id": 1235,
|
||||
"swap": 512,
|
||||
"rxtx_factor": 1,
|
||||
"os-flavor-access:is_public": True,
|
||||
"flavor-access:is_public": True,
|
||||
}
|
||||
}
|
||||
|
||||
@ -240,7 +240,7 @@ class PrivateFlavorManageTest(test.TestCase):
|
||||
"OS-FLV-EXT-DATA:ephemeral": 1,
|
||||
"swap": 512,
|
||||
"rxtx_factor": 1,
|
||||
"os-flavor-access:is_public": False
|
||||
"flavor-access:is_public": False
|
||||
}
|
||||
}
|
||||
expected = {
|
||||
@ -278,7 +278,7 @@ class PrivateFlavorManageTest(test.TestCase):
|
||||
"OS-FLV-EXT-DATA:ephemeral": 1,
|
||||
"swap": 512,
|
||||
"rxtx_factor": 1,
|
||||
"os-flavor-access:is_public": True
|
||||
"flavor-access:is_public": True
|
||||
}
|
||||
}
|
||||
expected = {
|
||||
|
@ -176,10 +176,10 @@ policy_data = """
|
||||
"compute_extension:flavor_access": "",
|
||||
"compute_extension:flavor_access:addTenantAccess": "rule:admin_api",
|
||||
"compute_extension:flavor_access:removeTenantAccess": "rule:admin_api",
|
||||
"compute_extension:v3:os-flavor-access": "",
|
||||
"compute_extension:v3:os-flavor-access:remove_tenant_access":
|
||||
"compute_extension:v3:flavor-access": "",
|
||||
"compute_extension:v3:flavor-access:remove_tenant_access":
|
||||
"rule:admin_api",
|
||||
"compute_extension:v3:os-flavor-access:add_tenant_access":
|
||||
"compute_extension:v3:flavor-access:add_tenant_access":
|
||||
"rule:admin_api",
|
||||
"compute_extension:flavor_disabled": "",
|
||||
"compute_extension:v3:os-flavor-disabled": "",
|
||||
|
@ -5,6 +5,6 @@
|
||||
"vcpus": 2,
|
||||
"disk": 10,
|
||||
"id": "%(flavor_id)s",
|
||||
"os-flavor-access:is_public": false
|
||||
"flavor-access:is_public": false
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns="http://docs.openstack.org/compute/api/v1.1"
|
||||
xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3"
|
||||
xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3"
|
||||
name="%(flavor_name)s"
|
||||
ram="1024"
|
||||
vcpus="2"
|
||||
disk="10"
|
||||
id="%(flavor_id)s"
|
||||
os-flavor-access:is_public="False"
|
||||
flavor-access:is_public="False"
|
||||
/>
|
@ -13,7 +13,7 @@
|
||||
}
|
||||
],
|
||||
"name": "%(flavor_name)s",
|
||||
"os-flavor-access:is_public": false,
|
||||
"flavor-access:is_public": false,
|
||||
"ram": 1024,
|
||||
"vcpus": 2,
|
||||
"disabled": false,
|
@ -0,0 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="%(flavor_name)s" id="%(flavor_id)s" flavor-access:is_public="False" disabled="False" ephemeral="0" swap="0">
|
||||
<atom:link href="%(host)s/v3/flavors/%(flavor_id)s" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/%(flavor_id)s" rel="bookmark"/>
|
||||
</flavor>
|
@ -16,7 +16,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.tiny",
|
||||
"os-flavor-access:is_public": true,
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 512,
|
||||
"swap": 0,
|
||||
"vcpus": 1
|
||||
@ -37,7 +37,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.small",
|
||||
"os-flavor-access:is_public": true,
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 2048,
|
||||
"swap": 0,
|
||||
"vcpus": 1
|
||||
@ -58,7 +58,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.medium",
|
||||
"os-flavor-access:is_public": true,
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 4096,
|
||||
"swap": 0,
|
||||
"vcpus": 2
|
||||
@ -79,7 +79,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.large",
|
||||
"os-flavor-access:is_public": true,
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 8192,
|
||||
"swap": 0,
|
||||
"vcpus": 4
|
||||
@ -100,7 +100,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.xlarge",
|
||||
"os-flavor-access:is_public": true,
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 16384,
|
||||
"swap": 0,
|
||||
"vcpus": 8
|
@ -1,22 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flavors xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" os-flavor-access:is_public="True">
|
||||
<flavors xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" flavor-access:is_public="True">
|
||||
<atom:link href="%(host)s/v3/flavors/1" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/1" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" os-flavor-access:is_public="True">
|
||||
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" flavor-access:is_public="True">
|
||||
<atom:link href="%(host)s/v3/flavors/2" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/2" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" os-flavor-access:is_public="True">
|
||||
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" flavor-access:is_public="True">
|
||||
<atom:link href="%(host)s/v3/flavors/3" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/3" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" os-flavor-access:is_public="True">
|
||||
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" flavor-access:is_public="True">
|
||||
<atom:link href="%(host)s/v3/flavors/4" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/4" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" os-flavor-access:is_public="True">
|
||||
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" flavor-access:is_public="True">
|
||||
<atom:link href="%(host)s/v3/flavors/5" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/5" rel="bookmark"/>
|
||||
</flavor>
|
@ -13,7 +13,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.tiny",
|
||||
"os-flavor-access:is_public": true,
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 512,
|
||||
"vcpus": 1,
|
||||
"disabled": false,
|
@ -0,0 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="1" vcpus="1" ram="512" name="m1.tiny" id="%(flavor_id)s" disabled="False" ephemeral="0" swap="0" flavor-access:is_public="True">
|
||||
<atom:link href="%(host)s/v3/flavors/%(flavor_id)s" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/%(flavor_id)s" rel="bookmark"/>
|
||||
</flavor>
|
@ -13,6 +13,7 @@
|
||||
}
|
||||
],
|
||||
"name": "%(flavor_name)s",
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 1024,
|
||||
"vcpus": 2,
|
||||
"disabled": false,
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="%(flavor_name)s" id="%(flavor_id)s" disabled="False" ephemeral="0" swap="0">
|
||||
<flavor xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="%(flavor_name)s" id="%(flavor_id)s" disabled="False" ephemeral="0" swap="0" flavor-access:is_public="True">
|
||||
<atom:link href="%(host)s/v3/flavors/%(flavor_id)s" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/%(flavor_id)s" rel="bookmark"/>
|
||||
</flavor>
|
||||
|
@ -13,6 +13,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.tiny",
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 512,
|
||||
"vcpus": 1,
|
||||
"disabled": false,
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" vcpus="1" disk="1" id="1" disabled="False" ephemeral="0" swap="0">
|
||||
<flavor xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" vcpus="1" disk="1" id="1" disabled="False" ephemeral="0" swap="0" flavor-access:is_public="True">
|
||||
<atom:link href="%(host)s/v3/flavors/1" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/1" rel="bookmark"/>
|
||||
</flavor>
|
||||
|
@ -16,6 +16,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.tiny",
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 512,
|
||||
"swap": 0,
|
||||
"vcpus": 1
|
||||
@ -36,6 +37,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.small",
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 2048,
|
||||
"swap": 0,
|
||||
"vcpus": 1
|
||||
@ -56,6 +58,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.medium",
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 4096,
|
||||
"swap": 0,
|
||||
"vcpus": 2
|
||||
@ -76,6 +79,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.large",
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 8192,
|
||||
"swap": 0,
|
||||
"vcpus": 4
|
||||
@ -96,6 +100,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.xlarge",
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 16384,
|
||||
"swap": 0,
|
||||
"vcpus": 8
|
||||
|
@ -1,22 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<flavors xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1">
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavors xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" flavor-access:is_public="True">
|
||||
<atom:link href="%(host)s/v3/flavors/1" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/1" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2">
|
||||
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" flavor-access:is_public="True">
|
||||
<atom:link href="%(host)s/v3/flavors/2" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/2" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3">
|
||||
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" flavor-access:is_public="True">
|
||||
<atom:link href="%(host)s/v3/flavors/3" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/3" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4">
|
||||
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" flavor-access:is_public="True">
|
||||
<atom:link href="%(host)s/v3/flavors/4" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/4" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5">
|
||||
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" flavor-access:is_public="True">
|
||||
<atom:link href="%(host)s/v3/flavors/5" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/5" rel="bookmark"/>
|
||||
</flavor>
|
||||
|
@ -1,5 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="%(flavor_name)s" id="%(flavor_id)s" os-flavor-access:is_public="False" disabled="False" ephemeral="0" swap="0">
|
||||
<atom:link href="%(host)s/v3/flavors/%(flavor_id)s" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/%(flavor_id)s" rel="bookmark"/>
|
||||
</flavor>
|
@ -1,5 +0,0 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:os-flavor-access="http://docs.openstack.org/compute/ext/os-flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="1" vcpus="1" ram="512" name="m1.tiny" id="%(flavor_id)s" disabled="False" ephemeral="0" swap="0" os-flavor-access:is_public="True">
|
||||
<atom:link href="%(host)s/v3/flavors/%(flavor_id)s" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/%(flavor_id)s" rel="bookmark"/>
|
||||
</flavor>
|
@ -15,6 +15,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.tiny",
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 512,
|
||||
"rxtx_factor": 1.0,
|
||||
"swap": 0,
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" rxtx_factor="1.0">
|
||||
<flavor xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" flavor-access:is_public="True" disk="1" id="1" rxtx_factor="1.0">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
|
||||
</flavor>
|
||||
|
@ -16,6 +16,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.tiny",
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 512,
|
||||
"rxtx_factor": 1.0,
|
||||
"swap": 0,
|
||||
@ -37,6 +38,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.small",
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 2048,
|
||||
"rxtx_factor": 1.0,
|
||||
"swap": 0,
|
||||
@ -58,6 +60,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.medium",
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 4096,
|
||||
"rxtx_factor": 1.0,
|
||||
"swap": 0,
|
||||
@ -79,6 +82,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.large",
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 8192,
|
||||
"rxtx_factor": 1.0,
|
||||
"swap": 0,
|
||||
@ -100,6 +104,7 @@
|
||||
}
|
||||
],
|
||||
"name": "m1.xlarge",
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 16384,
|
||||
"rxtx_factor": 1.0,
|
||||
"swap": 0,
|
||||
|
@ -1,23 +1,23 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavors xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" rxtx_factor="1.0">
|
||||
<flavors xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1">
|
||||
<flavor name="m1.tiny" ram="512" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="1" id="1" flavor-access:is_public="True" rxtx_factor="1.0">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/1" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/1" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" rxtx_factor="1.0">
|
||||
<flavor name="m1.small" ram="2048" ephemeral="0" disabled="False" vcpus="1" swap="0" disk="20" id="2" flavor-access:is_public="True" rxtx_factor="1.0">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/2" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/2" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" rxtx_factor="1.0">
|
||||
<flavor name="m1.medium" ram="4096" ephemeral="0" disabled="False" vcpus="2" swap="0" disk="40" id="3" flavor-access:is_public="True" rxtx_factor="1.0">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/3" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/3" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" rxtx_factor="1.0">
|
||||
<flavor name="m1.large" ram="8192" ephemeral="0" disabled="False" vcpus="4" swap="0" disk="80" id="4" flavor-access:is_public="True" rxtx_factor="1.0">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/4" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/4" rel="bookmark"/>
|
||||
</flavor>
|
||||
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" rxtx_factor="1.0">
|
||||
<flavor name="m1.xlarge" ram="16384" ephemeral="0" disabled="False" vcpus="8" swap="0" disk="160" id="5" flavor-access:is_public="True" rxtx_factor="1.0">
|
||||
<atom:link href="http://openstack.example.com/v3/flavors/5" rel="self"/>
|
||||
<atom:link href="http://openstack.example.com/flavors/5" rel="bookmark"/>
|
||||
</flavor>
|
||||
</flavors>
|
||||
</flavors>
|
@ -13,6 +13,7 @@
|
||||
}
|
||||
],
|
||||
"name": "%(flavor_name)s",
|
||||
"flavor-access:is_public": true,
|
||||
"ram": 1024,
|
||||
"rxtx_factor": 2.0,
|
||||
"vcpus": 2,
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<flavor xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="%(flavor_name)s" id="%(flavor_id)s" disabled="False" ephemeral="0" swap="0" rxtx_factor="2.0">
|
||||
<flavor xmlns:flavor-access="http://docs.openstack.org/compute/core/flavor-access/api/v3" xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://docs.openstack.org/compute/api/v1.1" disk="10" vcpus="2" ram="1024" name="%(flavor_name)s" id="%(flavor_id)s" disabled="False" ephemeral="0" swap="0" flavor-access:is_public="True" rxtx_factor="2.0">
|
||||
<atom:link href="%(host)s/v3/flavors/%(flavor_id)s" rel="self"/>
|
||||
<atom:link href="%(host)s/flavors/%(flavor_id)s" rel="bookmark"/>
|
||||
</flavor>
|
||||
|
@ -17,7 +17,7 @@ from nova.tests.integrated.v3 import api_sample_base
|
||||
|
||||
|
||||
class FlavorAccessSampleJsonTests(api_sample_base.ApiSampleTestBaseV3):
|
||||
extension_name = 'os-flavor-access'
|
||||
extension_name = 'flavor-access'
|
||||
|
||||
def _add_tenant(self):
|
||||
subs = {
|
||||
@ -53,7 +53,7 @@ class FlavorAccessSampleJsonTests(api_sample_base.ApiSampleTestBaseV3):
|
||||
self._create_flavor()
|
||||
self._add_tenant()
|
||||
flavor_id = 10
|
||||
response = self._do_get('flavors/%s/os-flavor-access' % flavor_id)
|
||||
response = self._do_get('flavors/%s/flavor-access' % flavor_id)
|
||||
subs = {
|
||||
'flavor_id': flavor_id,
|
||||
'tenant_id': 'fake_tenant',
|
||||
|
Loading…
Reference in New Issue
Block a user