Merge "Add missing attribute types for neutron resources"

This commit is contained in:
Jenkins 2015-06-03 16:59:51 +00:00 committed by Gerrit Code Review
commit 6dccf335be
4 changed files with 136 additions and 68 deletions

View File

@ -79,29 +79,37 @@ class Firewall(neutron.NeutronResource):
attributes_schema = { attributes_schema = {
NAME_ATTR: attributes.Schema( NAME_ATTR: attributes.Schema(
_('Name for the firewall.') _('Name for the firewall.'),
type=attributes.Schema.STRING
), ),
DESCRIPTION_ATTR: attributes.Schema( DESCRIPTION_ATTR: attributes.Schema(
_('Description of the firewall.') _('Description of the firewall.'),
type=attributes.Schema.STRING
), ),
ADMIN_STATE_UP_ATTR: attributes.Schema( ADMIN_STATE_UP_ATTR: attributes.Schema(
_('The administrative state of the firewall.') _('The administrative state of the firewall.'),
type=attributes.Schema.STRING
), ),
FIREWALL_POLICY_ID_ATTR: attributes.Schema( FIREWALL_POLICY_ID_ATTR: attributes.Schema(
_('Unique identifier of the firewall policy used to create ' _('Unique identifier of the firewall policy used to create '
'the firewall.') 'the firewall.'),
type=attributes.Schema.STRING
), ),
SHARED_ATTR: attributes.Schema( SHARED_ATTR: attributes.Schema(
_('Shared status of this firewall.') _('Shared status of this firewall.'),
type=attributes.Schema.STRING
), ),
STATUS: attributes.Schema( STATUS: attributes.Schema(
_('The status of the firewall.') _('The status of the firewall.'),
type=attributes.Schema.STRING
), ),
TENANT_ID: attributes.Schema( TENANT_ID: attributes.Schema(
_('Id of the tenant owning the firewall.') _('Id of the tenant owning the firewall.'),
type=attributes.Schema.STRING
), ),
SHOW: attributes.Schema( SHOW: attributes.Schema(
_('All attributes.') _('All attributes.'),
type=attributes.Schema.MAP
), ),
} }
@ -187,22 +195,28 @@ class FirewallPolicy(neutron.NeutronResource):
attributes_schema = { attributes_schema = {
NAME_ATTR: attributes.Schema( NAME_ATTR: attributes.Schema(
_('Name for the firewall policy.') _('Name for the firewall policy.'),
type=attributes.Schema.STRING
), ),
DESCRIPTION_ATTR: attributes.Schema( DESCRIPTION_ATTR: attributes.Schema(
_('Description of the firewall policy.') _('Description of the firewall policy.'),
type=attributes.Schema.STRING
), ),
FIREWALL_RULES_ATTR: attributes.Schema( FIREWALL_RULES_ATTR: attributes.Schema(
_('List of firewall rules in this firewall policy.') _('List of firewall rules in this firewall policy.'),
type=attributes.Schema.LIST
), ),
SHARED_ATTR: attributes.Schema( SHARED_ATTR: attributes.Schema(
_('Shared status of this firewall policy.') _('Shared status of this firewall policy.'),
type=attributes.Schema.STRING
), ),
AUDITED_ATTR: attributes.Schema( AUDITED_ATTR: attributes.Schema(
_('Audit status of this firewall policy.') _('Audit status of this firewall policy.'),
type=attributes.Schema.STRING
), ),
TENANT_ID: attributes.Schema( TENANT_ID: attributes.Schema(
_('Id of the tenant owning the firewall policy.') _('Id of the tenant owning the firewall policy.'),
type=attributes.Schema.STRING
), ),
} }

View File

