~ubuntu-branches/ubuntu/wily/heat/wily

« back to all changes in this revision

Viewing changes to heat/engine/resources/openstack/sahara/sahara_cluster.py

  • Committer: Package Import Robot
  • Author(s): Corey Bryant, Corey Bryant, James Page
  • Date: 2015-07-07 17:06:19 UTC
  • mfrom: (1.1.26) (45.1.1 vivid-proposed)
  • Revision ID: package-import@ubuntu.com-20150707170619-hra2dbjpfofpou4s
Tags: 1:5.0.0~b1-0ubuntu1
[ Corey Bryant ]
* New upstream milestone for OpenStack Liberty:
  - d/control: Align (build-)depends with upstream.
  - d/p/fix-requirements.patch: Rebased.
  - d/p/sudoers_patch.patch: Rebased.

[ James Page ]
* d/s/options: Ignore any removal of egg-info data during package clean.
* d/control: Drop MySQL and PostgreSQL related BD's, not required for unit
  testing.

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
            properties.Schema.STRING,
81
81
            _('Name or UUID of the image used to boot Hadoop nodes.'),
82
82
            support_status=support.SupportStatus(
83
 
                support.DEPRECATED,
84
 
                _('Property was deprecated in Kilo release. '
85
 
                  'Use property %s.') % IMAGE_ID),
 
83
                status=support.DEPRECATED,
 
84
                message=_('Use property %s.') % IMAGE_ID,
 
85
                version='2015.1'),
86
86
            constraints=[
87
87
                constraints.CustomConstraint('glance.image')
88
88
            ],
93
93
            constraints=[
94
94
                constraints.CustomConstraint('sahara.image'),
95
95
            ],
 
96
            support_status=support.SupportStatus(version='2015.1')
96
97
        ),
97
98
        MANAGEMENT_NETWORK: properties.Schema(
98
99
            properties.Schema.STRING,
106
107
    attributes_schema = {
107
108
        STATUS: attributes.Schema(
108
109
            _("Cluster status."),
 
110
            type=attributes.Schema.STRING
109
111
        ),
110
112
        INFO: attributes.Schema(
111
113
            _("Cluster information."),
 
114
            type=attributes.Schema.MAP
112
115
        ),
113
116
    }
114
117
 
121
124
            raise exception.ResourcePropertyConflict(value, depr_value)
122
125
 
123
126
    def _cluster_name(self):
124
 
        name = self.properties.get(self.NAME)
 
127
        name = self.properties[self.NAME]
125
128
        if name:
126
129
            return name
127
130
        return self.physical_resource_name()
145
148
                        'img': self.IMAGE, 'tmpl': cluster_template_id}
146
149
            raise exception.StackValidationFailed(message=msg)
147
150
 
148
 
        key_name = self.properties.get(self.KEY_NAME)
149
 
        net_id = self.properties.get(self.MANAGEMENT_NETWORK)
 
151
        key_name = self.properties[self.KEY_NAME]
 
152
        net_id = self.properties[self.MANAGEMENT_NETWORK]
150
153
        if net_id:
151
154
            if self.is_using_neutron():
152
155
                net_id = self.client_plugin('neutron').find_neutron_resource(
219
222
        self._validate_depr_keys(self.properties, self.IMAGE_ID, self.IMAGE)
220
223
        # check if running on neutron and MANAGEMENT_NETWORK missing
221
224
        if (self.is_using_neutron() and
222
 
                not self.properties.get(self.MANAGEMENT_NETWORK)):
 
225
                not self.properties[self.MANAGEMENT_NETWORK]):
223
226
            msg = _("%s must be provided"
224
227
                    ) % self.MANAGEMENT_NETWORK
225
228
            raise exception.StackValidationFailed(message=msg)