Moving GBP resources to an independent namespace

Change-Id: Ia345257c4423974ecdc124c46dbdd7ea8a4692d2
Closes-bug: #1419948
This commit is contained in:
Susaant Kondapaneni 2015-02-11 18:50:11 -08:00
parent 363d8b9f11
commit b6becb8545
6 changed files with 32 additions and 34 deletions

View File

@ -13,14 +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 import gbpresource
from heat.common.i18n import _ from heat.common.i18n import _
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 neutronclient.common.exceptions import NeutronClientException
from gbpautomation.heat.engine.resources.neutron import gbpresource
class PolicyTarget(gbpresource.GBPResource): class PolicyTarget(gbpresource.GBPResource):
@ -1146,16 +1145,16 @@ class NATPool(gbpresource.GBPResource):
def resource_mapping(): def resource_mapping():
return { return {
'OS::Neutron::PolicyTarget': PolicyTarget, 'OS::GroupBasedPolicy::PolicyTarget': PolicyTarget,
'OS::Neutron::PolicyTargetGroup': PolicyTargetGroup, 'OS::GroupBasedPolicy::PolicyTargetGroup': PolicyTargetGroup,
'OS::Neutron::L2Policy': L2Policy, 'OS::GroupBasedPolicy::L2Policy': L2Policy,
'OS::Neutron::L3Policy': L3Policy, 'OS::GroupBasedPolicy::L3Policy': L3Policy,
'OS::Neutron::PolicyClassifier': PolicyClassifier, 'OS::GroupBasedPolicy::PolicyClassifier': PolicyClassifier,
'OS::Neutron::PolicyAction': PolicyAction, 'OS::GroupBasedPolicy::PolicyAction': PolicyAction,
'OS::Neutron::PolicyRule': PolicyRule, 'OS::GroupBasedPolicy::PolicyRule': PolicyRule,
'OS::Neutron::PolicyRuleSet': PolicyRuleSet, 'OS::GroupBasedPolicy::PolicyRuleSet': PolicyRuleSet,
'OS::Neutron::NetworkServicePolicy': NetworkServicePolicy, 'OS::GroupBasedPolicy::NetworkServicePolicy': NetworkServicePolicy,
'OS::Neutron::ExternalPolicy': ExternalPolicy, 'OS::GroupBasedPolicy::ExternalPolicy': ExternalPolicy,
'OS::Neutron::ExternalSegment': ExternalSegment, 'OS::GroupBasedPolicy::ExternalSegment': ExternalSegment,
'OS::Neutron::NATPool': NATPool 'OS::GroupBasedPolicy::NATPool': NATPool
} }

View File

@ -13,12 +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 import gbpresource
from heat.common.i18n import _ from heat.common.i18n import _
from heat.engine import properties from heat.engine import properties
from neutronclient.common.exceptions import NeutronClientException from neutronclient.common.exceptions import NeutronClientException
from gbpautomation.heat.engine.resources.neutron import gbpresource
class ServiceChainNode(gbpresource.GBPResource): class ServiceChainNode(gbpresource.GBPResource):
@ -162,6 +161,6 @@ class ServiceChainSpec(gbpresource.GBPResource):
def resource_mapping(): def resource_mapping():
return { return {
'OS::Neutron::ServiceChainNode': ServiceChainNode, 'OS::ServiceChain::ServiceChainNode': ServiceChainNode,
'OS::Neutron::ServiceChainSpec': ServiceChainSpec, 'OS::ServiceChain::ServiceChainSpec': ServiceChainSpec,
} }

View File

