Browse Source

Moving GBP resources to an independent namespace

Change-Id: Ia345257c4423974ecdc124c46dbdd7ea8a4692d2
Closes-bug: #1419948
Susaant Kondapaneni 4 years ago
parent
commit
b6becb8545

gbpautomation/heat/engine/resources/neutron/gbpresource.py → gbpautomation/heat/engine/resources/gbpresource.py View File


gbpautomation/heat/engine/resources/neutron/grouppolicy.py → gbpautomation/heat/engine/resources/grouppolicy.py View File

@@ -13,14 +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 import gbpresource
16 17
 from heat.common.i18n import _
17 18
 from heat.engine import attributes
18 19
 from heat.engine import constraints
19 20
 from heat.engine import properties
20 21
 from neutronclient.common.exceptions import NeutronClientException
21 22
 
22
-from gbpautomation.heat.engine.resources.neutron import gbpresource
23
-
24 23
 
25 24
 class PolicyTarget(gbpresource.GBPResource):
26 25
 
@@ -1146,16 +1145,16 @@ class NATPool(gbpresource.GBPResource):
1146 1145
 
1147 1146
 def resource_mapping():
1148 1147
     return {
1149
-        'OS::Neutron::PolicyTarget': PolicyTarget,
1150
-        'OS::Neutron::PolicyTargetGroup': PolicyTargetGroup,
1151
-        'OS::Neutron::L2Policy': L2Policy,
1152
-        'OS::Neutron::L3Policy': L3Policy,
1153
-        'OS::Neutron::PolicyClassifier': PolicyClassifier,
1154
-        'OS::Neutron::PolicyAction': PolicyAction,
1155
-        'OS::Neutron::PolicyRule': PolicyRule,
1156
-        'OS::Neutron::PolicyRuleSet': PolicyRuleSet,
1157
-        'OS::Neutron::NetworkServicePolicy': NetworkServicePolicy,
1158
-        'OS::Neutron::ExternalPolicy': ExternalPolicy,
1159
-        'OS::Neutron::ExternalSegment': ExternalSegment,
1160
-        'OS::Neutron::NATPool': NATPool
1148
+        'OS::GroupBasedPolicy::PolicyTarget': PolicyTarget,
1149
+        'OS::GroupBasedPolicy::PolicyTargetGroup': PolicyTargetGroup,
1150
+        'OS::GroupBasedPolicy::L2Policy': L2Policy,
1151
+        'OS::GroupBasedPolicy::L3Policy': L3Policy,
1152
+        'OS::GroupBasedPolicy::PolicyClassifier': PolicyClassifier,
1153
+        'OS::GroupBasedPolicy::PolicyAction': PolicyAction,
1154
+        'OS::GroupBasedPolicy::PolicyRule': PolicyRule,
1155
+        'OS::GroupBasedPolicy::PolicyRuleSet': PolicyRuleSet,
1156
+        'OS::GroupBasedPolicy::NetworkServicePolicy': NetworkServicePolicy,
1157
+        'OS::GroupBasedPolicy::ExternalPolicy': ExternalPolicy,
1158
+        'OS::GroupBasedPolicy::ExternalSegment': ExternalSegment,
1159
+        'OS::GroupBasedPolicy::NATPool': NATPool
1161 1160
     }

+ 0
- 0
gbpautomation/heat/engine/resources/neutron/__init__.py View File


gbpautomation/heat/engine/resources/neutron/servicechain.py → gbpautomation/heat/engine/resources/servicechain.py View File

@@ -13,12 +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 import gbpresource
16 17
 from heat.common.i18n import _
17 18
 from heat.engine import properties
18 19
 from neutronclient.common.exceptions import NeutronClientException
19 20
 
20
-from gbpautomation.heat.engine.resources.neutron import gbpresource
21
-
22 21
 
23 22
 class ServiceChainNode(gbpresource.GBPResource):
24 23
 
@@ -162,6 +161,6 @@ class ServiceChainSpec(gbpresource.GBPResource):
162 161
 
163 162
 def resource_mapping():
164 163
     return {
165
-        'OS::Neutron::ServiceChainNode': ServiceChainNode,
166
-        'OS::Neutron::ServiceChainSpec': ServiceChainSpec,
164
+        'OS::ServiceChain::ServiceChainNode': ServiceChainNode,
165
+        'OS::ServiceChain::ServiceChainSpec': ServiceChainSpec,
167 166
     }

+ 13
- 13
gbpautomation/heat/tests/test_grouppolicy.py View File

@@ -13,7 +13,7 @@
13 13
 import copy
14 14
 import six
15 15
 
16
-from gbpautomation.heat.engine.resources.neutron import grouppolicy
16
+from gbpautomation.heat.engine.resources import grouppolicy
17 17
 from gbpclient.v2_0 import client as gbpclient
18 18
 from heat.common import exception
19 19
 from heat.common import template_format
@@ -30,7 +30,7 @@ policy_target_template = '''
30 30
   "Parameters" : {},
31 31
   "Resources" : {
32 32
     "policy_target": {
33
-      "Type": "OS::Neutron::PolicyTarget",
33
+      "Type": "OS::GroupBasedPolicy::PolicyTarget",
34 34
       "Properties": {
35 35
         "name": "test-policy-target",
36 36
         "policy_target_group_id": "ptg-id",
@@ -48,7 +48,7 @@ policy_target_group_template = '''
48 48
   "Parameters" : {},
