How to use the heat.engine.properties.Schema.STRING function in heat

To help you get started, we’ve selected a few heat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github openstack / heat / heat / engine / resources / openstack / heat / test_resource.py View on Github external
UPDATE_WAIT_SECS: properties.Schema(
                    properties.Schema.NUMBER,
                    _('Seconds to wait after an update. '
                      'Defaults to the global wait_secs'),
                    update_allowed=True,
                ),
                DELETE_WAIT_SECS: properties.Schema(
                    properties.Schema.NUMBER,
                    _('Seconds to wait after a delete. '
                      'Defaults to the global wait_secs'),
                    update_allowed=True,
                ),
            }
        ),
        CLIENT_NAME: properties.Schema(
            properties.Schema.STRING,
            _('Client to poll.'),
            default='',
            update_allowed=True
        ),
        ENTITY_NAME: properties.Schema(
            properties.Schema.STRING,
            _('Client entity to poll.'),
            default='',
            update_allowed=True
        ),
    }

    attributes_schema = {
        OUTPUT: attributes.Schema(
            _('The string that was stored. This value is '
              'also available by referencing the resource.'),
github openstack / heat / heat / engine / resources / openstack / senlin / receiver.py View on Github external
),
        ACTION: properties.Schema(
            properties.Schema.STRING,
            _('The action to be executed when the receiver is signaled.'),
            required=True,
            constraints=[
                constraints.AllowedValues(_ACTIONS)
            ]
        ),
        NAME: properties.Schema(
            properties.Schema.STRING,
            _('Name of the senlin receiver. By default, '
              'physical resource name is used.'),
        ),
        TYPE: properties.Schema(
            properties.Schema.STRING,
            _('Type of receiver.'),
            default=WEBHOOK,
            constraints=[
                constraints.AllowedValues(_TYPES)
            ]
        ),
        PARAMS: properties.Schema(
            properties.Schema.MAP,
            _('The parameters passed to action when the receiver '
              'is signaled.'),
        ),
    }

    attributes_schema = {
        ATTR_CHANNEL: attributes.Schema(
            _("The channel for receiving signals."),
github openstack / heat / heat / engine / resources / openstack / sahara / cluster.py View on Github external
HADOOP_VERSION: properties.Schema(
            properties.Schema.STRING,
            _('Version of Hadoop running on instances.'),
            required=True,
        ),
        CLUSTER_TEMPLATE_ID: properties.Schema(
            properties.Schema.STRING,
            _('ID of the Cluster Template used for '
              'Node Groups and configurations.'),
            constraints=[
                constraints.CustomConstraint('sahara.cluster_template')
            ],
            required=True
        ),
        KEY_NAME: properties.Schema(
            properties.Schema.STRING,
            _('Keypair added to instances to make them accessible for user.'),
            constraints=[
                constraints.CustomConstraint('nova.keypair')
            ],
        ),
        IMAGE: properties.Schema(
            properties.Schema.STRING,
            _('Name or UUID of the image used to boot Hadoop nodes.'),
            support_status=support.SupportStatus(
                status=support.HIDDEN,
                version='6.0.0',
                previous_status=support.SupportStatus(
                    status=support.DEPRECATED,
                    message=_('Use property %s.') % IMAGE_ID,
                    version='2015.1',
                    previous_status=support.SupportStatus(version='2014.2'))
github openstack / heat / heat / engine / resources / wait_condition.py View on Github external
class WaitCondition(resource.Resource):
    PROPERTIES = (
        HANDLE, TIMEOUT, COUNT,
    ) = (
        'Handle', 'Timeout', 'Count',
    )

    ATTRIBUTES = (
        DATA,
    ) = (
        'Data',
    )

    properties_schema = {
        HANDLE: properties.Schema(
            properties.Schema.STRING,
            _('A reference to the wait condition handle used to signal this '
              'wait condition.'),
            required=True
        ),
        TIMEOUT: properties.Schema(
            properties.Schema.NUMBER,
            _('The number of seconds to wait for the correct number of '
              'signals to arrive.'),
            required=True,
            constraints=[
                constraints.Range(1, 43200),
            ]
        ),
        COUNT: properties.Schema(
            properties.Schema.NUMBER,
            _('The number of success signals that must be received before '
github F5Networks / f5-openstack-heat-plugins / f5_heat / resources / f5_bigip_device.py View on Github external
'password'
    )

    properties_schema = {
        IP: properties.Schema(
            properties.Schema.STRING,
            _('IP address of BigIP device.'),
            required=True
        ),
        USERNAME: properties.Schema(
            properties.Schema.STRING,
            _('Username for logging into the BigIP.'),
            required=True
        ),
        PASSWORD: properties.Schema(
            properties.Schema.STRING,
            _('Password for logging into the BigIP.'),
            required=True
        )
    }

    def get_bigip(self):
        return ManagementRoot(
            self.properties[self.IP],
            self.properties[self.USERNAME],
            self.properties[self.PASSWORD]
        )

    def handle_create(self):
        '''Create the BigIP resource.

        Attempt to initialize a bigip connection to test connectivity
github openstack / heat / heat / engine / resources / aws / s3 / s3.py View on Github external
),
            }
        ),
        TAGS: properties.Schema(
            properties.Schema.LIST,
            _('Tags to attach to the bucket.'),
            schema=properties.Schema(
                properties.Schema.MAP,
                schema={
                    TAG_KEY: properties.Schema(
                        properties.Schema.STRING,
                        _('The tag key name.'),
                        required=True
                    ),
                    TAG_VALUE: properties.Schema(
                        properties.Schema.STRING,
                        _('The tag value.'),
                        required=True
                    ),
                },
            )
        ),
    }

    attributes_schema = {
        DOMAIN_NAME: attributes.Schema(
            _('The DNS name of the specified bucket.'),
            type=attributes.Schema.STRING
        ),
        WEBSITE_URL: attributes.Schema(
            _('The website endpoint for the specified bucket.'),
            type=attributes.Schema.STRING
github Juniper / contrail-heat / contrail_heat / resources / attach_policy.py View on Github external
PROPERTIES = (
        NETWORK, POLICY, SEQUENCE
    ) = (
        'network', 'policy', 'sequence'
    )

    _SEQUENCE_KEYS = (
        MAJOR, MINOR
    ) = (
        'major', 'minor'
    )

    properties_schema = {
        NETWORK: properties.Schema(
            properties.Schema.STRING,
            description=_('The network id or fq_name_string'),
            required=True),
        POLICY: properties.Schema(
            properties.Schema.STRING,
            description=_('The policy id or fq_name_string'),
            required=True),
        SEQUENCE: properties.Schema(
            properties.Schema.MAP,
            _('Order of the policy'),
            schema={
                MAJOR: properties.Schema(
                    properties.Schema.INTEGER,
                    _('Major number to define the order of this policy'),
                    default=0,
                ),
                MINOR: properties.Schema(
github openstack / heat / contrib / rackspace / rackspace / resources / cloud_dns.py View on Github external
),
        RECORDS: properties.Schema(
            properties.Schema.LIST,
            _('Domain records'),
            schema=properties.Schema(
                properties.Schema.MAP,
                schema={
                    RECORD_COMMENT: properties.Schema(
                        properties.Schema.STRING,
                        _('Optional free form text comment'),
                        constraints=[
                            constraints.Length(max=160),
                        ]
                    ),
                    RECORD_NAME: properties.Schema(
                        properties.Schema.STRING,
                        _('Specifies the name for the domain or '
                          'subdomain. Must be a valid domain name.'),
                        required=True,
                        constraints=[
                            constraints.Length(min=3),
                        ]
                    ),
                    RECORD_DATA: properties.Schema(
                        properties.Schema.STRING,
                        _('Type specific record data'),
                        required=True
                    ),
                    RECORD_PRIORITY: properties.Schema(
                        properties.Schema.INTEGER,
                        _('Required for MX and SRV records, but '
                          'forbidden for other record types. If '
github openstack / heat / heat / engine / resources / openstack / neutron / subnetpool.py View on Github external
'name', 'prefixes', 'address_scope', 'default_quota',
        'default_prefixlen', 'min_prefixlen', 'max_prefixlen',
        'is_default', 'tenant_id', 'shared',
    )

    properties_schema = {
        NAME: properties.Schema(
            properties.Schema.STRING,
            _('Name of the subnet pool.'),
            update_allowed=True
        ),
        PREFIXES: properties.Schema(
            properties.Schema.LIST,
            _('List of subnet prefixes to assign.'),
            schema=properties.Schema(
                properties.Schema.STRING,
                constraints=[
                    constraints.CustomConstraint('net_cidr'),
                ],
            ),
            constraints=[constraints.Length(min=1)],
            required=True,
            update_allowed=True,
        ),
        ADDRESS_SCOPE: properties.Schema(
            properties.Schema.STRING,
            _('An address scope ID to assign to the subnet pool.'),
            constraints=[
                constraints.CustomConstraint('neutron.address_scope')
            ],
            update_allowed=True,
        ),
github openstack / heat / heat / engine / resources / openstack / barbican / container.py View on Github external
'name', 'private_key_ref', 'private_key_passphrase_ref',
        'public_key_ref',
    )

    properties_schema = {
        NAME: properties.Schema(
            properties.Schema.STRING,
            _('Human-readable name for the container.'),
        ),
        PRIVATE_KEY_REF: properties.Schema(
            properties.Schema.STRING,
            _('Reference to private key.'),
            constraints=[constraints.CustomConstraint('barbican.secret')],
        ),
        PRIVATE_KEY_PASSPHRASE_REF: properties.Schema(
            properties.Schema.STRING,
            _('Reference to private key passphrase.'),
            constraints=[constraints.CustomConstraint('barbican.secret')],
        ),
        PUBLIC_KEY_REF: properties.Schema(
            properties.Schema.STRING,
            _('Reference to public key.'),
            constraints=[constraints.CustomConstraint('barbican.secret')],
        ),
    }

    def create_container(self):
        info = dict((k, v) for k, v in self.properties.items()
                    if v is not None)
        return self.client_plugin().create_rsa(**info)

    def get_refs(self):