Updated mapping.json file

unit tests has been modified for murano
and magnum actions.

Change-Id: Ic72c29038a1d7c750d72354c3fef6f51c8a3d91b
This commit is contained in:
hardik 2016-06-28 11:09:31 +05:30
parent 31d6f8f5eb
commit fcd48626a4
4 changed files with 50 additions and 20 deletions

View File

@ -20,7 +20,7 @@ from mistral.actions.openstack.action_generator import base
SUPPORTED_MODULES = [
'Nova', 'Glance', 'Keystone', 'Heat', 'Neutron', 'Cinder', 'Ceilometer',
'Trove', 'Ironic', 'Baremetal Introspection', 'Swift', 'Zaqar', 'Barbican',
'Mistral', 'Designate'
'Mistral', 'Designate', 'Magnum', 'Murano'
]

View File

@ -2,6 +2,7 @@
"_comment": "Mapping OpenStack action namespaces to all its actions. Each action name is mapped to python-client method name in this namespace.",
"nova": {
"_comment": "It uses novaclient.v2.",
"agents_convert_into_with_meta": "agents.convert_into_with_meta",
"agents_create": "agents.create",
"agents_delete": "agents.delete",
"agents_find": "agents.find",
@ -9,6 +10,7 @@
"agents_list": "agents.list",
"agents_update": "agents.update",
"aggregates_add_host": "aggregates.add_host",
"aggregates_convert_into_with_meta": "aggregates.convert_into_with_meta",
"aggregates_create": "aggregates.create",
"aggregates_delete": "aggregates.delete",
"aggregates_find": "aggregates.find",
@ -19,57 +21,70 @@
"aggregates_remove_host": "aggregates.remove_host",
"aggregates_set_metadata": "aggregates.set_metadata",
"aggregates_update": "aggregates.update",
"availability_zones_convert_into_with_meta": "availability_zones.convert_into_with_meta",
"availability_zones_find": "availability_zones.find",
"availability_zones_findall": "availability_zones.findall",
"availability_zones_list": "availability_zones.list",
"certs_convert_into_with_meta": "certs.convert_into_with_meta",
"certs_create": "certs.create",
"certs_get": "certs.get",
"cloudpipe_convert_into_with_meta": "cloudpipe.convert_into_with_meta",
"cloudpipe_create": "cloudpipe.create",
"cloudpipe_find": "cloudpipe.find",
"cloudpipe_findall": "cloudpipe.findall",
"cloudpipe_list": "cloudpipe.list",
"cloudpipe_update": "cloudpipe.update",
"dns_domains_convert_into_with_meta": "dns_domains.convert_into_with_meta",
"dns_domains_create_private": "dns_domains.create_private",
"dns_domains_create_public": "dns_domains.create_public",
"dns_domains_delete": "dns_domains.delete",
"dns_domains_domains": "dns_domains.domains",
"dns_entries_convert_into_with_meta": "dns_entries.convert_into_with_meta",
"dns_entries_create": "dns_entries.create",
"dns_entries_delete": "dns_entries.delete",
"dns_entries_get": "dns_entries.get",
"dns_entries_get_for_ip": "dns_entries.get_for_ip",
"dns_entries_modify_ip": "dns_entries.modify_ip",
"fixed_ips_convert_into_with_meta": "fixed_ips.convert_into_with_meta",
"fixed_ips_get": "fixed_ips.get",
"fixed_ips_reserve": "fixed_ips.reserve",
"fixed_ips_unreserve": "fixed_ips.unreserve",
"flavor_access_add_tenant_access": "flavor_access.add_tenant_access",
"flavor_access_convert_into_with_meta": "flavor_access.convert_into_with_meta",
"flavor_access_find": "flavor_access.find",
"flavor_access_findall": "flavor_access.findall",
"flavor_access_list": "flavor_access.list",
"flavor_access_remove_tenant_access": "flavor_access.remove_tenant_access",
"flavors_convert_into_with_meta": "flavors.convert_into_with_meta",
"flavors_create": "flavors.create",
"flavors_delete": "flavors.delete",
"flavors_find": "flavors.find",
"flavors_findall": "flavors.findall",
"flavors_get": "flavors.get",
"flavors_list": "flavors.list",
"floating_ip_pools_convert_into_with_meta": "floating_ip_pools.convert_into_with_meta",
"floating_ip_pools_find": "floating_ip_pools.find",
"floating_ip_pools_findall": "floating_ip_pools.findall",
"floating_ip_pools_list": "floating_ip_pools.list",
"floating_ips_convert_into_with_meta": "floating_ips.convert_into_with_meta",
"floating_ips_create": "floating_ips.create",
"floating_ips_delete": "floating_ips.delete",
"floating_ips_find": "floating_ips.find",
"floating_ips_findall": "floating_ips.findall",
"floating_ips_get": "floating_ips.get",
"floating_ips_list": "floating_ips.list",
"floating_ips_bulk_convert_into_with_meta": "floating_ips_bulk.convert_into_with_meta",
"floating_ips_bulk_create": "floating_ips_bulk.create",
"floating_ips_bulk_delete": "floating_ips_bulk.delete",
"floating_ips_bulk_find": "floating_ips_bulk.find",
"floating_ips_bulk_findall": "floating_ips_bulk.findall",
"floating_ips_bulk_list": "floating_ips_bulk.list",
"fping_convert_into_with_meta": "fping.convert_into_with_meta",
"fping_find": "fping.find",
"fping_findall": "fping.findall",
"fping_get": "fping.get",
"fping_list": "fping.list",
"hosts_convert_into_with_meta": "hosts.convert_into_with_meta",
"hosts_find": "hosts.find",
"hosts_findall": "hosts.findall",
"hosts_get": "hosts.get",
@ -77,7 +92,9 @@
"hosts_list": "hosts.list",
"hosts_list_all": "hosts.list_all",
"hosts_update": "hosts.update",
"hypervisor_stats_convert_into_with_meta": "hypervisor_stats.convert_into_with_meta",
"hypervisor_stats_statistics": "hypervisor_stats.statistics",
"hypervisors_convert_into_with_meta": "hypervisors.convert_into_with_meta",
"hypervisors_find": "hypervisors.find",
"hypervisors_findall": "hypervisors.findall",
"hypervisors_get": "hypervisors.get",
@ -85,6 +102,7 @@
"hypervisors_search": "hypervisors.search",
"hypervisors_statistics": "hypervisors.statistics",
"hypervisors_uptime": "hypervisors.uptime",
"images_convert_into_with_meta": "images.convert_into_with_meta",
"images_delete": "images.delete",
"images_delete_meta": "images.delete_meta",
"images_find": "images.find",
@ -92,16 +110,19 @@
"images_get": "images.get",
"images_list": "images.list",
"images_set_meta": "images.set_meta",
"keypairs_convert_into_with_meta": "keypairs.convert_into_with_meta",
"keypairs_create": "keypairs.create",
"keypairs_delete": "keypairs.delete",
"keypairs_find": "keypairs.find",
"keypairs_findall": "keypairs.findall",
"keypairs_get": "keypairs.get",
"keypairs_list": "keypairs.list",
"limits_convert_into_with_meta": "limits.convert_into_with_meta",
"limits_get": "limits.get",
"networks_add": "networks.add",
"networks_associate_host": "networks.associate_host",
"networks_associate_project": "networks.associate_project",
"networks_convert_into_with_meta": "networks.convert_into_with_meta",
"networks_create": "networks.create",
"networks_delete": "networks.delete",
"networks_disassociate": "networks.disassociate",
@ -109,17 +130,22 @@
"networks_findall": "networks.findall",
"networks_get": "networks.get",
"networks_list": "networks.list",
"quota_classes_convert_into_with_meta": "quota_classes.convert_into_with_meta",
"quota_classes_get": "quota_classes.get",
"quota_classes_update": "quota_classes.update",
"quotas_convert_into_with_meta": "quotas.convert_into_with_meta",
"quotas_defaults": "quotas.defaults",
"quotas_delete": "quotas.delete",
"quotas_get": "quotas.get",
"quotas_update": "quotas.update",
"security_group_default_rules_convert_into_with_meta": "security_group_default_rules.convert_into_with_meta",
"security_group_default_rules_create": "security_group_default_rules.create",
"security_group_default_rules_delete": "security_group_default_rules.delete",
"security_group_default_rules_list": "security_group_default_rules.list",
"security_group_rules_convert_into_with_meta": "security_group_rules.convert_into_with_meta",
"security_group_rules_create": "security_group_rules.create",
"security_group_rules_delete": "security_group_rules.delete",
"security_groups_convert_into_with_meta": "security_groups.convert_into_with_meta",
"security_groups_create": "security_groups.create",
"security_groups_delete": "security_groups.delete",
"security_groups_find": "security_groups.find",
@ -127,12 +153,20 @@
"security_groups_get": "security_groups.get",
"security_groups_list": "security_groups.list",
"security_groups_update": "security_groups.update",
"server_groups_convert_into_with_meta": "server_groups.convert_into_with_meta",
"server_groups_create": "server_groups.create",
"server_groups_delete": "server_groups.delete",
"server_groups_find": "server_groups.find",
"server_groups_findall": "server_groups.findall",
"server_groups_get": "server_groups.get",
"server_groups_list": "server_groups.list",
"server_migrations_convert_into_with_meta": "server_migrations.convert_into_with_meta",
"server_migrations_find": "server_migrations.find",
"server_migrations_findall": "server_migrations.findall",
"server_migrations_get": "server_migrations.get",
"server_migrations_list": "server_migrations.list",
"server_migrations_live_migrate_force_complete": "server_migrations.live_migrate_force_complete",
"server_migrations_live_migration_abort": "server_migrations.live_migration_abort",
"servers_add_fixed_ip": "servers.add_fixed_ip",
"servers_add_floating_ip": "servers.add_floating_ip",
"servers_add_security_group": "servers.add_security_group",
@ -140,6 +174,7 @@
"servers_change_password": "servers.change_password",
"servers_clear_password": "servers.clear_password",
"servers_confirm_resize": "servers.confirm_resize",
"servers_convert_into_with_meta": "servers.convert_into_with_meta",
"servers_create": "servers.create",
"servers_create_image": "servers.create_image",
"servers_delete": "servers.delete",
@ -186,11 +221,13 @@
"servers_start": "servers.start",
"servers_stop": "servers.stop",
"servers_suspend": "servers.suspend",
"servers_trigger_crash_dump": "servers.trigger_crash_dump",
"servers_unlock": "servers.unlock",
"servers_unpause": "servers.unpause",
"servers_unrescue": "servers.unrescue",
"servers_unshelve": "servers.unshelve",
"servers_update": "servers.update",
"services_convert_into_with_meta": "services.convert_into_with_meta",
"services_delete": "services.delete",
"services_disable": "services.disable",
"services_disable_log_reason": "services.disable_log_reason",
@ -199,39 +236,25 @@
"services_findall": "services.findall",
"services_force_down": "services.force_down",
"services_list": "services.list",
"usage_convert_into_with_meta": "usage.convert_into_with_meta",
"usage_find": "usage.find",
"usage_findall": "usage.findall",
"usage_get": "usage.get",
"usage_list": "usage.list",
"versions_convert_into_with_meta": "versions.convert_into_with_meta",
"versions_find": "versions.find",
"versions_findall": "versions.findall",
"versions_get_current": "versions.get_current",
"versions_list": "versions.list",
"virtual_interfaces_convert_into_with_meta": "virtual_interfaces.convert_into_with_meta",
"virtual_interfaces_find": "virtual_interfaces.find",
"virtual_interfaces_findall": "virtual_interfaces.findall",
"virtual_interfaces_list": "virtual_interfaces.list",
"volume_snapshots_create": "volume_snapshots.create",
"volume_snapshots_delete": "volume_snapshots.delete",
"volume_snapshots_find": "volume_snapshots.find",
"volume_snapshots_findall": "volume_snapshots.findall",
"volume_snapshots_get": "volume_snapshots.get",
"volume_snapshots_list": "volume_snapshots.list",
"volume_types_create": "volume_types.create",
"volume_types_delete": "volume_types.delete",
"volume_types_find": "volume_types.find",
"volume_types_findall": "volume_types.findall",
"volume_types_get": "volume_types.get",
"volume_types_list": "volume_types.list",
"volumes_create": "volumes.create",
"volumes_convert_into_with_meta": "volumes.convert_into_with_meta",
"volumes_create_server_volume": "volumes.create_server_volume",
"volumes_delete": "volumes.delete",
"volumes_delete_server_volume": "volumes.delete_server_volume",
"volumes_find": "volumes.find",
"volumes_findall": "volumes.findall",
"volumes_get": "volumes.get",
"volumes_get_server_volume": "volumes.get_server_volume",
"volumes_get_server_volumes": "volumes.get_server_volumes",
"volumes_list": "volumes.list",
"volumes_update_server_volume": "volumes.update_server_volume"
},
"glance": {

View File

@ -33,6 +33,8 @@ MODULE_MAPPING = {
'barbican': ['barbican.orders_list', actions.BarbicanAction],
'mistral': ['mistral.workflows_get', actions.MistralAction],
'designate': ['designate.domains_list', actions.DesignateAction],
'magnum': ['magnum.bays_list', actions.MagnumAction],
'murano': ['murano.deployments_list', actions.MuranoAction]
}
EXTRA_MODULES = ['neutron', 'swift', 'zaqar']

View File

@ -14,12 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from mistral.actions import std_actions as std
from mistral.services import action_manager as a_m
from mistral.tests.unit import base
class ActionManagerTest(base.DbTestCase):
def test_register_standard_actions(self):
action_list = a_m.get_registered_actions()
@ -31,7 +33,10 @@ class ActionManagerTest(base.DbTestCase):
self._assert_single_item(action_list, name="std.javascript")
self._assert_single_item(action_list, name="nova.servers_get")
self._assert_single_item(action_list, name="nova.volumes_delete")
self._assert_single_item(
action_list,
name="nova.volumes_delete_server_volume"
)
server_find_action = self._assert_single_item(
action_list,