Merge "Using new attribute schema for all resources"

This commit is contained in:
Jenkins 2014-05-22 00:42:49 +00:00 committed by Gerrit Code Review
commit 5115246885
35 changed files with 745 additions and 301 deletions

View File

@ -14,6 +14,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from heat.engine import attributes
from heat.engine import properties from heat.engine import properties
from heat.engine import resource from heat.engine import resource
from heat.openstack.common.gettextutils import _ from heat.openstack.common.gettextutils import _
@ -139,15 +140,33 @@ class DockerContainer(resource.Resource):
} }
attributes_schema = { attributes_schema = {
'info': _('Container info'), 'info': attributes.Schema(
'network_info': _('Container network info'), _('Container info')
'network_ip': _('Container ip address'), ),
'network_gateway': _('Container ip gateway'), 'network_info': attributes.Schema(
'network_tcp_ports': _('Container TCP ports'), _('Container network info')
'network_udp_ports': _('Container UDP ports'), ),
'logs': _('Container logs'), 'network_ip': attributes.Schema(
'logs_head': _('Container first logs line'), _('Container ip address')
'logs_tail': _('Container last logs line') ),
'network_gateway': attributes.Schema(
_('Container ip gateway')
),
'network_tcp_ports': attributes.Schema(
_('Container TCP ports')
),
'network_udp_ports': attributes.Schema(
_('Container UDP ports')
),
'logs': attributes.Schema(
_('Container logs')
),
'logs_head': attributes.Schema(
_('Container first logs line')
),
'logs_tail': attributes.Schema(
_('Container last logs line')
),
} }
def get_client(self): def get_client(self):

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import properties from heat.engine import properties
from heat.engine import resource from heat.engine import resource
@ -49,8 +50,12 @@ class MarconiQueue(resource.Resource):
} }
attributes_schema = { attributes_schema = {
"queue_id": _("ID of the queue."), "queue_id": attributes.Schema(
"href": _("The resource href of the queue.") _("ID of the queue.")
),
"href": attributes.Schema(
_("The resource href of the queue.")
),
} }
def __init__(self, name, json_snippet, stack): def __init__(self, name, json_snippet, stack):

View File

@ -15,6 +15,7 @@
import copy import copy
from heat.engine import attributes
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
from heat.engine import resource from heat.engine import resource
@ -504,10 +505,12 @@ class WebHook(resource.Resource):
update_allowed_properties = (NAME, METADATA) update_allowed_properties = (NAME, METADATA)
attributes_schema = { attributes_schema = {
'executeUrl': _( 'executeUrl': attributes.Schema(
"The url for executing the webhook (requires auth)."), _("The url for executing the webhook (requires auth).")
'capabilityUrl': _( ),
"The url for executing the webhook (doesn't require auth)."), 'capabilityUrl': attributes.Schema(
_("The url for executing the webhook (doesn't require auth).")
),
} }
def _get_args(self, props): def _get_args(self, props):

View File

@ -28,6 +28,7 @@ import itertools
from heat.openstack.common import log as logging from heat.openstack.common import log as logging
from heat.openstack.common.gettextutils import _ from heat.openstack.common.gettextutils import _
from heat.engine import attributes
from heat.engine import function from heat.engine import function
from heat.engine import scheduler from heat.engine import scheduler
from heat.engine import constraints from heat.engine import constraints
@ -364,8 +365,10 @@ class CloudLoadBalancer(resource.Resource):
} }
attributes_schema = { attributes_schema = {
'PublicIp': _('Public IP address of the specified ' 'PublicIp': attributes.Schema(
'instance.')} _('Public IP address of the specified instance.')
),
}
def __init__(self, name, json_snippet, stack): def __init__(self, name, json_snippet, stack):
super(CloudLoadBalancer, self).__init__(name, json_snippet, stack) super(CloudLoadBalancer, self).__init__(name, json_snippet, stack)

View File

@ -14,6 +14,7 @@
import copy import copy
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import properties from heat.engine import properties
from heat.engine.resources import nova_utils from heat.engine.resources import nova_utils
from heat.engine.resources import server from heat.engine.resources import server
@ -60,9 +61,15 @@ class CloudServer(server.Server):
attributes_schema = copy.deepcopy(server.Server.attributes_schema) attributes_schema = copy.deepcopy(server.Server.attributes_schema)
attributes_schema.update( attributes_schema.update(
{ {
'distro': _('The Linux distribution on the server.'), 'distro': attributes.Schema(
'privateIPv4': _('The private IPv4 address of the server.'), _('The Linux distribution on the server.')
'admin_pass': _('The administrator password for the server.'), ),
'privateIPv4': attributes.Schema(
_('The private IPv4 address of the server.')
),
'admin_pass': attributes.Schema(
_('The administrator password for the server.')
),
} }
) )

View File

@ -14,6 +14,7 @@
import netaddr import netaddr
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
from heat.engine import resource from heat.engine import resource
@ -69,8 +70,12 @@ class CloudNetwork(resource.Resource):
} }
attributes_schema = { attributes_schema = {
"cidr": _("The CIDR for an isolated private network."), "cidr": attributes.Schema(
"label": _("The name of the network.") _("The CIDR for an isolated private network.")
),
"label": attributes.Schema(
_("The name of the network.")
),
} }
def __init__(self, name, json_snippet, stack): def __init__(self, name, json_snippet, stack):

View File