@ -13,7 +13,7 @@
import copy import copy
import six 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 gbpclient.v2_0 import client as gbpclient
from heat.common import exception from heat.common import exception
from heat.common import template_format from heat.common import template_format
@ -30,7 +30,7 @@ policy_target_template = '''
"Parameters" : {}, "Parameters" : {},
"Resources" : { "Resources" : {
"policy_target": { "policy_target": {
"Type": "OS::Neutron::PolicyTarget", "Type": "OS::GroupBasedPolicy::PolicyTarget",
"Properties": { "Properties": {
"name": "test-policy-target", "name": "test-policy-target",
"policy_target_group_id": "ptg-id", "policy_target_group_id": "ptg-id",
@ -48,7 +48,7 @@ policy_target_group_template = '''
"Parameters" : {}, "Parameters" : {},
"Resources" : { "Resources" : {
"policy_target_group": { "policy_target_group": {
"Type": "OS::Neutron::PolicyTargetGroup", "Type": "OS::GroupBasedPolicy::PolicyTargetGroup",
"Properties": { "Properties": {
"name": "test-policy-target-group", "name": "test-policy-target-group",
"description": "test policy target group resource", "description": "test policy target group resource",
@ -79,7 +79,7 @@ l2_policy_template = '''
"Parameters" : {}, "Parameters" : {},
"Resources" : { "Resources" : {
"l2_policy": { "l2_policy": {
"Type": "OS::Neutron::L2Policy", "Type": "OS::GroupBasedPolicy::L2Policy",
"Properties": { "Properties": {
"name": "test-l2-policy", "name": "test-l2-policy",
"description": "test L2 policy resource", "description": "test L2 policy resource",
@ -98,7 +98,7 @@ l3_policy_template = '''
"Parameters" : {}, "Parameters" : {},
"Resources" : { "Resources" : {
"l3_policy": { "l3_policy": {
"Type": "OS::Neutron::L3Policy", "Type": "OS::GroupBasedPolicy::L3Policy",
"Properties": { "Properties": {
"name": "test-l3-policy", "name": "test-l3-policy",
"description": "test L3 policy resource", "description": "test L3 policy resource",
@ -119,7 +119,7 @@ policy_classifier_template = '''
"Parameters" : {}, "Parameters" : {},
"Resources" : { "Resources" : {
"policy_classifier": { "policy_classifier": {
"Type": "OS::Neutron::PolicyClassifier", "Type": "OS::GroupBasedPolicy::PolicyClassifier",
"Properties": { "Properties": {
"name": "test-policy-classifier", "name": "test-policy-classifier",
"description": "test policy classifier resource", "description": "test policy classifier resource",
@ -140,7 +140,7 @@ policy_action_template = '''
"Parameters" : {}, "Parameters" : {},
"Resources" : { "Resources" : {
"policy_action": { "policy_action": {
"Type": "OS::Neutron::PolicyAction", "Type": "OS::GroupBasedPolicy::PolicyAction",
"Properties": { "Properties": {
"name": "test-policy-action", "name": "test-policy-action",
"description": "test policy action resource", "description": "test policy action resource",
@ -160,7 +160,7 @@ policy_rule_template = '''
"Parameters" : {}, "Parameters" : {},
"Resources" : { "Resources" : {
"policy_rule": { "policy_rule": {
"Type": "OS::Neutron::PolicyRule", "Type": "OS::GroupBasedPolicy::PolicyRule",
"Properties": { "Properties": {
"name": "test-policy-rule", "name": "test-policy-rule",
"description": "test policy rule resource", "description": "test policy rule resource",
@ -181,7 +181,7 @@ policy_rule_set_template = '''
"Parameters" : {}, "Parameters" : {},
"Resources" : { "Resources" : {
"policy_rule_set": { "policy_rule_set": {
"Type": "OS::Neutron::PolicyRuleSet", "Type": "OS::GroupBasedPolicy::PolicyRuleSet",
"Properties": { "Properties": {
"name": "test-policy-rule-set", "name": "test-policy-rule-set",
"description": "test policy rule set resource", "description": "test policy rule set resource",
@ -202,7 +202,7 @@ network_service_policy_template = '''
"Parameters" : {}, "Parameters" : {},
"Resources" : { "Resources" : {
"network_service_policy": { "network_service_policy": {
"Type": "OS::Neutron::NetworkServicePolicy", "Type": "OS::GroupBasedPolicy::NetworkServicePolicy",
"Properties": { "Properties": {
"name": "test-nsp", "name": "test-nsp",
"description": "test NSP resource", "description": "test NSP resource",
@ -222,7 +222,7 @@ external_policy_template = '''
"Parameters" : {}, "Parameters" : {},
"Resources" : { "Resources" : {
"external_policy": { "external_policy": {
"Type": "OS::Neutron::ExternalPolicy", "Type": "OS::GroupBasedPolicy::ExternalPolicy",
"Properties": { "Properties": {
"name": "test-ep", "name": "test-ep",
"description": "test EP resource", "description": "test EP resource",
@ -257,7 +257,7 @@ external_segment_template = '''
"Parameters" : {}, "Parameters" : {},
"Resources" : { "Resources" : {
"external_segment": { "external_segment": {
"Type": "OS::Neutron::ExternalSegment", "Type": "OS::GroupBasedPolicy::ExternalSegment",
"Properties": { "Properties": {
"name": "test-es", "name": "test-es",
"description": "test ES resource", "description": "test ES resource",
@ -284,7 +284,7 @@ nat_pool_template = '''
"Parameters" : {}, "Parameters" : {},
"Resources" : { "Resources" : {
"nat_pool": { "nat_pool": {
"Type": "OS::Neutron::NATPool", "Type": "OS::GroupBasedPolicy::NATPool",
"Properties": { "Properties": {
"name": "test-nat-pool", "name": "test-nat-pool",
"description": "test NP resource", "description": "test NP resource",

View File

@ -12,7 +12,7 @@
import copy 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 gbpclient.v2_0 import client as gbpclient
from heat.common import exception from heat.common import exception
from heat.common import template_format from heat.common import template_format
@ -29,7 +29,7 @@ servicechain_node_template = '''
"Parameters" : {}, "Parameters" : {},
"Resources" : { "Resources" : {
"servicechain_node": { "servicechain_node": {
"Type": "OS::Neutron::ServiceChainNode", "Type": "OS::ServiceChain::ServiceChainNode",
"Properties": { "Properties": {
"name": "test-sc-node", "name": "test-sc-node",
"description": "test service chain node resource", "description": "test service chain node resource",
@ -48,7 +48,7 @@ servicechain_spec_template = '''
"Parameters" : {}, "Parameters" : {},
"Resources" : { "Resources" : {
"servicechain_spec": { "servicechain_spec": {
"Type": "OS::Neutron::ServiceChainSpec", "Type": "OS::ServiceChain::ServiceChainSpec",
"Properties": { "Properties": {
"name": "test-sc-spec", "name": "test-sc-spec",
"description": "test service chain spec resource", "description": "test service chain spec resource",