Skip to content

Commit

Permalink
Merge pull request #13072 from gildub/openstack_network_controller_ne…
Browse files Browse the repository at this point in the history
…twork_router_fix_queue

Network Router:  Raw commands are wrapped in raw prefixed methods
  • Loading branch information
blomquisg authored Jan 9, 2017
2 parents 1e9fd2e + c4a116d commit 2ef53fa
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,7 +22,7 @@ def self.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
Expand All @@ -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',
Expand All @@ -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
Expand All @@ -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',
Expand All @@ -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?
Expand All @@ -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',
Expand All @@ -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?
Expand All @@ -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',
Expand Down

0 comments on commit 2ef53fa

Please sign in to comment.