@ -19,6 +19,7 @@ import six
from heat.common import exception from heat.common import exception
from heat.common import timeutils as iso8601utils from heat.common import timeutils as iso8601utils
from heat.engine import attributes
from heat.engine import constraints from heat.engine import constraints
from heat.engine import environment from heat.engine import environment
from heat.engine import function from heat.engine import function
@ -140,8 +141,10 @@ class InstanceGroup(stack_resource.StackResource):
} }
attributes_schema = { attributes_schema = {
"InstanceList": _("A comma-delimited list of server ip addresses. " "InstanceList": attributes.Schema(
"(Heat extension).") _("A comma-delimited list of server ip addresses. "
"(Heat extension).")
),
} }
rolling_update_schema = { rolling_update_schema = {
MIN_INSTANCES_IN_SERVICE: properties.Schema(properties.Schema.NUMBER, MIN_INSTANCES_IN_SERVICE: properties.Schema(properties.Schema.NUMBER,
@ -1002,8 +1005,9 @@ class ScalingPolicy(signal_responder.SignalResponder, CooldownMixin):
} }
attributes_schema = { attributes_schema = {
"AlarmUrl": _("A signed url to handle the alarm. " "AlarmUrl": attributes.Schema(
"(Heat extension).") _("A signed url to handle the alarm. (Heat extension).")
),
} }
def handle_create(self): def handle_create(self):
@ -1140,7 +1144,9 @@ class AutoScalingPolicy(ScalingPolicy):
} }
attributes_schema = { attributes_schema = {
"alarm_url": _("A signed url to handle the alarm.") "alarm_url": attributes.Schema(
_("A signed url to handle the alarm.")
),
} }
def _get_adjustement_type(self): def _get_adjustement_type(self):

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
@ -47,9 +48,11 @@ class ElasticIp(resource.Resource):
} }
attributes_schema = { attributes_schema = {
'AllocationId': _('ID that AWS assigns to represent the allocation of' 'AllocationId': attributes.Schema(
' the address for use with Amazon VPC. Returned only' _('ID that AWS assigns to represent the allocation of the address '
' for VPC elastic IP addresses.') 'for use with Amazon VPC. Returned only for VPC elastic IP '
'addresses.')
),
} }
def __init__(self, name, json_snippet, stack): def __init__(self, name, json_snippet, stack):

View File

@ -19,6 +19,7 @@ import six
cfg.CONF.import_opt('instance_user', 'heat.common.config') cfg.CONF.import_opt('instance_user', 'heat.common.config')
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
@ -51,8 +52,9 @@ class Restarter(signal_responder.SignalResponder):
} }
attributes_schema = { attributes_schema = {
"AlarmUrl": _("A signed url to handle the alarm " "AlarmUrl": attributes.Schema(
"(Heat extension).") _("A signed url to handle the alarm (Heat extension).")
),
} }
def _find_resource(self, resource_id): def _find_resource(self, resource_id):
@ -296,17 +298,24 @@ class Instance(resource.Resource):
), ),
} }
attributes_schema = {'AvailabilityZone': _('The Availability Zone where ' attributes_schema = {
'the specified instance is ' 'AvailabilityZone': attributes.Schema(
'launched.'), _('The Availability Zone where the specified instance is '
'PrivateDnsName': _('Private DNS name of the' 'launched.')
' specified instance.'), ),
'PublicDnsName': _('Public DNS name of the specified ' 'PrivateDnsName': attributes.Schema(
'instance.'), _('Private DNS name of the specified instance.')
'PrivateIp': _('Private IP address of the specified ' ),
'instance.'), 'PublicDnsName': attributes.Schema(
'PublicIp': _('Public IP address of the specified ' _('Public DNS name of the specified instance.')
'instance.')} ),
'PrivateIp': attributes.Schema(
_('Private IP address of the specified instance.')
),
'PublicIp': attributes.Schema(
_('Public IP address of the specified instance.')
),
}
# Server host name limit to 53 characters by due to typical default # Server host name limit to 53 characters by due to typical default
# linux HOST_NAME_MAX of 64, minus the .novalocal appended to the name # linux HOST_NAME_MAX of 64, minus the .novalocal appended to the name

View File

@ -16,6 +16,7 @@ from oslo.config import cfg
from heat.common import exception from heat.common import exception
from heat.common import template_format from heat.common import template_format
from heat.engine import attributes
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
from heat.engine.resources import nova_utils from heat.engine.resources import nova_utils
@ -341,18 +342,24 @@ class LoadBalancer(stack_resource.StackResource):
} }
attributes_schema = { attributes_schema = {
"CanonicalHostedZoneName": _("The name of the hosted zone that is " "CanonicalHostedZoneName": attributes.Schema(
"associated with the LoadBalancer."), _("The name of the hosted zone that is associated with the "
"CanonicalHostedZoneNameID": _("The ID of the hosted zone name " "LoadBalancer.")
"that is associated with the " ),
"LoadBalancer."), "CanonicalHostedZoneNameID": attributes.Schema(
"DNSName": _("The DNS name for the LoadBalancer."), _("The ID of the hosted zone name that is associated with the "
"SourceSecurityGroup.GroupName": _("The security group that you can " "LoadBalancer.")
"use as part of your inbound " ),
"rules for your LoadBalancer's " "DNSName": attributes.Schema(
"back-end instances."), _("The DNS name for the LoadBalancer.")
"SourceSecurityGroup.OwnerAlias": _("Owner of the source " ),
"security group.") "SourceSecurityGroup.GroupName": attributes.Schema(
_("The security group that you can use as part of your inbound "
"rules for your LoadBalancer's back-end instances.")
),
"SourceSecurityGroup.OwnerAlias": attributes.Schema(
_("Owner of the source security group.")
),
} }
def _haproxy_config(self, templ, instances): def _haproxy_config(self, templ, instances):

View File

@ -11,6 +11,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import properties from heat.engine import properties
from heat.engine import resource from heat.engine import resource
@ -76,8 +77,11 @@ class NetworkInterface(resource.Resource):
), ),
} }
attributes_schema = {'PrivateIpAddress': _('Private IP address of the ' attributes_schema = {
'network interface.')} 'PrivateIpAddress': attributes.Schema(
_('Private IP address of the network interface.')
),
}
@staticmethod @staticmethod
def network_id_from_subnet_id(neutronclient, subnet_id): def network_id_from_subnet_id(neutronclient, subnet_id):

View File