@ -343,30 +343,38 @@ class Pool(neutron.NeutronResource):
attributes_schema = { attributes_schema = {
ADMIN_STATE_UP_ATTR: attributes.Schema( ADMIN_STATE_UP_ATTR: attributes.Schema(
_('The administrative state of this pool.') _('The administrative state of this pool.'),
type=attributes.Schema.STRING
), ),
NAME_ATTR: attributes.Schema( NAME_ATTR: attributes.Schema(
_('Name of the pool.') _('Name of the pool.'),
type=attributes.Schema.STRING
), ),
PROTOCOL_ATTR: attributes.Schema( PROTOCOL_ATTR: attributes.Schema(
_('Protocol to balance.') _('Protocol to balance.'),
type=attributes.Schema.STRING
), ),
SUBNET_ID_ATTR: attributes.Schema( SUBNET_ID_ATTR: attributes.Schema(
_('The subnet for the port on which the members of the pool ' _('The subnet for the port on which the members of the pool '
'will be connected.') 'will be connected.'),
type=attributes.Schema.STRING
), ),
LB_METHOD_ATTR: attributes.Schema( LB_METHOD_ATTR: attributes.Schema(
_('The algorithm used to distribute load between the members ' _('The algorithm used to distribute load between the members '
'of the pool.') 'of the pool.'),
type=attributes.Schema.STRING
), ),
DESCRIPTION_ATTR: attributes.Schema( DESCRIPTION_ATTR: attributes.Schema(
_('Description of the pool.') _('Description of the pool.'),
type=attributes.Schema.STRING
), ),
TENANT_ID: attributes.Schema( TENANT_ID: attributes.Schema(
_('Tenant owning the pool.') _('Tenant owning the pool.'),
type=attributes.Schema.STRING
), ),
VIP_ATTR: attributes.Schema( VIP_ATTR: attributes.Schema(
_('Vip associated with the pool.') _('Vip associated with the pool.'),
type=attributes.Schema.MAP
), ),
} }
@ -592,26 +600,33 @@ class PoolMember(neutron.NeutronResource):
attributes_schema = { attributes_schema = {
ADMIN_STATE_UP_ATTR: attributes.Schema( ADMIN_STATE_UP_ATTR: attributes.Schema(
_('The administrative state of this pool member.') _('The administrative state of this pool member.'),
type=attributes.Schema.STRING
), ),
TENANT_ID: attributes.Schema( TENANT_ID: attributes.Schema(
_('Tenant owning the pool member.') _('Tenant owning the pool member.'),
type=attributes.Schema.STRING
), ),
WEIGHT_ATTR: attributes.Schema( WEIGHT_ATTR: attributes.Schema(
_('Weight of the pool member in the pool.') _('Weight of the pool member in the pool.'),
type=attributes.Schema.STRING
), ),
ADDRESS_ATTR: attributes.Schema( ADDRESS_ATTR: attributes.Schema(
_('IP address of the pool member.') _('IP address of the pool member.'),
type=attributes.Schema.STRING
), ),
POOL_ID_ATTR: attributes.Schema( POOL_ID_ATTR: attributes.Schema(
_('The ID of the load balancing pool.') _('The ID of the load balancing pool.'),
type=attributes.Schema.STRING
), ),
PROTOCOL_PORT_ATTR: attributes.Schema( PROTOCOL_PORT_ATTR: attributes.Schema(
_('TCP port on which the pool member listens for requests or ' _('TCP port on which the pool member listens for requests or '
'connections.') 'connections.'),
type=attributes.Schema.STRING
), ),
SHOW: attributes.Schema( SHOW: attributes.Schema(
_('All attributes.') _('All attributes.'),
type=attributes.Schema.MAP
), ),
} }

View File

@ -146,16 +146,20 @@ class MeteringRule(neutron.NeutronResource):
attributes_schema = { attributes_schema = {
DIRECTION_ATTR: attributes.Schema( DIRECTION_ATTR: attributes.Schema(
_('The direction in which metering rule is applied.') _('The direction in which metering rule is applied.'),
type=attributes.Schema.STRING
), ),
EXCLUDED_ATTR: attributes.Schema( EXCLUDED_ATTR: attributes.Schema(
_('Exclude state for cidr.') _('Exclude state for cidr.'),
type=attributes.Schema.STRING
), ),
METERING_LABEL_ID_ATTR: attributes.Schema( METERING_LABEL_ID_ATTR: attributes.Schema(
_('The metering label ID to associate with this metering rule.') _('The metering label ID to associate with this metering rule.'),
type=attributes.Schema.STRING
), ),
REMOTE_IP_PREFIX_ATTR: attributes.Schema( REMOTE_IP_PREFIX_ATTR: attributes.Schema(
_('CIDR to be associated with this metering rule.') _('CIDR to be associated with this metering rule.'),
type=attributes.Schema.STRING
), ),
} }

View File

