From 4049495fc204c2bf4807b3132cbb6a2d8de15ccc Mon Sep 17 00:00:00 2001 From: Gilles Dubreuil Date: Fri, 9 Dec 2016 15:23:18 +1100 Subject: [PATCH 1/2] Cloud Network: Fix method name missing raw --- .../providers/openstack/network_manager/network_router.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/manageiq/providers/openstack/network_manager/network_router.rb b/app/models/manageiq/providers/openstack/network_manager/network_router.rb index 0f6e5f8937a..c79e2ab5f66 100644 --- a/app/models/manageiq/providers/openstack/network_manager/network_router.rb +++ b/app/models/manageiq/providers/openstack/network_manager/network_router.rb @@ -8,7 +8,7 @@ class ManageIQ::Providers::Openstack::NetworkManager::NetworkRouter < ::NetworkR supports :add_interface supports :remove_interface - def self.create_network_router(ext_management_system, options) + def self.raw_create_network_router(ext_management_system, options) cloud_tenant = options.delete(:cloud_tenant) name = options.delete(:name) router = nil From c4a116d416bba5f5d34c92ca4c1aa3604ce01ce6 Mon Sep 17 00:00:00 2001 From: Gilles Dubreuil Date: Wed, 4 Jan 2017 16:21:37 +1100 Subject: [PATCH 2/2] Cloud Network: Raw command is raw prefixed method --- .../openstack/network_manager/network_router.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/models/manageiq/providers/openstack/network_manager/network_router.rb b/app/models/manageiq/providers/openstack/network_manager/network_router.rb index c79e2ab5f66..57bea273e79 100644 --- a/app/models/manageiq/providers/openstack/network_manager/network_router.rb +++ b/app/models/manageiq/providers/openstack/network_manager/network_router.rb @@ -22,7 +22,7 @@ def self.raw_create_network_router(ext_management_system, options) raise MiqException::MiqNetworkRouterCreateError, e.to_s, e.backtrace end - def delete_network_router + def raw_delete_network_router ext_management_system.with_provider_connection(connection_options(cloud_tenant)) do |service| service.delete_router(ems_ref) end @@ -38,7 +38,7 @@ def delete_network_router_queue(userid) } queue_opts = { :class_name => self.class.name, - :method_name => 'delete_network_router', + :method_name => 'raw_delete_network_router', :instance_id => id, :priority => MiqQueue::HIGH_PRIORITY, :role => 'ems_operations', @@ -48,7 +48,7 @@ def delete_network_router_queue(userid) MiqTask.generic_action_with_callback(task_opts, queue_opts) end - def update_network_router(options) + def raw_update_network_router(options) ext_management_system.with_provider_connection(connection_options(cloud_tenant)) do |service| service.update_router(ems_ref, options) end @@ -64,7 +64,7 @@ def update_network_router_queue(userid, options = {}) } queue_opts = { :class_name => self.class.name, - :method_name => 'update_network_router', + :method_name => 'raw_update_network_router', :instance_id => id, :priority => MiqQueue::HIGH_PRIORITY, :role => 'ems_operations', @@ -74,7 +74,7 @@ def update_network_router_queue(userid, options = {}) MiqTask.generic_action_with_callback(task_opts, queue_opts) end - def add_interface(cloud_subnet_id) + def raw_add_interface(cloud_subnet_id) raise ArgumentError, _("Subnet ID cannot be nil") if cloud_subnet_id.nil? subnet = CloudSubnet.find(cloud_subnet_id) raise ArgumentError, _("Subnet cannot be found") if subnet.nil? @@ -94,7 +94,7 @@ def add_interface_queue(userid, cloud_subnet) } queue_opts = { :class_name => self.class.name, - :method_name => 'add_interface', + :method_name => 'raw_add_interface', :instance_id => id, :priority => MiqQueue::HIGH_PRIORITY, :role => 'ems_operations', @@ -104,7 +104,7 @@ def add_interface_queue(userid, cloud_subnet) MiqTask.generic_action_with_callback(task_opts, queue_opts) end - def remove_interface(cloud_subnet_id) + def raw_remove_interface(cloud_subnet_id) raise ArgumentError, _("Subnet ID cannot be nil") if cloud_subnet_id.nil? subnet = CloudSubnet.find(cloud_subnet_id) raise ArgumentError, _("Subnet cannot be found") if subnet.nil? @@ -124,7 +124,7 @@ def remove_interface_queue(userid, cloud_subnet) } queue_opts = { :class_name => self.class.name, - :method_name => 'remove_interface', + :method_name => 'raw_remove_interface', :instance_id => id, :priority => MiqQueue::HIGH_PRIORITY, :role => 'ems_operations',