@ -11,6 +11,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
@ -60,14 +61,28 @@ class Firewall(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
'name': _('Name for the firewall.'), 'name': attributes.Schema(
'description': _('Description of the firewall.'), _('Name for the firewall.')
'admin_state_up': _('The administrative state of the firewall.'), ),
'firewall_policy_id': _('Unique identifier of the firewall policy ' 'description': attributes.Schema(
'used to create the firewall.'), _('Description of the firewall.')
'status': _('The status of the firewall.'), ),
'tenant_id': _('Id of the tenant owning the firewall.'), 'admin_state_up': attributes.Schema(
'show': _('All attributes.'), _('The administrative state of the firewall.')
),
'firewall_policy_id': attributes.Schema(
_('Unique identifier of the firewall policy used to create '
'the firewall.')
),
'status': attributes.Schema(
_('The status of the firewall.')
),
'tenant_id': attributes.Schema(
_('Id of the tenant owning the firewall.')
),
'show': attributes.Schema(
_('All attributes.')
),
} }
def _show_resource(self): def _show_resource(self):
@ -143,12 +158,24 @@ class FirewallPolicy(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
'name': _('Name for the firewall policy.'), 'name': attributes.Schema(
'description': _('Description of the firewall policy.'), _('Name for the firewall policy.')
'firewall_rules': _('List of firewall rules in this firewall policy.'), ),
'shared': _('Shared status of this firewall policy.'), 'description': attributes.Schema(
'audited': _('Audit status of this firewall policy.'), _('Description of the firewall policy.')
'tenant_id': _('Id of the tenant owning the firewall policy.') ),
'firewall_rules': attributes.Schema(
_('List of firewall rules in this firewall policy.')
),
'shared': attributes.Schema(
_('Shared status of this firewall policy.')
),
'audited': attributes.Schema(
_('Audit status of this firewall policy.')
),
'tenant_id': attributes.Schema(
_('Id of the tenant owning the firewall policy.')
),
} }
def _show_resource(self): def _show_resource(self):
@ -265,24 +292,49 @@ class FirewallRule(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
'name': _('Name for the firewall rule.'), 'name': attributes.Schema(
'description': _('Description of the firewall rule.'), _('Name for the firewall rule.')
'firewall_policy_id': _('Unique identifier of the firewall policy to ' ),
'which this firewall rule belongs.'), 'description': attributes.Schema(
'shared': _('Shared status of this firewall rule.'), _('Description of the firewall rule.')
'protocol': _('Protocol value for this firewall rule.'), ),
'ip_version': _('Ip_version for this firewall rule.'), 'firewall_policy_id': attributes.Schema(
'source_ip_address': _('Source ip_address for this firewall rule.'), _('Unique identifier of the firewall policy to which this '
'destination_ip_address': _('Destination ip_address for this ' 'firewall rule belongs.')
'firewall rule.'), ),
'source_port': _('Source port range for this firewall rule.'), 'shared': attributes.Schema(
'destination_port': _('Destination port range for this firewall ' _('Shared status of this firewall rule.')
'rule.'), ),
'action': _('Allow or deny action for this firewall rule.'), 'protocol': attributes.Schema(
'enabled': _('Indicates whether this firewall rule is enabled or ' _('Protocol value for this firewall rule.')
'not.'), ),
'position': _('Position of the rule within the firewall policy.'), 'ip_version': attributes.Schema(
'tenant_id': _('Id of the tenant owning the firewall.') _('Ip_version for this firewall rule.')
),
'source_ip_address': attributes.Schema(
_('Source ip_address for this firewall rule.')
),
'destination_ip_address': attributes.Schema(
_('Destination ip_address for this firewall rule.')
),
'source_port': attributes.Schema(
_('Source port range for this firewall rule.')
),
'destination_port': attributes.Schema(
_('Destination port range for this firewall rule.')
),
'action': attributes.Schema(
_('Allow or deny action for this firewall rule.')
),
'enabled': attributes.Schema(
_('Indicates whether this firewall rule is enabled or not.')
),
'position': attributes.Schema(
_('Position of the rule within the firewall policy.')
),
'tenant_id': attributes.Schema(
_('Id of the tenant owning the firewall.')
),
} }
def _show_resource(self): def _show_resource(self):

View File