@ -309,64 +309,81 @@ class IPsecSiteConnection(neutron.NeutronResource):
attributes_schema = { attributes_schema = {
ADMIN_STATE_UP_ATTR: attributes.Schema( ADMIN_STATE_UP_ATTR: attributes.Schema(
_('The administrative state of the ipsec site connection.') _('The administrative state of the ipsec site connection.'),
type=attributes.Schema.STRING
), ),
AUTH_MODE: attributes.Schema( AUTH_MODE: attributes.Schema(
_('The authentication mode of the ipsec site connection.') _('The authentication mode of the ipsec site connection.'),
type=attributes.Schema.STRING
), ),
DESCRIPTION_ATTR: attributes.Schema( DESCRIPTION_ATTR: attributes.Schema(
_('The description of the ipsec site connection.') _('The description of the ipsec site connection.'),
type=attributes.Schema.STRING
), ),
DPD_ATTR: attributes.Schema( DPD_ATTR: attributes.Schema(
_('The dead peer detection protocol configuration of the ipsec ' _('The dead peer detection protocol configuration of the ipsec '
'site connection.') 'site connection.'),
type=attributes.Schema.MAP
), ),
IKEPOLICY_ID_ATTR: attributes.Schema( IKEPOLICY_ID_ATTR: attributes.Schema(
_('The unique identifier of ike policy associated with the ipsec ' _('The unique identifier of ike policy associated with the ipsec '
'site connection.') 'site connection.'),
type=attributes.Schema.STRING
), ),
INITIATOR_ATTR: attributes.Schema( INITIATOR_ATTR: attributes.Schema(
_('The initiator of the ipsec site connection.') _('The initiator of the ipsec site connection.'),
type=attributes.Schema.STRING
), ),
IPSECPOLICY_ID_ATTR: attributes.Schema( IPSECPOLICY_ID_ATTR: attributes.Schema(
_('The unique identifier of ipsec policy associated with the ' _('The unique identifier of ipsec policy associated with the '
'ipsec site connection.') 'ipsec site connection.'),
type=attributes.Schema.STRING
), ),
MTU_ATTR: attributes.Schema( MTU_ATTR: attributes.Schema(
_('The maximum transmission unit size (in bytes) of the ipsec ' _('The maximum transmission unit size (in bytes) of the ipsec '
'site connection.') 'site connection.'),
type=attributes.Schema.STRING
), ),
NAME_ATTR: attributes.Schema( NAME_ATTR: attributes.Schema(
_('The name of the ipsec site connection.') _('The name of the ipsec site connection.'),
type=attributes.Schema.STRING
), ),
PEER_ADDRESS_ATTR: attributes.Schema( PEER_ADDRESS_ATTR: attributes.Schema(
_('The remote branch router public IPv4 address or IPv6 address ' _('The remote branch router public IPv4 address or IPv6 address '
'or FQDN.') 'or FQDN.'),
type=attributes.Schema.STRING
), ),
PEER_CIDRS_ATTR: attributes.Schema( PEER_CIDRS_ATTR: attributes.Schema(
_('The remote subnet(s) in CIDR format of the ipsec site ' _('The remote subnet(s) in CIDR format of the ipsec site '
'connection.') 'connection.'),
type=attributes.Schema.LIST
), ),
PEER_ID_ATTR: attributes.Schema( PEER_ID_ATTR: attributes.Schema(
_('The remote branch router identity of the ipsec site ' _('The remote branch router identity of the ipsec site '
'connection.') 'connection.'),
type=attributes.Schema.STRING
), ),
PSK_ATTR: attributes.Schema( PSK_ATTR: attributes.Schema(
_('The pre-shared key string of the ipsec site connection.') _('The pre-shared key string of the ipsec site connection.'),
type=attributes.Schema.STRING
), ),
ROUTE_MODE: attributes.Schema( ROUTE_MODE: attributes.Schema(
_('The route mode of the ipsec site connection.') _('The route mode of the ipsec site connection.'),
type=attributes.Schema.STRING
), ),
STATUS: attributes.Schema( STATUS: attributes.Schema(
_('The status of the ipsec site connection.') _('The status of the ipsec site connection.'),
type=attributes.Schema.STRING
), ),
TENANT_ID: attributes.Schema( TENANT_ID: attributes.Schema(
_('The unique identifier of the tenant owning the ipsec site ' _('The unique identifier of the tenant owning the ipsec site '
'connection.') 'connection.'),
type=attributes.Schema.STRING
), ),
VPNSERVICE_ID_ATTR: attributes.Schema( VPNSERVICE_ID_ATTR: attributes.Schema(
_('The unique identifier of vpn service associated with the ipsec ' _('The unique identifier of vpn service associated with the ipsec '
'site connection.') 'site connection.'),
type=attributes.Schema.STRING
), ),
} }
@ -502,32 +519,41 @@ class IKEPolicy(neutron.NeutronResource):
attributes_schema = { attributes_schema = {
AUTH_ALGORITHM_ATTR: attributes.Schema( AUTH_ALGORITHM_ATTR: attributes.Schema(
_('The authentication hash algorithm used by the ike policy.') _('The authentication hash algorithm used by the ike policy.'),
type=attributes.Schema.STRING
), ),
DESCRIPTION_ATTR: attributes.Schema( DESCRIPTION_ATTR: attributes.Schema(
_('The description of the ike policy.') _('The description of the ike policy.'),
type=attributes.Schema.STRING
), ),
ENCRYPTION_ALGORITHM_ATTR: attributes.Schema( ENCRYPTION_ALGORITHM_ATTR: attributes.Schema(
_('The encryption algorithm used by the ike policy.') _('The encryption algorithm used by the ike policy.'),
type=attributes.Schema.STRING
), ),
IKE_VERSION_ATTR: attributes.Schema( IKE_VERSION_ATTR: attributes.Schema(
_('The version of the ike policy.') _('The version of the ike policy.'),
type=attributes.Schema.STRING
), ),
LIFETIME_ATTR: attributes.Schema( LIFETIME_ATTR: attributes.Schema(
_('The safety assessment lifetime configuration for the ike ' _('The safety assessment lifetime configuration for the ike '
'policy.') 'policy.'),
type=attributes.Schema.MAP
), ),
NAME_ATTR: attributes.Schema( NAME_ATTR: attributes.Schema(
_('The name of the ike policy.') _('The name of the ike policy.'),
type=attributes.Schema.STRING
), ),
PFS_ATTR: attributes.Schema( PFS_ATTR: attributes.Schema(
_('The perfect forward secrecy of the ike policy.') _('The perfect forward secrecy of the ike policy.'),
type=attributes.Schema.STRING
), ),
PHASE1_NEGOTIATION_MODE_ATTR: attributes.Schema( PHASE1_NEGOTIATION_MODE_ATTR: attributes.Schema(
_('The negotiation mode of the ike policy.') _('The negotiation mode of the ike policy.'),
type=attributes.Schema.STRING
), ),
TENANT_ID: attributes.Schema( TENANT_ID: attributes.Schema(
_('The unique identifier of the tenant owning the ike policy.') _('The unique identifier of the tenant owning the ike policy.'),
type=attributes.Schema.STRING
), ),
} }
@ -664,32 +690,41 @@ class IPsecPolicy(neutron.NeutronResource):
attributes_schema = { attributes_schema = {
AUTH_ALGORITHM_ATTR: attributes.Schema( AUTH_ALGORITHM_ATTR: attributes.Schema(
_('The authentication hash algorithm of the ipsec policy.') _('The authentication hash algorithm of the ipsec policy.'),
type=attributes.Schema.STRING
), ),
DESCRIPTION_ATTR: attributes.Schema( DESCRIPTION_ATTR: attributes.Schema(
_('The description of the ipsec policy.') _('The description of the ipsec policy.'),
type=attributes.Schema.STRING
), ),
ENCAPSULATION_MODE_ATTR: attributes.Schema( ENCAPSULATION_MODE_ATTR: attributes.Schema(
_('The encapsulation mode of the ipsec policy.') _('The encapsulation mode of the ipsec policy.'),
type=attributes.Schema.STRING
), ),
ENCRYPTION_ALGORITHM_ATTR: attributes.Schema( ENCRYPTION_ALGORITHM_ATTR: attributes.Schema(
_('The encryption algorithm of the ipsec policy.') _('The encryption algorithm of the ipsec policy.'),
type=attributes.Schema.STRING
), ),
LIFETIME_ATTR: attributes.Schema( LIFETIME_ATTR: attributes.Schema(
_('The safety assessment lifetime configuration of the ipsec ' _('The safety assessment lifetime configuration of the ipsec '
'policy.') 'policy.'),
type=attributes.Schema.MAP
), ),
NAME_ATTR: attributes.Schema( NAME_ATTR: attributes.Schema(
_('The name of the ipsec policy.') _('The name of the ipsec policy.'),
type=attributes.Schema.STRING
), ),
PFS_ATTR: attributes.Schema( PFS_ATTR: attributes.Schema(
_('The perfect forward secrecy of the ipsec policy.') _('The perfect forward secrecy of the ipsec policy.'),
type=attributes.Schema.STRING
), ),
TENANT_ID: attributes.Schema( TENANT_ID: attributes.Schema(
_('The unique identifier of the tenant owning the ipsec policy.') _('The unique identifier of the tenant owning the ipsec policy.'),
type=attributes.Schema.STRING
), ),
TRANSFORM_PROTOCOL_ATTR: attributes.Schema( TRANSFORM_PROTOCOL_ATTR: attributes.Schema(
_('The transform protocol of the ipsec policy.') _('The transform protocol of the ipsec policy.'),
type=attributes.Schema.STRING
), ),
} }