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 Jun 11, 2019
1 parent e4272c2 commit fd120d3
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class MiqAeServiceHost < MiqAeServiceModelBase
include MiqAeServiceEmsOperationsMixin
require_relative "mixins/miq_ae_service_remove_from_vmdb_mixin"
include MiqAeServiceRemoveFromVmdb
require_relative "mixins/miq_ae_saved_url_mixin"
include MiqAeSavedUrlMixin

expose :read_only_storages
expose :writable_storages, :method => :writable_accessible_storages
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_saved_url_mixin"
include MiqAeSavedUrlMixin

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_saved_url_mixin"
include MiqAeSavedUrlMixin

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,7 @@
module MiqAeSavedUrlMixin
extend ActiveSupport::Concern
def saved_url=(url)
object_send(:saved_url=, url, MiqAeEngine::DrbRemoteInvoker.workspace.ae_user.id)
end
end

0 comments on commit fd120d3

Please sign in to comment.