@ -11,6 +11,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import properties from heat.engine import properties
from heat.engine.resources.neutron import neutron from heat.engine.resources.neutron import neutron
@ -62,16 +63,28 @@ class FloatingIP(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
'router_id': _('ID of the router used as gateway, set when associated ' 'router_id': attributes.Schema(
'with a port.'), _('ID of the router used as gateway, set when associated with a '
'tenant_id': _('The tenant owning this floating IP.'), 'port.')
'floating_network_id': _('ID of the network in which this IP is ' ),
'allocated.'), 'tenant_id': attributes.Schema(
'fixed_ip_address': _('IP address of the associated port, if ' _('The tenant owning this floating IP.')
'specified.'), ),
'floating_ip_address': _('The allocated address of this IP.'), 'floating_network_id': attributes.Schema(
'port_id': _('ID of the port associated with this IP.'), _('ID of the network in which this IP is allocated.')
'show': _('All attributes.') ),
'fixed_ip_address': attributes.Schema(
_('IP address of the associated port, if specified.')
),
'floating_ip_address': attributes.Schema(
_('The allocated address of this IP.')
),
'port_id': attributes.Schema(
_('ID of the port associated with this IP.')
),
'show': attributes.Schema(
_('All attributes.')
),
} }
def add_dependencies(self, deps): def add_dependencies(self, deps):

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
@ -95,23 +96,41 @@ class HealthMonitor(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
'admin_state_up': _('The administrative state of this health ' 'admin_state_up': attributes.Schema(
'monitor.'), _('The administrative state of this health monitor.')
'delay': _('The minimum time in seconds between regular connections ' ),
'of the member.'), 'delay': attributes.Schema(
'expected_codes': _('The list of HTTP status codes expected in ' _('The minimum time in seconds between regular connections '
'response from the member to declare it healthy.'), 'of the member.')
'http_method': _('The HTTP method used for requests by the monitor of ' ),
'type HTTP.'), 'expected_codes': attributes.Schema(
'max_retries': _('Number of permissible connection failures before ' _('The list of HTTP status codes expected in response '
'changing the member status to INACTIVE.'), 'from the member to declare it healthy.')
'timeout': _('Maximum number of seconds for a monitor to wait for a ' ),
'connection to be established before it times out.'), 'http_method': attributes.Schema(
'type': _('One of predefined health monitor types.'), _('The HTTP method used for requests by the monitor of type HTTP.')
'url_path': _('The HTTP path used in the HTTP request used by the ' ),
'monitor to test a member health.'), 'max_retries': attributes.Schema(
'tenant_id': _('Tenant owning the health monitor.'), _('Number of permissible connection failures before changing '
'show': _('All attributes.'), 'the member status to INACTIVE.')
),
'timeout': attributes.Schema(
_('Maximum number of seconds for a monitor to wait for a '
'connection to be established before it times out.')
),
'type': attributes.Schema(
_('One of predefined health monitor types.')
),
'url_path': attributes.Schema(
_('The HTTP path used in the HTTP request used by the monitor '
'to test a member health.')
),
'tenant_id': attributes.Schema(
_('Tenant owning the health monitor.')
),
'show': attributes.Schema(
_('All attributes.')
),
} }
def handle_create(self): def handle_create(self):
@ -285,16 +304,32 @@ class Pool(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
'admin_state_up': _('The administrative state of this pool.'), 'admin_state_up': attributes.Schema(
'name': _('Name of the pool.'), _('The administrative state of this pool.')
'protocol': _('Protocol to balance.'), ),
'subnet_id': _('The subnet for the port on which the members ' 'name': attributes.Schema(
'of the pool will be connected.'), _('Name of the pool.')
'lb_method': _('The algorithm used to distribute load between the ' ),
'members of the pool.'), 'protocol': attributes.Schema(
'description': _('Description of the pool.'), _('Protocol to balance.')
'tenant_id': _('Tenant owning the pool.'), ),
'vip': _('Vip associated with the pool.'), 'subnet_id': attributes.Schema(
_('The subnet for the port on which the members of the pool '
'will be connected.')
),
'lb_method': attributes.Schema(
_('The algorithm used to distribute load between the members '
'of the pool.')
),
'description': attributes.Schema(
_('Description of the pool.')
),
'tenant_id': attributes.Schema(
_('Tenant owning the pool.')
),
'vip': attributes.Schema(
_('Vip associated with the pool.')
),
} }
def validate(self): def validate(self):
@ -487,15 +522,28 @@ class PoolMember(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
'admin_state_up': _('The administrative state of this pool ' 'admin_state_up': attributes.Schema(
'member.'), _('The administrative state of this pool member.')
'tenant_id': _('Tenant owning the pool member.'), ),
'weight': _('Weight of the pool member in the pool.'), 'tenant_id': attributes.Schema(
'address': _('IP address of the pool member.'), _('Tenant owning the pool member.')
'pool_id': _('The ID of the load balancing pool.'), ),
'protocol_port': _('TCP port on which the pool member listens for' 'weight': attributes.Schema(
'requests or connections.'), _('Weight of the pool member in the pool.')
'show': _('All attributes.'), ),
'address': attributes.Schema(
_('IP address of the pool member.')
),
'pool_id': attributes.Schema(
_('The ID of the load balancing pool.')
),
'protocol_port': attributes.Schema(
_('TCP port on which the pool member listens for requests or '
'connections.')
),
'show': attributes.Schema(
_('All attributes.')
),
} }
def handle_create(self): def handle_create(self):

View File

@ -11,6 +11,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
@ -43,8 +44,12 @@ class MeteringLabel(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
'name': _('Name of the metering label.'), 'name': attributes.Schema(
'description': _('Description of the metering label.'), _('Name of the metering label.')
),
'description': attributes.Schema(
_('Description of the metering label.')
),
} }
def handle_create(self): def handle_create(self):
@ -111,12 +116,18 @@ class MeteringRule(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
'direction': _('The direction in which metering rule is applied.'), 'direction': attributes.Schema(
'excluded': _('Exclude state for cidr.'), _('The direction in which metering rule is applied.')
'metering_label_id': _('The metering label ID to associate with ' ),
'this metering rule..'), 'excluded': attributes.Schema(
'remote_ip_prefix': _('CIDR to be associated with this metering ' _('Exclude state for cidr.')
'rule.'), ),
'metering_label_id': attributes.Schema(
_('The metering label ID to associate with this metering rule.')
),
'remote_ip_prefix': attributes.Schema(
_('CIDR to be associated with this metering rule.')
),
} }
def handle_create(self): def handle_create(self):

View File

@ -11,6 +11,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
@ -76,12 +77,24 @@ class Net(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
"status": _("The status of the network."), "status": attributes.Schema(
"name": _("The name of the network."), _("The status of the network.")
"subnets": _("Subnets of this network."), ),
"admin_state_up": _("The administrative status of the network."), "name": attributes.Schema(
"tenant_id": _("The tenant owning this network."), _("The name of the network.")
"show": _("All attributes."), ),
"subnets": attributes.Schema(
_("Subnets of this network.")
),
"admin_state_up": attributes.Schema(
_("The administrative status of the network.")
),
"tenant_id": attributes.Schema(
_("The tenant owning this network.")
),
"show": attributes.Schema(
_("All attributes.")
),
} }
def handle_create(self): def handle_create(self):

View File

@ -15,6 +15,7 @@
# limitations under the License. # limitations under the License.
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
@ -123,8 +124,12 @@ class NetworkGateway(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
"default": _("A boolean value of default flag."), "default": attributes.Schema(
"show": _("All attributes.") _("A boolean value of default flag.")
),
"show": attributes.Schema(
_("All attributes.")
),
} }
def _show_resource(self): def _show_resource(self):

View File

