@@ -83,6 +83,23 @@ def self.find_object_for_belongs_to_filter(name)
8383 includes ( :parent_manager ) . find_by ( :parent_managers_ext_management_systems => { :name => name } )
8484 end
8585
86+ def create_cloud_network_queue ( userid , options = { } )
87+ task_opts = {
88+ :action => "creating Cloud Network for user #{ userid } " ,
89+ :userid => userid
90+ }
91+ queue_opts = {
92+ :class_name => self . class . name ,
93+ :method_name => 'create_cloud_network' ,
94+ :instance_id => id ,
95+ :role => 'ems_operations' ,
96+ :queue_name => queue_name_for_ems_operations ,
97+ :zone => my_zone ,
98+ :args => [ options ]
99+ }
100+ MiqTask . generic_action_with_callback ( task_opts , queue_opts )
101+ end
102+
86103 def create_cloud_subnet_queue ( userid , options = { } )
87104 task_opts = {
88105 :action => "creating Cloud Subnet for user #{ userid } " ,
@@ -93,6 +110,92 @@ def create_cloud_subnet_queue(userid, options = {})
93110 :method_name => 'create_cloud_subnet' ,
94111 :instance_id => id ,
95112 :role => 'ems_operations' ,
113+ :queue_name => queue_name_for_ems_operations ,
114+ :zone => my_zone ,
115+ :args => [ options ]
116+ }
117+ MiqTask . generic_action_with_callback ( task_opts , queue_opts )
118+ end
119+
120+ def create_network_router_queue ( userid , options = { } )
121+ task_opts = {
122+ :action => "creating Network Router for user #{ userid } " ,
123+ :userid => userid
124+ }
125+ queue_opts = {
126+ :class_name => self . class . name ,
127+ :method_name => 'create_network_router' ,
128+ :instance_id => id ,
129+ :role => 'ems_operations' ,
130+ :queue_name => queue_name_for_ems_operations ,
131+ :zone => my_zone ,
132+ :args => [ options ]
133+ }
134+ MiqTask . generic_action_with_callback ( task_opts , queue_opts )
135+ end
136+
137+ def create_floating_ip_queue ( userid , options = { } )
138+ task_opts = {
139+ :action => "creating Floating IP for user #{ userid } " ,
140+ :userid => userid
141+ }
142+ queue_opts = {
143+ :class_name => self . class . name ,
144+ :method_name => 'create_floating_ip' ,
145+ :instance_id => id ,
146+ :role => 'ems_operations' ,
147+ :queue_name => queue_name_for_ems_operations ,
148+ :zone => my_zone ,
149+ :args => [ options ]
150+ }
151+ MiqTask . generic_action_with_callback ( task_opts , queue_opts )
152+ end
153+
154+ def create_security_group_queue ( userid , options = { } )
155+ task_opts = {
156+ :action => "creating Security Group for user #{ userid } " ,
157+ :userid => userid
158+ }
159+ queue_opts = {
160+ :class_name => self . class . name ,
161+ :method_name => 'create_security_group' ,
162+ :instance_id => id ,
163+ :role => 'ems_operations' ,
164+ :queue_name => queue_name_for_ems_operations ,
165+ :zone => my_zone ,
166+ :args => [ options ]
167+ }
168+ MiqTask . generic_action_with_callback ( task_opts , queue_opts )
169+ end
170+
171+ def create_security_policy_queue ( userid , options = { } )
172+ task_opts = {
173+ :action => "creating Security Policy for user #{ userid } " ,
174+ :userid => userid
175+ }
176+ queue_opts = {
177+ :class_name => self . class . name ,
178+ :method_name => 'create_security_policy' ,
179+ :instance_id => id ,
180+ :role => 'ems_operations' ,
181+ :queue_name => queue_name_for_ems_operations ,
182+ :zone => my_zone ,
183+ :args => [ options ]
184+ }
185+ MiqTask . generic_action_with_callback ( task_opts , queue_opts )
186+ end
187+
188+ def create_security_policy_rule_queue ( userid , options = { } )
189+ task_opts = {
190+ :action => "creating Security Policy Rule for user #{ userid } " ,
191+ :userid => userid
192+ }
193+ queue_opts = {
194+ :class_name => self . class . name ,
195+ :method_name => 'create_security_policy_rule' ,
196+ :instance_id => id ,
197+ :role => 'ems_operations' ,
198+ :queue_name => queue_name_for_ems_operations ,
96199 :zone => my_zone ,
97200 :args => [ options ]
98201 }
0 commit comments