Skip to content

Commit

Permalink
Support for opening URL from the UI through automate.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinpovolny committed Jul 10, 2019
1 parent e4272c2 commit 364c8cc
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ module MiqAeMethodService
class MiqAeServiceCloudTenant < MiqAeServiceModelBase
expose :update_cloud_tenant
expose :delete_cloud_tenant
require_relative "mixins/miq_ae_external_url_mixin"
include MiqAeExternalUrlMixin
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ class MiqAeServiceExtManagementSystem < MiqAeServiceModelBase
include MiqAeServiceInflectorMixin
require_relative "mixins/miq_ae_service_custom_attribute_mixin"
include MiqAeServiceCustomAttributeMixin
require_relative "mixins/miq_ae_external_url_mixin"
include MiqAeExternalUrlMixin

expose :to_s
expose :authentication_userid
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module MiqAeMethodService
class MiqAeServiceGenericObject < MiqAeServiceModelBase
require_relative "mixins/miq_ae_service_remove_from_vmdb_mixin"
include MiqAeServiceRemoveFromVmdb
require_relative "mixins/miq_ae_external_url_mixin"
include MiqAeExternalUrlMixin
require 'drb'

def add_to_service(service)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module MiqAeMethodService
class MiqAeServiceMiqGroup < MiqAeServiceModelBase
require_relative "mixins/miq_ae_service_custom_attribute_mixin"
include MiqAeServiceCustomAttributeMixin
require_relative "mixins/miq_ae_external_url_mixin"
include MiqAeExternalUrlMixin

expose :filters, :method => :get_filters
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class MiqAeServiceService < MiqAeServiceModelBase
include MiqAeServiceCustomAttributeMixin
require_relative "mixins/miq_ae_service_remove_from_vmdb_mixin"
include MiqAeServiceRemoveFromVmdb
require_relative "mixins/miq_ae_external_url_mixin"
include MiqAeExternalUrlMixin

expose :retire_service_resources
expose :automate_retirement_entrypoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ module MiqAeMethodService
class MiqAeServiceUser < MiqAeServiceModelBase
require_relative "mixins/miq_ae_service_custom_attribute_mixin"
include MiqAeServiceCustomAttributeMixin
require_relative "mixins/miq_ae_external_url_mixin"
include MiqAeExternalUrlMixin

expose :current_tenant, :association => true
expose :name
Expand Down
3 changes: 3 additions & 0 deletions lib/miq_automation_engine/service_models/miq_ae_service_vm.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module MiqAeMethodService
class MiqAeServiceVm < MiqAeServiceVmOrTemplate
require_relative "mixins/miq_ae_external_url_mixin"
include MiqAeExternalUrlMixin

def remote_console_url=(url)
object_send(:remote_console_url=, url, MiqAeEngine::DrbRemoteInvoker.workspace.ae_user.id)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module MiqAeExternalUrlMixin
extend ActiveSupport::Concern
def external_url=(url)
object_send(:external_url=, url, MiqAeEngine::DrbRemoteInvoker.workspace.ae_user)
end
end

0 comments on commit 364c8cc

Please sign in to comment.