@ -11,6 +11,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import properties from heat.engine import properties
from heat.engine.resources.neutron import neutron from heat.engine.resources.neutron import neutron
@ -150,19 +151,43 @@ class Port(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
"admin_state_up": _("The administrative state of this port."), "admin_state_up": attributes.Schema(
"device_id": _("Unique identifier for the device."), _("The administrative state of this port.")
"device_owner": _("Name of the network owning the port."), ),
"fixed_ips": _("Fixed IP addresses."), "device_id": attributes.Schema(
"mac_address": _("MAC address of the port."), _("Unique identifier for the device.")
"name": _("Friendly name of the port."), ),
"network_id": _("Unique identifier for the network owning the port."), "device_owner": attributes.Schema(
"security_groups": _("A list of security groups for the port."), _("Name of the network owning the port.")
"status": _("The status of the port."), ),
"tenant_id": _("Tenant owning the port."), "fixed_ips": attributes.Schema(
"allowed_address_pairs": _("Additional MAC/IP address pairs allowed " _("Fixed IP addresses.")
"to pass through a port."), ),
"show": _("All attributes."), "mac_address": attributes.Schema(
_("MAC address of the port.")
),
"name": attributes.Schema(
_("Friendly name of the port.")
),
"network_id": attributes.Schema(
_("Unique identifier for the network owning the port.")
),
"security_groups": attributes.Schema(
_("A list of security groups for the port.")
),
"status": attributes.Schema(
_("The status of the port.")
),
"tenant_id": attributes.Schema(
_("Tenant owning the port.")
),
"allowed_address_pairs": attributes.Schema(
_("Additional MAC/IP address pairs allowed to pass through "
"a port.")
),
"show": attributes.Schema(
_("All attributes.")
),
} }
def validate(self): def validate(self):

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
@ -61,9 +62,15 @@ class ProviderNet(net.Net):
} }
attributes_schema = { attributes_schema = {
"status": _("The status of the network."), "status": attributes.Schema(
"subnets": _("Subnets of this network."), _("The status of the network.")
"show": _("All attributes."), ),
"subnets": attributes.Schema(
_("Subnets of this network.")
),
"show": attributes.Schema(
_("All attributes.")
),
} }
def validate(self): def validate(self):

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import properties from heat.engine import properties
from heat.engine.resources.neutron import neutron from heat.engine.resources.neutron import neutron
@ -86,12 +87,24 @@ class Router(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
"status": _("The status of the router."), "status": attributes.Schema(
"external_gateway_info": _("Gateway network for the router."), _("The status of the router.")
"name": _("Friendly name of the router."), ),
"admin_state_up": _("Administrative state of the router."), "external_gateway_info": attributes.Schema(
"tenant_id": _("Tenant owning the router."), _("Gateway network for the router.")
"show": _("All attributes."), ),
"name": attributes.Schema(
_("Friendly name of the router.")
),
"admin_state_up": attributes.Schema(
_("Administrative state of the router.")
),
"tenant_id": attributes.Schema(
_("Tenant owning the router.")
),
"show": attributes.Schema(
_("All attributes.")
),
} }
def add_dependencies(self, deps): def add_dependencies(self, deps):

View File

@ -11,6 +11,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
@ -140,18 +141,39 @@ class Subnet(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
"name": _("Friendly name of the subnet."), "name": attributes.Schema(
"network_id": _("Parent network of the subnet."), _("Friendly name of the subnet.")
"tenant_id": _("Tenant owning the subnet."), ),
"allocation_pools": _("Ip allocation pools and their ranges."), "network_id": attributes.Schema(
"gateway_ip": _("Ip of the subnet's gateway."), _("Parent network of the subnet.")
"host_routes": _("Additional routes for this subnet."), ),
"ip_version": _("Ip version for the subnet."), "tenant_id": attributes.Schema(
"cidr": _("CIDR block notation for this subnet."), _("Tenant owning the subnet.")
"dns_nameservers": _("List of dns nameservers."), ),
"enable_dhcp": _("'true' if DHCP is enabled for this subnet; 'false' " "allocation_pools": attributes.Schema(
"otherwise."), _("Ip allocation pools and their ranges.")
"show": _("All attributes."), ),
"gateway_ip": attributes.Schema(
_("Ip of the subnet's gateway.")
),
"host_routes": attributes.Schema(
_("Additional routes for this subnet.")
),
"ip_version": attributes.Schema(
_("Ip version for the subnet.")
),
"cidr": attributes.Schema(
_("CIDR block notation for this subnet.")
),
"dns_nameservers": attributes.Schema(
_("List of dns nameservers.")
),
"enable_dhcp": attributes.Schema(
_("'true' if DHCP is enabled for this subnet; 'false' otherwise.")
),
"show": attributes.Schema(
_("All attributes.")
),
} }
@classmethod @classmethod

View File

