Merge "Document schema properties for Neutron subnet resource"

This commit is contained in:
Jenkins 2014-03-03 19:54:14 +00:00 committed by Gerrit Code Review
commit 5160a76b9c

View File

@ -46,23 +46,28 @@ class Subnet(neutron.NeutronResource):
properties_schema = { properties_schema = {
NETWORK_ID: properties.Schema( NETWORK_ID: properties.Schema(
properties.Schema.STRING, properties.Schema.STRING,
_('The ID of the attached network.'),
required=True required=True
), ),
CIDR: properties.Schema( CIDR: properties.Schema(
properties.Schema.STRING, properties.Schema.STRING,
_('The CIDR.'),
required=True required=True
), ),
VALUE_SPECS: properties.Schema( VALUE_SPECS: properties.Schema(
properties.Schema.MAP, properties.Schema.MAP,
_('Extra parameters to include in the creation request.'),
default={}, default={},
update_allowed=True update_allowed=True
), ),
NAME: properties.Schema( NAME: properties.Schema(
properties.Schema.STRING, properties.Schema.STRING,
_('The name of the subnet.'),
update_allowed=True update_allowed=True
), ),
IP_VERSION: properties.Schema( IP_VERSION: properties.Schema(
properties.Schema.INTEGER, properties.Schema.INTEGER,
_('The IP version, which is 4 or 6.'),
default=4, default=4,
constraints=[ constraints=[
constraints.AllowedValues([4, 6]), constraints.AllowedValues([4, 6]),
@ -70,20 +75,24 @@ class Subnet(neutron.NeutronResource):
), ),
DNS_NAMESERVERS: properties.Schema( DNS_NAMESERVERS: properties.Schema(
properties.Schema.LIST, properties.Schema.LIST,
_('A specified set of DNS name servers to be used.'),
default=[], default=[],
update_allowed=True update_allowed=True
), ),
GATEWAY_IP: properties.Schema( GATEWAY_IP: properties.Schema(
properties.Schema.STRING, properties.Schema.STRING,
_('The gateway IP address.'),
update_allowed=True update_allowed=True
), ),
ENABLE_DHCP: properties.Schema( ENABLE_DHCP: properties.Schema(
properties.Schema.BOOLEAN, properties.Schema.BOOLEAN,
_('Set to true if DHCP is enabled and false if DHCP is disabled.'),
default=True, default=True,
update_allowed=True update_allowed=True
), ),
ALLOCATION_POOLS: properties.Schema( ALLOCATION_POOLS: properties.Schema(
properties.Schema.LIST, properties.Schema.LIST,
_('The start and end addresses for the allocation pools.'),
schema=properties.Schema( schema=properties.Schema(
properties.Schema.MAP, properties.Schema.MAP,
schema={ schema={
@ -99,7 +108,9 @@ class Subnet(neutron.NeutronResource):
) )
), ),
TENANT_ID: properties.Schema( TENANT_ID: properties.Schema(
properties.Schema.STRING properties.Schema.STRING,
_('The ID of the tenant who owns the network. Only administrative'
' users can specify a tenant ID other than their own.')
), ),
} }