49 49
   "Resources" : {
50 50
     "policy_target_group": {
51
-      "Type": "OS::Neutron::PolicyTargetGroup",
51
+      "Type": "OS::GroupBasedPolicy::PolicyTargetGroup",
52 52
       "Properties": {
53 53
         "name": "test-policy-target-group",
54 54
         "description": "test policy target group resource",
@@ -79,7 +79,7 @@ l2_policy_template = '''
79 79
   "Parameters" : {},
80 80
   "Resources" : {
81 81
     "l2_policy": {
82
-      "Type": "OS::Neutron::L2Policy",
82
+      "Type": "OS::GroupBasedPolicy::L2Policy",
83 83
       "Properties": {
84 84
         "name": "test-l2-policy",
85 85
         "description": "test L2 policy resource",
@@ -98,7 +98,7 @@ l3_policy_template = '''
98 98
   "Parameters" : {},
99 99
   "Resources" : {
100 100
     "l3_policy": {
101
-      "Type": "OS::Neutron::L3Policy",
101
+      "Type": "OS::GroupBasedPolicy::L3Policy",
102 102
       "Properties": {
103 103
         "name": "test-l3-policy",
104 104
         "description": "test L3 policy resource",
@@ -119,7 +119,7 @@ policy_classifier_template = '''
119 119
   "Parameters" : {},
120 120
   "Resources" : {
121 121
   "policy_classifier": {
122
-      "Type": "OS::Neutron::PolicyClassifier",
122
+      "Type": "OS::GroupBasedPolicy::PolicyClassifier",
123 123
       "Properties": {
124 124
                 "name": "test-policy-classifier",
125 125
                 "description": "test policy classifier resource",
@@ -140,7 +140,7 @@ policy_action_template = '''
140 140
   "Parameters" : {},
141 141
   "Resources" : {
142 142
   "policy_action": {
143
-      "Type": "OS::Neutron::PolicyAction",
143
+      "Type": "OS::GroupBasedPolicy::PolicyAction",
144 144
       "Properties": {
145 145
                 "name": "test-policy-action",
146 146
                 "description": "test policy action resource",
@@ -160,7 +160,7 @@ policy_rule_template = '''
160 160
   "Parameters" : {},
161 161
   "Resources" : {
162 162
   "policy_rule": {
163
-      "Type": "OS::Neutron::PolicyRule",
163
+      "Type": "OS::GroupBasedPolicy::PolicyRule",
164 164
       "Properties": {
165 165
           "name": "test-policy-rule",
166 166
           "description": "test policy rule resource",
@@ -181,7 +181,7 @@ policy_rule_set_template = '''
181 181
   "Parameters" : {},
182 182
   "Resources" : {
183 183
   "policy_rule_set": {
184
-      "Type": "OS::Neutron::PolicyRuleSet",
184
+      "Type": "OS::GroupBasedPolicy::PolicyRuleSet",
185 185
       "Properties": {
186 186
           "name": "test-policy-rule-set",
187 187
           "description": "test policy rule set resource",
@@ -202,7 +202,7 @@ network_service_policy_template = '''
202 202
   "Parameters" : {},
203 203
   "Resources" : {
204 204
   "network_service_policy": {
205
-      "Type": "OS::Neutron::NetworkServicePolicy",
205
+      "Type": "OS::GroupBasedPolicy::NetworkServicePolicy",
206 206
       "Properties": {
207 207
           "name": "test-nsp",
208 208
           "description": "test NSP resource",
@@ -222,7 +222,7 @@ external_policy_template = '''
222 222
   "Parameters" : {},
223 223
   "Resources" : {
224 224
   "external_policy": {
225
-      "Type": "OS::Neutron::ExternalPolicy",
225
+      "Type": "OS::GroupBasedPolicy::ExternalPolicy",
226 226
       "Properties": {
227 227
           "name": "test-ep",
228 228
           "description": "test EP resource",
@@ -257,7 +257,7 @@ external_segment_template = '''
257 257
   "Parameters" : {},
258 258
   "Resources" : {
259 259
   "external_segment": {
260
-      "Type": "OS::Neutron::ExternalSegment",
260
+      "Type": "OS::GroupBasedPolicy::ExternalSegment",
261 261
       "Properties": {
262 262
           "name": "test-es",
263 263
           "description": "test ES resource",
@@ -284,7 +284,7 @@ nat_pool_template = '''
284 284
   "Parameters" : {},
285 285
   "Resources" : {
286 286
   "nat_pool": {
287
-      "Type": "OS::Neutron::NATPool",
287
+      "Type": "OS::GroupBasedPolicy::NATPool",
288 288
       "Properties": {
289 289
           "name": "test-nat-pool",
290 290
           "description": "test NP resource",

+ 3
- 3
gbpautomation/heat/tests/test_servicechain.py View File

@@ -12,7 +12,7 @@
12 12
 
13 13
 import copy
14 14
 
15
-from gbpautomation.heat.engine.resources.neutron import servicechain
15
+from gbpautomation.heat.engine.resources import servicechain
16 16
 from gbpclient.v2_0 import client as gbpclient
17 17
 from heat.common import exception
18 18
 from heat.common import template_format
@@ -29,7 +29,7 @@ servicechain_node_template = '''
29 29
   "Parameters" : {},
30 30
   "Resources" : {
31 31
     "servicechain_node": {
32
-      "Type": "OS::Neutron::ServiceChainNode",
32
+      "Type": "OS::ServiceChain::ServiceChainNode",
33 33
       "Properties": {
34 34
         "name": "test-sc-node",
35 35
         "description": "test service chain node resource",
@@ -48,7 +48,7 @@ servicechain_spec_template = '''
48 48
   "Parameters" : {},
49 49
   "Resources" : {
50 50
     "servicechain_spec": {
51
-      "Type": "OS::Neutron::ServiceChainSpec",
51
+      "Type": "OS::ServiceChain::ServiceChainSpec",
52 52
       "Properties": {
53 53
         "name": "test-sc-spec",
54 54
         "description": "test service chain spec resource",

Loading…
Cancel
Save