@ -11,6 +11,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
@ -72,17 +73,32 @@ class VPNService(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
'admin_state_up': _('The administrative state of the vpn service.'), 'admin_state_up': attributes.Schema(
'description': _('The description of the vpn service.'), _('The administrative state of the vpn service.')
'name': _('The name of the vpn service.'), ),
'router_id': _('The unique identifier of the router to which the vpn ' 'description': attributes.Schema(
'service was inserted.'), _('The description of the vpn service.')
'status': _('The status of the vpn service.'), ),
'subnet_id': _('The unique identifier of the subnet in which the vpn ' 'name': attributes.Schema(
'service was created.'), _('The name of the vpn service.')
'tenant_id': _('The unique identifier of the tenant owning the vpn ' ),
'service.'), 'router_id': attributes.Schema(
'show': _('All attributes.'), _('The unique identifier of the router to which the vpn service '
'was inserted.')
),
'status': attributes.Schema(
_('The status of the vpn service.')
),
'subnet_id': attributes.Schema(
_('The unique identifier of the subnet in which the vpn service '
'was created.')
),
'tenant_id': attributes.Schema(
_('The unique identifier of the tenant owning the vpn service.')
),
'show': attributes.Schema(
_('All attributes.')
),
} }
def _show_resource(self): def _show_resource(self):
@ -240,34 +256,66 @@ class IPsecSiteConnection(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
'admin_state_up': _('The administrative state of the ipsec site ' 'admin_state_up': attributes.Schema(
'connection.'), _('The administrative state of the ipsec site connection.')
'auth_mode': _('The authentication mode of the ipsec site ' ),
'connection.'), 'auth_mode': attributes.Schema(
'description': _('The description of the ipsec site connection.'), _('The authentication mode of the ipsec site connection.')
'dpd': _('The dead peer detection protocol configuration of the ipsec ' ),
'site connection.'), 'description': attributes.Schema(
'ikepolicy_id': _('The unique identifier of ike policy associated ' _('The description of the ipsec site connection.')
'with the ipsec site connection.'), ),
'initiator': _('The initiator of the ipsec site connection.'), 'dpd': attributes.Schema(
'ipsecpolicy_id': _('The unique identifier of ipsec policy ' _('The dead peer detection protocol configuration of the ipsec '
'associated with the ipsec site connection.'), 'site connection.')
'mtu': _('The maximum transmission unit size (in bytes) of the ipsec ' ),
'site connection.'), 'ikepolicy_id': attributes.Schema(
'name': _('The name of the ipsec site connection.'), _('The unique identifier of ike policy associated with the ipsec '
'peer_address': _('The remote branch router public IPv4 address or ' 'site connection.')
'IPv6 address or FQDN.'), ),
'peer_cidrs': _('The remote subnet(s) in CIDR format of the ipsec ' 'initiator': attributes.Schema(
'site connection.'), _('The initiator of the ipsec site connection.')
'peer_id': _('The remote branch router identity of the ipsec site ' ),
'connection.'), 'ipsecpolicy_id': attributes.Schema(
'psk': _('The pre-shared key string of the ipsec site connection.'), _('The unique identifier of ipsec policy associated with the '
'route_mode': _('The route mode of the ipsec site connection.'), 'ipsec site connection.')
'status': _('The status of the ipsec site connection.'), ),
'tenant_id': _('The unique identifier of the tenant owning the ipsec ' 'mtu': attributes.Schema(
'site connection.'), _('The maximum transmission unit size (in bytes) of the ipsec '
'vpnservice_id': _('The unique identifier of vpn service associated ' 'site connection.')
'with the ipsec site connection.') ),
'name': attributes.Schema(
_('The name of the ipsec site connection.')
),
'peer_address': attributes.Schema(
_('The remote branch router public IPv4 address or IPv6 address '
'or FQDN.')
),
'peer_cidrs': attributes.Schema(
_('The remote subnet(s) in CIDR format of the ipsec site '
'connection.')
),
'peer_id': attributes.Schema(
_('The remote branch router identity of the ipsec site '
'connection.')
),
'psk': attributes.Schema(
_('The pre-shared key string of the ipsec site connection.')
),
'route_mode': attributes.Schema(
_('The route mode of the ipsec site connection.')
),
'status': attributes.Schema(
_('The status of the ipsec site connection.')
),
'tenant_id': attributes.Schema(
_('The unique identifier of the tenant owning the ipsec site '
'connection.')
),
'vpnservice_id': attributes.Schema(
_('The unique identifier of vpn service associated with the ipsec '
'site connection.')
),
} }
def _show_resource(self): def _show_resource(self):
@ -391,20 +439,34 @@ class IKEPolicy(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
'auth_algorithm': _('The authentication hash algorithm used by the ike' 'auth_algorithm': attributes.Schema(
' policy.'), _('The authentication hash algorithm used by the ike policy.')
'description': _('The description of the ike policy.'), ),
'encryption_algorithm': _('The encryption algorithm used by the ike ' 'description': attributes.Schema(
'policy.'), _('The description of the ike policy.')
'ike_version': _('The version of the ike policy.'), ),
'lifetime': _('The safety assessment lifetime configuration for the ' 'encryption_algorithm': attributes.Schema(
'ike policy.'), _('The encryption algorithm used by the ike policy.')
'name': _('The name of the ike policy.'), ),
'pfs': _('The perfect forward secrecy of the ike policy.'), 'ike_version': attributes.Schema(
'phase1_negotiation_mode': _('The negotiation mode of the ike ' _('The version of the ike policy.')
'policy.'), ),
'tenant_id': _('The unique identifier of the tenant owning the ike ' 'lifetime': attributes.Schema(
'policy.'), _('The safety assessment lifetime configuration for the ike '
'policy.')
),
'name': attributes.Schema(
_('The name of the ike policy.')
),
'pfs': attributes.Schema(
_('The perfect forward secrecy of the ike policy.')
),
'phase1_negotiation_mode': attributes.Schema(
_('The negotiation mode of the ike policy.')
),
'tenant_id': attributes.Schema(
_('The unique identifier of the tenant owning the ike policy.')
),
} }
def _show_resource(self): def _show_resource(self):
@ -529,19 +591,34 @@ class IPsecPolicy(neutron.NeutronResource):
} }
attributes_schema = { attributes_schema = {
'auth_algorithm': _('The authentication hash algorithm of the ipsec ' 'auth_algorithm': attributes.Schema(
'policy.'), _('The authentication hash algorithm of the ipsec policy.')
'description': _('The description of the ipsec policy.'), ),
'encapsulation_mode': _('The encapsulation mode of the ipsec policy.'), 'description': attributes.Schema(
'encryption_algorithm': _('The encryption algorithm of the ipsec ' _('The description of the ipsec policy.')
'policy.'), ),
'lifetime': _('The safety assessment lifetime configuration of the ' 'encapsulation_mode': attributes.Schema(
'ipsec policy.'), _('The encapsulation mode of the ipsec policy.')
'name': _('The name of the ipsec policy.'), ),
'pfs': _('The perfect forward secrecy of the ipsec policy.'), 'encryption_algorithm': attributes.Schema(
'tenant_id': _('The unique identifier of the tenant owning the ' _('The encryption algorithm of the ipsec policy.')
'ipsec policy.'), ),
'transform_protocol': _('The transform protocol of the ipsec policy.') 'lifetime': attributes.Schema(
_('The safety assessment lifetime configuration of the ipsec '
'policy.')
),
'name': attributes.Schema(
_('The name of the ipsec policy.')
),
'pfs': attributes.Schema(
_('The perfect forward secrecy of the ipsec policy.')
),
'tenant_id': attributes.Schema(
_('The unique identifier of the tenant owning the ipsec policy.')
),
'transform_protocol': attributes.Schema(
_('The transform protocol of the ipsec policy.')
),
} }
def _show_resource(self): def _show_resource(self):

