]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Document aws loadbalancer properties
authorLiang Chen <cbjchen@cn.ibm.com>
Wed, 18 Sep 2013 09:58:38 +0000 (17:58 +0800)
committerLiang Chen <cbjchen@cn.ibm.com>
Thu, 19 Sep 2013 02:57:50 +0000 (10:57 +0800)
This add descriptions to the properties of aws loadbalancer.

Fixes bug #1224144

Change-Id: I51bb7f05e543665c0cd97675aa051ed47bf8fb66

heat/engine/resources/loadbalancer.py

index b3b3e10a90374db666f4b5a3dcde210832c05521..700158e069282666699897ec0950a31e8d899d92 100644 (file)
@@ -197,47 +197,91 @@ lb_template = r'''
 class LoadBalancer(stack_resource.StackResource):
 
     listeners_schema = {
-        'InstancePort': {'Type': 'Number',
-                         'Required': True},
-        'LoadBalancerPort': {'Type': 'Number',
-                             'Required': True},
-        'Protocol': {'Type': 'String',
-                     'Required': True,
-                     'AllowedValues': ['TCP', 'HTTP']},
-        'SSLCertificateId': {'Type': 'String',
-                             'Implemented': False},
-        'PolicyNames': {'Type': 'List',
-                        'Implemented': False}
+        'InstancePort': {
+            'Type': 'Number',
+            'Required': True,
+            'Description': _('TCP port on which the instance server is'
+                             ' listening.')},
+        'LoadBalancerPort': {
+            'Type': 'Number',
+            'Required': True,
+            'Description': _('The external load balancer port number.')},
+        'Protocol': {
+            'Type': 'String',
+            'Required': True,
+            'AllowedValues': ['TCP', 'HTTP'],
+            'Description': _('The load balancer transport protocol to use.')},
+        'SSLCertificateId': {
+            'Type': 'String',
+            'Implemented': False,
+            'Description': _('Not Implemented.')},
+        'PolicyNames': {
+            'Type': 'List',
+            'Implemented': False,
+            'Description': _('Not Implemented.')}
     }
     healthcheck_schema = {
-        'HealthyThreshold': {'Type': 'Number',
-                             'Required': True},
-        'Interval': {'Type': 'Number',
-                     'Required': True},
-        'Target': {'Type': 'String',
-                   'Required': True},
-        'Timeout': {'Type': 'Number',
-                    'Required': True},
-        'UnhealthyThreshold': {'Type': 'Number',
-                               'Required': True},
+        'HealthyThreshold': {
+            'Type': 'Number',
+            'Required': True,
+            'Description': _('The number of consecutive health probe successes'
+                             ' required before moving the instance to the'
+                             ' healthy state.')},
+        'Interval': {
+            'Type': 'Number',
+            'Required': True,
+            'Description': _('The approximate interval, in seconds, between'
+                             ' health checks of an individual instance.')},
+        'Target': {
+            'Type': 'String',
+            'Required': True,
+            'Description': _('The port being checked.')},
+        'Timeout': {
+            'Type': 'Number',
+            'Required': True,
+            'Description': _('Health probe timeout, in seconds.')},
+        'UnhealthyThreshold': {
+            'Type': 'Number',
+            'Required': True,
+            'Description': _('The number of consecutive health probe failures'
+                             ' required before moving the instance to the'
+                             ' unhealthy state')},
     }
 
     properties_schema = {
-        'AvailabilityZones': {'Type': 'List',
-                              'Required': True},
-        'HealthCheck': {'Type': 'Map',
-                        'Schema': healthcheck_schema},
-        'Instances': {'Type': 'List'},
-        'Listeners': {'Type': 'List', 'Required': True,
-                      'Schema': {'Type': 'Map', 'Schema': listeners_schema}},
-        'AppCookieStickinessPolicy': {'Type': 'String',
-                                      'Implemented': False},
-        'LBCookieStickinessPolicy': {'Type': 'String',
-                                     'Implemented': False},
-        'SecurityGroups': {'Type': 'String',
-                           'Implemented': False},
-        'Subnets': {'Type': 'List',
-                    'Implemented': False}
+        'AvailabilityZones': {
+            'Type': 'List',
+            'Required': True,
+            'Description': _('The Availability Zones in which to create the'
+                             ' load balancer.')},
+        'HealthCheck': {
+            'Type': 'Map',
+            'Schema': healthcheck_schema,
+            'Description': _('An application health check for the'
+                             ' instances.')},
+        'Instances': {
+            'Type': 'List',
+            'Description': _('The list of instance IDs load balanced.')},
+        'Listeners': {
+            'Type': 'List', 'Required': True,
+            'Schema': {'Type': 'Map', 'Schema': listeners_schema},
+            'Description': _('One or more listeners for this load balancer.')},
+        'AppCookieStickinessPolicy': {
+            'Type': 'String',
+            'Implemented': False,
+            'Description': _('Not Implemented.')},
+        'LBCookieStickinessPolicy': {
+            'Type': 'String',
+            'Implemented': False,
+            'Description': _('Not Implemented.')},
+        'SecurityGroups': {
+            'Type': 'String',
+            'Implemented': False,
+            'Description': _('Not Implemented.')},
+        'Subnets': {
+            'Type': 'List',
+            'Implemented': False,
+            'Description': _('Not Implemented.')}
     }
     attributes_schema = {
         "CanonicalHostedZoneName": ("The name of the hosted zone that is "