Update GBP automation to work with heat kilo trunk

Change-Id: I89c9e1ad27a7eaaa72cfe2cc6242f856bdfa5eb0
Closes-bug: 1433530
This commit is contained in:
mageshgv 2015-04-06 19:00:17 +05:30 committed by Magesh GV
parent 2461883e49
commit 363d8b9f11
4 changed files with 23 additions and 22 deletions

View File

@ -14,7 +14,8 @@
from heat.common import exception from heat.common import exception
from heat.engine import resource from heat.engine import resource
from heat.engine import scheduler from heat.engine import scheduler
from heat.openstack.common import log as logging from oslo_log import log as logging
LOG = logging.getLogger(__name__) LOG = logging.getLogger(__name__)
@ -27,9 +28,7 @@ class GBPResource(resource.Resource):
return self.client('grouppolicy') return self.client('grouppolicy')
def validate(self): def validate(self):
''' '''Validate any of the provided params'''
Validate any of the provided params
'''
res = super(GBPResource, self).validate() res = super(GBPResource, self).validate()
if res: if res:
return res return res
@ -37,10 +36,10 @@ class GBPResource(resource.Resource):
@staticmethod @staticmethod
def validate_properties(properties): def validate_properties(properties):
''' '''Validates update parameters.
Validates to ensure nothing in value_specs overwrites Validates to ensure nothing in value_specs overwrites
any key that exists in the schema. any key that exists in the schema.
Also ensures that shared and tenant_id is not specified Also ensures that shared and tenant_id is not specified
in value_specs. in value_specs.
''' '''
@ -68,10 +67,10 @@ class GBPResource(resource.Resource):
@staticmethod @staticmethod
def prepare_properties(properties, name): def prepare_properties(properties, name):
''' '''Prepare allowed property keys.
Prepares the property values so that they can be passed directly to Prepares the property values so that they can be passed directly to
the Neutron create call. the Neutron create call.
Removes None values and value_specs, merges value_specs with the main Removes None values and value_specs, merges value_specs with the main
values. values.
''' '''
@ -87,10 +86,10 @@ class GBPResource(resource.Resource):
return props return props
def prepare_update_properties(self, definition): def prepare_update_properties(self, definition):
''' '''Prepare allowed keys for property update.
Prepares the property values so that they can be passed directly to Prepares the property values so that they can be passed directly to
the Neutron update call. the Neutron update call.
Removes any properties which are not update_allowed, then processes Removes any properties which are not update_allowed, then processes
as for prepare_properties. as for prepare_properties.
''' '''

View File

@ -13,12 +13,13 @@
# 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 gbpautomation.heat.engine.resources.neutron import gbpresource from heat.common.i18n import _
from neutronclient.common.exceptions import NeutronClientException
from heat.engine import attributes 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 neutronclient.common.exceptions import NeutronClientException
from gbpautomation.heat.engine.resources.neutron import gbpresource
class PolicyTarget(gbpresource.GBPResource): class PolicyTarget(gbpresource.GBPResource):

View File

@ -13,10 +13,11 @@
# 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 gbpautomation.heat.engine.resources.neutron import gbpresource from heat.common.i18n import _
from heat.engine import properties
from neutronclient.common.exceptions import NeutronClientException from neutronclient.common.exceptions import NeutronClientException
from heat.engine import properties from gbpautomation.heat.engine.resources.neutron import gbpresource
class ServiceChainNode(gbpresource.GBPResource): class ServiceChainNode(gbpresource.GBPResource):

View File

@ -2,22 +2,22 @@
# of appearance. Changing the order has an impact on the overall integration # of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later. # process, which may cause wedges in the gate later.
-e git://github.com/openstack/heat.git@stable/juno#egg=heat -e git://github.com/openstack/heat.git@master#egg=heat
-e git://github.com/stackforge/python-group-based-policy-client.git@master#egg=gbpclient -e git://github.com/stackforge/python-group-based-policy-client.git@master#egg=gbpclient
# Hacking already pins down pep8, pyflakes and flake8 # Hacking already pins down pep8, pyflakes and flake8
hacking>=0.8.0,<0.9 hacking<0.11,>=0.10.0
coverage>=3.6 coverage>=3.6
discover discover
lockfile>=0.8 lockfile>=0.8
mock>=1.0 mock>=1.0
python-neutronclient==2.3.9 python-neutronclient>=2.3.11,<3
python-subunit>=0.0.18 python-subunit>=0.0.18
mox>=0.5.3 mox>=0.5.3
MySQL-python MySQL-python
oslosphinx>=2.2.0 # Apache-2.0 oslosphinx>=2.5.0,<2.6.0 # Apache-2.0
oslotest>=1.1.0 # Apache-2.0 oslotest>=1.5.1,<1.6.0 # Apache-2.0
psycopg2 psycopg2
sphinx>=1.1.2,!=1.2.0,<1.3 sphinx>=1.1.2,!=1.2.0,!=1.3b1,<1.3
testrepository>=0.0.18 testrepository>=0.0.18
testscenarios>=0.4 testscenarios>=0.4
testtools>=0.9.34 testtools>=0.9.36,!=1.2.0