View File

@ -11,6 +11,7 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import properties from heat.engine import properties
from heat.engine import resource from heat.engine import resource
@ -33,8 +34,12 @@ class NovaFloatingIp(resource.Resource):
} }
attributes_schema = { attributes_schema = {
'pool': _('Pool from which floating IP is allocated.'), 'pool': attributes.Schema(
'ip': _('Allocated floating IP address.') _('Pool from which floating IP is allocated.')
),
'ip': attributes.Schema(
_('Allocated floating IP address.')
),
} }
def __init__(self, name, json_snippet, stack): def __init__(self, name, json_snippet, stack):

View File

@ -14,6 +14,7 @@
from novaclient import exceptions as nova_exceptions from novaclient import exceptions as nova_exceptions
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
from heat.engine import resource from heat.engine import resource
@ -62,8 +63,12 @@ class KeyPair(resource.Resource):
} }
attributes_schema = { attributes_schema = {
'public_key': _('The public key.'), 'public_key': attributes.Schema(
'private_key': _('The private key if it has been saved.') _('The public key.')
),
'private_key': attributes.Schema(
_('The private key if it has been saved.')
),
} }
def __init__(self, name, json_snippet, stack): def __init__(self, name, json_snippet, stack):

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine.clients import troveclient from heat.engine.clients import troveclient
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
@ -162,8 +163,12 @@ class OSDBInstance(resource.Resource):
} }
attributes_schema = { attributes_schema = {
"hostname": _("Hostname of the instance"), "hostname": attributes.Schema(
"href": _("Api endpoint reference of the instance") _("Hostname of the instance")
),
"href": attributes.Schema(
_("Api endpoint reference of the instance")
),
} }
def __init__(self, name, json_snippet, stack): def __init__(self, name, json_snippet, stack):

View File

@ -16,6 +16,7 @@ import string
from six.moves import xrange from six.moves import xrange
from heat.engine import attributes
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
from heat.engine import resource from heat.engine import resource
@ -62,8 +63,10 @@ class RandomString(resource.Resource):
} }
attributes_schema = { attributes_schema = {
'value': _('The random string generated by this resource. This value ' 'value': attributes.Schema(
'is also available by referencing the resource.'), _('The random string generated by this resource. This value is '
'also available by referencing the resource.')
),
} }
_sequences = { _sequences = {

View File

@ -14,6 +14,7 @@
import copy import copy
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import constraints from heat.engine import constraints
from heat.engine import parser from heat.engine import parser
from heat.engine import properties from heat.engine import properties
@ -85,7 +86,9 @@ class ResourceGroup(stack_resource.StackResource):
} }
attributes_schema = { attributes_schema = {
"refs": _("A list of resource IDs for the resources in the group") "refs": attributes.Schema(
_("A list of resource IDs for the resources in the group")
),
} }
def validate(self): def validate(self):

View File

@ -13,6 +13,7 @@
from six.moves.urllib import parse as urlparse from six.moves.urllib import parse as urlparse
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
@ -93,8 +94,12 @@ class S3Bucket(resource.Resource):
} }
attributes_schema = { attributes_schema = {
'DomainName': _('The DNS name of the specified bucket.'), 'DomainName': attributes.Schema(
'WebsiteURL': _('The website endpoint for the specified bucket.') _('The DNS name of the specified bucket.')
),
'WebsiteURL': attributes.Schema(
_('The website endpoint for the specified bucket.')
),
} }
def tags_to_headers(self): def tags_to_headers(self):

View File

@ -299,11 +299,16 @@ class Server(stack_user.StackUser):
} }
attributes_schema = { attributes_schema = {
'show': _('A dict of all server details as returned by the API.'), 'show': attributes.Schema(
'addresses': _('A dict of all network addresses with corresponding ' _('A dict of all server details as returned by the API.')
'port_id.'), ),
'networks': _('A dict of assigned network addresses of the form: ' 'addresses': attributes.Schema(
'{"public": [ip1, ip2...], "private": [ip3, ip4]}.'), _('A dict of all network addresses with corresponding port_id.')
),
'networks': attributes.Schema(
_('A dict of assigned network addresses of the form: '
'{"public": [ip1, ip2...], "private": [ip3, ip4]}.')
),
'first_address': attributes.Schema( 'first_address': attributes.Schema(
_('Convenience attribute to fetch the first assigned network ' _('Convenience attribute to fetch the first assigned network '
'address, or an empty string if nothing has been assigned at ' 'address, or an empty string if nothing has been assigned at '
@ -316,11 +321,17 @@ class Server(stack_user.StackUser):
'[<server name>, networks, <network name>, 0]}"') '[<server name>, networks, <network name>, 0]}"')
) )
), ),
'instance_name': _('AWS compatible instance name.'), 'instance_name': attributes.Schema(
'accessIPv4': _('The manually assigned alternative public IPv4 ' _('AWS compatible instance name.')
'address of the server.'), ),
'accessIPv6': _('The manually assigned alternative public IPv6 ' 'accessIPv4': attributes.Schema(
'address of the server.'), _('The manually assigned alternative public IPv4 address '
'of the server.')
),
'accessIPv6': attributes.Schema(
_('The manually assigned alternative public IPv6 address '
'of the server.')
),
} }
# Server host name limit to 53 characters by due to typical default # Server host name limit to 53 characters by due to typical default

View File

