Browse Source

Update GBP automation to work with heat kilo trunk

Change-Id: I89c9e1ad27a7eaaa72cfe2cc6242f856bdfa5eb0
Closes-bug: 1433530
mageshgv 4 years ago
parent
commit
363d8b9f11

+ 9
- 10
gbpautomation/heat/engine/resources/neutron/gbpresource.py View File

@@ -14,7 +14,8 @@
14 14
 from heat.common import exception
15 15
 from heat.engine import resource
16 16
 from heat.engine import scheduler
17
-from heat.openstack.common import log as logging
17
+from oslo_log import log as logging
18
+
18 19
 
19 20
 LOG = logging.getLogger(__name__)
20 21
 
@@ -27,9 +28,7 @@ class GBPResource(resource.Resource):
27 28
         return self.client('grouppolicy')
28 29
 
29 30
     def validate(self):
30
-        '''
31
-        Validate any of the provided params
32
-        '''
31
+        '''Validate any of the provided params'''
33 32
         res = super(GBPResource, self).validate()
34 33
         if res:
35 34
             return res
@@ -37,10 +36,10 @@ class GBPResource(resource.Resource):
37 36
 
38 37
     @staticmethod
39 38
     def validate_properties(properties):
40
-        '''
39
+        '''Validates update parameters.
40
+
41 41
         Validates to ensure nothing in value_specs overwrites
42 42
         any key that exists in the schema.
43
-
44 43
         Also ensures that shared and tenant_id is not specified
45 44
         in value_specs.
46 45
         '''
@@ -68,10 +67,10 @@ class GBPResource(resource.Resource):
68 67
 
69 68
     @staticmethod
70 69
     def prepare_properties(properties, name):
71
-        '''
70
+        '''Prepare allowed property keys.
71
+
72 72
         Prepares the property values so that they can be passed directly to
73 73
         the Neutron create call.
74
-
75 74
         Removes None values and value_specs, merges value_specs with the main
76 75
         values.
77 76
         '''
@@ -87,10 +86,10 @@ class GBPResource(resource.Resource):
87 86
         return props
88 87
 
89 88
     def prepare_update_properties(self, definition):
90
-        '''
89
+        '''Prepare allowed keys for property update.
90
+
91 91
         Prepares the property values so that they can be passed directly to
92 92
         the Neutron update call.
93
-
94 93
         Removes any properties which are not update_allowed, then processes
95 94
         as for prepare_properties.
96 95
         '''

+ 4
- 3
gbpautomation/heat/engine/resources/neutron/grouppolicy.py View File

@@ -13,12 +13,13 @@
13 13
 #    License for the specific language governing permissions and limitations
14 14
 #    under the License.
15 15
 
16
-from gbpautomation.heat.engine.resources.neutron import gbpresource
17
-from neutronclient.common.exceptions import NeutronClientException
18
-
16
+from heat.common.i18n import _
19 17
 from heat.engine import attributes
20 18
 from heat.engine import constraints
21 19
 from heat.engine import properties
20
+from neutronclient.common.exceptions import NeutronClientException
21
+
22
+from gbpautomation.heat.engine.resources.neutron import gbpresource
22 23
 
23 24
 
24 25
 class PolicyTarget(gbpresource.GBPResource):

+ 3
- 2
gbpautomation/heat/engine/resources/neutron/servicechain.py View File

@@ -13,10 +13,11 @@
13 13
 #    License for the specific language governing permissions and limitations
14 14
 #    under the License.
15 15
 
16
-from gbpautomation.heat.engine.resources.neutron import gbpresource
16
+from heat.common.i18n import _
17
+from heat.engine import properties
17 18
 from neutronclient.common.exceptions import NeutronClientException
18 19
 
19
-from heat.engine import properties
20
+from gbpautomation.heat.engine.resources.neutron import gbpresource
20 21
 
21 22
 
22 23
 class ServiceChainNode(gbpresource.GBPResource):

+ 7
- 7
test-requirements.txt View File

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

Loading…
Cancel
Save