diff --git a/gbpautomation/heat/engine/resources/neutron/gbpresource.py b/gbpautomation/heat/engine/resources/gbpresource.py similarity index 100% rename from gbpautomation/heat/engine/resources/neutron/gbpresource.py rename to gbpautomation/heat/engine/resources/gbpresource.py diff --git a/gbpautomation/heat/engine/resources/neutron/grouppolicy.py b/gbpautomation/heat/engine/resources/grouppolicy.py similarity index 97% rename from gbpautomation/heat/engine/resources/neutron/grouppolicy.py rename to gbpautomation/heat/engine/resources/grouppolicy.py index a2de3bd..9db4582 100644 --- a/gbpautomation/heat/engine/resources/neutron/grouppolicy.py +++ b/gbpautomation/heat/engine/resources/grouppolicy.py @@ -13,14 +13,13 @@ # License for the specific language governing permissions and limitations # under the License. +from gbpautomation.heat.engine.resources import gbpresource from heat.common.i18n import _ from heat.engine import attributes from heat.engine import constraints from heat.engine import properties from neutronclient.common.exceptions import NeutronClientException -from gbpautomation.heat.engine.resources.neutron import gbpresource - class PolicyTarget(gbpresource.GBPResource): @@ -1146,16 +1145,16 @@ class NATPool(gbpresource.GBPResource): def resource_mapping(): return { - 'OS::Neutron::PolicyTarget': PolicyTarget, - 'OS::Neutron::PolicyTargetGroup': PolicyTargetGroup, - 'OS::Neutron::L2Policy': L2Policy, - 'OS::Neutron::L3Policy': L3Policy, - 'OS::Neutron::PolicyClassifier': PolicyClassifier, - 'OS::Neutron::PolicyAction': PolicyAction, - 'OS::Neutron::PolicyRule': PolicyRule, - 'OS::Neutron::PolicyRuleSet': PolicyRuleSet, - 'OS::Neutron::NetworkServicePolicy': NetworkServicePolicy, - 'OS::Neutron::ExternalPolicy': ExternalPolicy, - 'OS::Neutron::ExternalSegment': ExternalSegment, - 'OS::Neutron::NATPool': NATPool + 'OS::GroupBasedPolicy::PolicyTarget': PolicyTarget, + 'OS::GroupBasedPolicy::PolicyTargetGroup': PolicyTargetGroup, + 'OS::GroupBasedPolicy::L2Policy': L2Policy, + 'OS::GroupBasedPolicy::L3Policy': L3Policy, + 'OS::GroupBasedPolicy::PolicyClassifier': PolicyClassifier, + 'OS::GroupBasedPolicy::PolicyAction': PolicyAction, + 'OS::GroupBasedPolicy::PolicyRule': PolicyRule, + 'OS::GroupBasedPolicy::PolicyRuleSet': PolicyRuleSet, + 'OS::GroupBasedPolicy::NetworkServicePolicy': NetworkServicePolicy, + 'OS::GroupBasedPolicy::ExternalPolicy': ExternalPolicy, + 'OS::GroupBasedPolicy::ExternalSegment': ExternalSegment, + 'OS::GroupBasedPolicy::NATPool': NATPool } diff --git a/gbpautomation/heat/engine/resources/neutron/__init__.py b/gbpautomation/heat/engine/resources/neutron/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/gbpautomation/heat/engine/resources/neutron/servicechain.py b/gbpautomation/heat/engine/resources/servicechain.py similarity index 96% rename from gbpautomation/heat/engine/resources/neutron/servicechain.py rename to gbpautomation/heat/engine/resources/servicechain.py index cf05e38..8756ee1 100644 --- a/gbpautomation/heat/engine/resources/neutron/servicechain.py +++ b/gbpautomation/heat/engine/resources/servicechain.py @@ -13,12 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. +from gbpautomation.heat.engine.resources import gbpresource from heat.common.i18n import _ from heat.engine import properties from neutronclient.common.exceptions import NeutronClientException -from gbpautomation.heat.engine.resources.neutron import gbpresource - class ServiceChainNode(gbpresource.GBPResource): @@ -162,6 +161,6 @@ class ServiceChainSpec(gbpresource.GBPResource): def resource_mapping(): return { - 'OS::Neutron::ServiceChainNode': ServiceChainNode, - 'OS::Neutron::ServiceChainSpec': ServiceChainSpec, + 'OS::ServiceChain::ServiceChainNode': ServiceChainNode, + 'OS::ServiceChain::ServiceChainSpec': ServiceChainSpec, } diff --git a/gbpautomation/heat/tests/test_grouppolicy.py b/gbpautomation/heat/tests/test_grouppolicy.py index 686ce8f..7856312 100644 --- a/gbpautomation/heat/tests/test_grouppolicy.py +++ b/gbpautomation/heat/tests/test_grouppolicy.py @@ -13,7 +13,7 @@ import copy import six -from gbpautomation.heat.engine.resources.neutron import grouppolicy +from gbpautomation.heat.engine.resources import grouppolicy from gbpclient.v2_0 import client as gbpclient from heat.common import exception from heat.common import template_format @@ -30,7 +30,7 @@ policy_target_template = ''' "Parameters" : {}, "Resources" : { "policy_target": { - "Type": "OS::Neutron::PolicyTarget", + "Type": "OS::GroupBasedPolicy::PolicyTarget", "Properties": { "name": "test-policy-target", "policy_target_group_id": "ptg-id", @@ -48,7 +48,7 @@ policy_target_group_template = ''' "Parameters" : {}, "Resources" : { "policy_target_group": { - "Type": "OS::Neutron::PolicyTargetGroup", + "Type": "OS::GroupBasedPolicy::PolicyTargetGroup", "Properties": { "name": "test-policy-target-group", "description": "test policy target group resource", @@ -79,7 +79,7 @@ l2_policy_template = ''' "Parameters" : {}, "Resources" : { "l2_policy": { - "Type": "OS::Neutron::L2Policy", + "Type": "OS::GroupBasedPolicy::L2Policy", "Properties": { "name": "test-l2-policy", "description": "test L2 policy resource", @@ -98,7 +98,7 @@ l3_policy_template = ''' "Parameters" : {}, "Resources" : { "l3_policy": { - "Type": "OS::Neutron::L3Policy", + "Type": "OS::GroupBasedPolicy::L3Policy", "Properties": { "name": "test-l3-policy", "description": "test L3 policy resource", @@ -119,7 +119,7 @@ policy_classifier_template = ''' "Parameters" : {}, "Resources" : { "policy_classifier": { - "Type": "OS::Neutron::PolicyClassifier", + "Type": "OS::GroupBasedPolicy::PolicyClassifier", "Properties": { "name": "test-policy-classifier", "description": "test policy classifier resource", @@ -140,7 +140,7 @@ policy_action_template = ''' "Parameters" : {}, "Resources" : { "policy_action": { - "Type": "OS::Neutron::PolicyAction", + "Type": "OS::GroupBasedPolicy::PolicyAction", "Properties": { "name": "test-policy-action", "description": "test policy action resource", @@ -160,7 +160,7 @@ policy_rule_template = ''' "Parameters" : {}, "Resources" : { "policy_rule": { - "Type": "OS::Neutron::PolicyRule", + "Type": "OS::GroupBasedPolicy::PolicyRule", "Properties": { "name": "test-policy-rule", "description": "test policy rule resource", @@ -181,7 +181,7 @@ policy_rule_set_template = ''' "Parameters" : {}, "Resources" : { "policy_rule_set": { - "Type": "OS::Neutron::PolicyRuleSet", + "Type": "OS::GroupBasedPolicy::PolicyRuleSet", "Properties": { "name": "test-policy-rule-set", "description": "test policy rule set resource", @@ -202,7 +202,7 @@ network_service_policy_template = ''' "Parameters" : {}, "Resources" : { "network_service_policy": { - "Type": "OS::Neutron::NetworkServicePolicy", + "Type": "OS::GroupBasedPolicy::NetworkServicePolicy", "Properties": { "name": "test-nsp", "description": "test NSP resource", @@ -222,7 +222,7 @@ external_policy_template = ''' "Parameters" : {}, "Resources" : { "external_policy": { - "Type": "OS::Neutron::ExternalPolicy", + "Type": "OS::GroupBasedPolicy::ExternalPolicy", "Properties": { "name": "test-ep", "description": "test EP resource", @@ -257,7 +257,7 @@ external_segment_template = ''' "Parameters" : {}, "Resources" : { "external_segment": { - "Type": "OS::Neutron::ExternalSegment", + "Type": "OS::GroupBasedPolicy::ExternalSegment", "Properties": { "name": "test-es", "description": "test ES resource", @@ -284,7 +284,7 @@ nat_pool_template = ''' "Parameters" : {}, "Resources" : { "nat_pool": { - "Type": "OS::Neutron::NATPool", + "Type": "OS::GroupBasedPolicy::NATPool", "Properties": { "name": "test-nat-pool", "description": "test NP resource", diff --git a/gbpautomation/heat/tests/test_servicechain.py b/gbpautomation/heat/tests/test_servicechain.py index ece8cf2..8ea8094 100644 --- a/gbpautomation/heat/tests/test_servicechain.py +++ b/gbpautomation/heat/tests/test_servicechain.py @@ -12,7 +12,7 @@ import copy -from gbpautomation.heat.engine.resources.neutron import servicechain +from gbpautomation.heat.engine.resources import servicechain from gbpclient.v2_0 import client as gbpclient from heat.common import exception from heat.common import template_format @@ -29,7 +29,7 @@ servicechain_node_template = ''' "Parameters" : {}, "Resources" : { "servicechain_node": { - "Type": "OS::Neutron::ServiceChainNode", + "Type": "OS::ServiceChain::ServiceChainNode", "Properties": { "name": "test-sc-node", "description": "test service chain node resource", @@ -48,7 +48,7 @@ servicechain_spec_template = ''' "Parameters" : {}, "Resources" : { "servicechain_spec": { - "Type": "OS::Neutron::ServiceChainSpec", + "Type": "OS::ServiceChain::ServiceChainSpec", "Properties": { "name": "test-sc-spec", "description": "test service chain spec resource",