diff --git a/doc/source/devref/alarm_monitoring_usage_guide.rst b/doc/source/devref/alarm_monitoring_usage_guide.rst index 189bc6a2d..bf5d27825 100644 --- a/doc/source/devref/alarm_monitoring_usage_guide.rst +++ b/doc/source/devref/alarm_monitoring_usage_guide.rst @@ -60,7 +60,7 @@ alarming monitoring and auto-scaling was also supported by Alarm monitor in Tack policies: - SP1: - type: tosca.policy.tacker.Scaling + type: tosca.policies.tacker.Scaling properties: increment: 1 cooldown: 120 diff --git a/samples/tosca-templates/vnfd/tosca-vnfd-alarm-scale.yaml b/samples/tosca-templates/vnfd/tosca-vnfd-alarm-scale.yaml index 320bd9c85..28c7a6c39 100644 --- a/samples/tosca-templates/vnfd/tosca-vnfd-alarm-scale.yaml +++ b/samples/tosca-templates/vnfd/tosca-vnfd-alarm-scale.yaml @@ -38,7 +38,7 @@ topology_template: policies: - SP1: - type: tosca.policy.tacker.Scaling + type: tosca.policies.tacker.Scaling properties: increment: 1 cooldown: 120 diff --git a/samples/tosca-templates/vnfd/tosca-vnfd-scale.yaml b/samples/tosca-templates/vnfd/tosca-vnfd-scale.yaml index 99645c5d8..c4890e3bc 100644 --- a/samples/tosca-templates/vnfd/tosca-vnfd-scale.yaml +++ b/samples/tosca-templates/vnfd/tosca-vnfd-scale.yaml @@ -55,7 +55,7 @@ topology_template: policies: - SP1: - type: tosca.policy.tacker.Scaling + type: tosca.policies.tacker.Scaling properties: increment: 1 cooldown: 120 diff --git a/tacker/plugins/common/constants.py b/tacker/plugins/common/constants.py index f2ad46f21..e65d4a6fd 100644 --- a/tacker/plugins/common/constants.py +++ b/tacker/plugins/common/constants.py @@ -48,7 +48,7 @@ ACTIVE_PENDING_STATUSES = ( PENDING_UPDATE ) -POLICY_SCALING = 'tosca.policy.tacker.Scaling' +POLICY_SCALING = 'tosca.policies.tacker.Scaling' POLICY_SCALING_ACTIONS = (ACTION_SCALE_OUT, ACTION_SCALE_IN) = ('out', 'in') POLICY_ACTIONS = {POLICY_SCALING: POLICY_SCALING_ACTIONS} diff --git a/tacker/tests/etc/samples/sample-tosca-scale-all.yaml b/tacker/tests/etc/samples/sample-tosca-scale-all.yaml index ffb5567d0..4749b03c1 100644 --- a/tacker/tests/etc/samples/sample-tosca-scale-all.yaml +++ b/tacker/tests/etc/samples/sample-tosca-scale-all.yaml @@ -40,7 +40,7 @@ topology_template: policies: - SP1: - type: tosca.policy.tacker.Scaling + type: tosca.policies.tacker.Scaling properties: increment: 1 cooldown: 60 diff --git a/tacker/tests/unit/vm/infra_drivers/openstack/data/test_tosca_vnfd_alarm_scale.yaml b/tacker/tests/unit/vm/infra_drivers/openstack/data/test_tosca_vnfd_alarm_scale.yaml index 320bd9c85..28c7a6c39 100644 --- a/tacker/tests/unit/vm/infra_drivers/openstack/data/test_tosca_vnfd_alarm_scale.yaml +++ b/tacker/tests/unit/vm/infra_drivers/openstack/data/test_tosca_vnfd_alarm_scale.yaml @@ -38,7 +38,7 @@ topology_template: policies: - SP1: - type: tosca.policy.tacker.Scaling + type: tosca.policies.tacker.Scaling properties: increment: 1 cooldown: 120 diff --git a/tacker/tests/unit/vm/infra_drivers/openstack/data/tosca_scale.yaml b/tacker/tests/unit/vm/infra_drivers/openstack/data/tosca_scale.yaml index 531b9fd2d..08244edbc 100644 --- a/tacker/tests/unit/vm/infra_drivers/openstack/data/tosca_scale.yaml +++ b/tacker/tests/unit/vm/infra_drivers/openstack/data/tosca_scale.yaml @@ -34,7 +34,7 @@ topology_template: policies: - SP1: - type: tosca.policy.tacker.Scaling + type: tosca.policies.tacker.Scaling properties: increment: 1 cooldown: 60 diff --git a/tacker/vnfm/infra_drivers/openstack/openstack.py b/tacker/vnfm/infra_drivers/openstack/openstack.py index b1872f286..767a10a26 100644 --- a/tacker/vnfm/infra_drivers/openstack/openstack.py +++ b/tacker/vnfm/infra_drivers/openstack/openstack.py @@ -374,11 +374,11 @@ class OpenStack(abstract_driver.DeviceAbstractDriver, # policies: # - SP1: - # type: tosca.policy.tacker.Scaling + # type: tosca.policies.tacker.Scaling if 'policies' in vnfd_dict: for policy_dict in vnfd_dict['policies']: name, policy = list(policy_dict.items())[0] - if policy['type'] == 'tosca.policy.tacker.Scaling': + if policy['type'] == 'tosca.policies.tacker.Scaling': _convert_to_heat_scaling_policy(policy['properties'], name) # TODO(kanagaraj-manickam) only one policy is supported @@ -429,7 +429,7 @@ class OpenStack(abstract_driver.DeviceAbstractDriver, for policies in topology_tpl_dict['policies']: policy_name, policy_dt = list(policies.items())[0] if policy_dt['type'] == \ - 'tosca.policy.tacker.Scaling': + 'tosca.policies.tacker.Scaling': # Fixed metadata. it will be fixed # once targets are supported metadata_dict = dict()