@ -14,6 +14,7 @@
import heatclient.exc as heat_exp import heatclient.exc as heat_exp
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
from heat.engine import resource from heat.engine import resource
@ -140,7 +141,9 @@ class SoftwareConfig(resource.Resource):
} }
attributes_schema = { attributes_schema = {
"config": _("The config value of the software config.") "config": attributes.Schema(
_("The config value of the software config.")
),
} }
def handle_create(self): def handle_create(self):

View File

@ -19,6 +19,7 @@ import uuid
import heatclient.exc as heat_exp import heatclient.exc as heat_exp
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import constraints from heat.engine import constraints
from heat.engine import function from heat.engine import function
from heat.engine import properties from heat.engine import properties
@ -149,10 +150,15 @@ class SoftwareDeployment(signal_responder.SignalResponder):
} }
attributes_schema = { attributes_schema = {
STDOUT: _("Captured stdout from the configuration execution."), STDOUT: attributes.Schema(
STDERR: _("Captured stderr from the configuration execution."), _("Captured stdout from the configuration execution.")
STATUS_CODE: _("Returned status code from the configuration " ),
"execution"), STDERR: attributes.Schema(
_("Captured stderr from the configuration execution.")
),
STATUS_CODE: attributes.Schema(
_("Returned status code from the configuration execution")
),
} }
def _signal_transport_cfn(self): def _signal_transport_cfn(self):

View File

@ -14,6 +14,7 @@
from six.moves.urllib import parse as urlparse from six.moves.urllib import parse as urlparse
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import properties from heat.engine import properties
from heat.engine import resource from heat.engine import resource
@ -64,12 +65,24 @@ class SwiftContainer(resource.Resource):
} }
attributes_schema = { attributes_schema = {
'DomainName': _('The host from the container URL.'), 'DomainName': attributes.Schema(
'WebsiteURL': _('The URL of the container.'), _('The host from the container URL.')
'RootURL': _('The parent URL of the container.'), ),
'ObjectCount': _('The number of objects stored in the container.'), 'WebsiteURL': attributes.Schema(
'BytesUsed': _('The number of bytes stored in the container.'), _('The URL of the container.')
'HeadContainer': _('A map containing all headers for the container.') ),
'RootURL': attributes.Schema(
_('The parent URL of the container.')
),
'ObjectCount': attributes.Schema(
_('The number of objects stored in the container.')
),
'BytesUsed': attributes.Schema(
_('The number of bytes stored in the container.')
),
'HeadContainer': attributes.Schema(
_('A map containing all headers for the container.')
),
} }
def physical_resource_name(self): def physical_resource_name(self):

View File

@ -12,6 +12,7 @@
# under the License. # under the License.
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
from heat.engine import resource from heat.engine import resource
@ -153,8 +154,12 @@ class AccessKey(resource.Resource):
} }
attributes_schema = { attributes_schema = {
'UserName': _('Username associated with the AccessKey.'), 'UserName': attributes.Schema(
'SecretAccessKey': _('Keypair secret key.'), _('Username associated with the AccessKey.')
),
'SecretAccessKey': attributes.Schema(
_('Keypair secret key.')
),
} }
def __init__(self, name, json_snippet, stack): def __init__(self, name, json_snippet, stack):

View File

@ -14,6 +14,7 @@
import json import json
from heat.common import exception from heat.common import exception
from heat.engine import attributes
from heat.engine import clients from heat.engine import clients
from heat.engine import constraints from heat.engine import constraints
from heat.engine import properties from heat.engine import properties
@ -482,20 +483,39 @@ class CinderVolume(Volume):
} }
attributes_schema = { attributes_schema = {
'availability_zone': _('The availability zone in which the volume is ' 'availability_zone': attributes.Schema(
' located.'), _('The availability zone in which the volume is located.')
'size': _('The size of the volume in GB.'), ),
'snapshot_id': _('The snapshot the volume was created from, if any.'), 'size': attributes.Schema(
'display_name': _('Name of the volume.'), _('The size of the volume in GB.')
'display_description': _('Description of the volume.'), ),
'volume_type': _('The type of the volume mapping to a backend, if ' 'snapshot_id': attributes.Schema(
'any.'), _('The snapshot the volume was created from, if any.')
'metadata': _('Key/value pairs associated with the volume.'), ),
'source_volid': _('The volume used as source, if any.'), 'display_name': attributes.Schema(
'status': _('The current status of the volume.'), _('Name of the volume.')
'created_at': _('The timestamp indicating volume creation.'), ),
'bootable': _('Boolean indicating if the volume can be booted or ' 'display_description': attributes.Schema(
'not.'), _('Description of the volume.')
),
'volume_type': attributes.Schema(
_('The type of the volume mapping to a backend, if any.')
),
'metadata': attributes.Schema(
_('Key/value pairs associated with the volume.')
),
'source_volid': attributes.Schema(
_('The volume used as source, if any.')
),
'status': attributes.Schema(
_('The current status of the volume.')
),
'created_at': attributes.Schema(
_('The timestamp indicating volume creation.')
),
'bootable': attributes.Schema(
_('Boolean indicating if the volume can be booted or not.')
),
} }
_volume_creating_status = ['creating', 'restoring-backup', 'downloading'] _volume_creating_status = ['creating', 'restoring-backup', 'downloading']

View File

@ -15,6 +15,7 @@ import json
from heat.common import exception from heat.common import exception
from heat.common import identifier from heat.common import identifier
from heat.engine import attributes
from heat.engine import constraints from heat.engine import constraints
from heat.engine import function from heat.engine import function
from heat.engine import properties from heat.engine import properties
@ -178,8 +179,10 @@ class WaitCondition(resource.Resource):
} }
attributes_schema = { attributes_schema = {
'Data': _('JSON serialized dict containing data associated with wait ' 'Data': attributes.Schema(
'condition signals sent to the handle.'), _('JSON serialized dict containing data associated with wait '
'condition signals sent to the handle.')
),
} }
def __init__(self, name, json_snippet, stack): def __init__(self, name, json_snippet, stack):