Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed Feature Name from native to management_console #451

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class ManageIQ::Providers::IbmCloud::PowerVirtualServers::CloudManager < ManageI

supports :catalog
supports :create
supports :native_console
supports :management_console
supports :provisioning
supports_not :volume_availability_zones

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ class ManageIQ::Providers::IbmCloud::PowerVirtualServers::CloudManager::Vm < Man
end
supports :launch_html5_console

supports :native_console do
supports :management_console do
reason ||= _("VM Console not supported because VM is orphaned") if orphaned?
reason ||= _("VM Console not supported because VM is archived") if archived?
unsupported_reason_add(:native_console, reason) if reason
unsupported_reason_add(:management_console, reason) if reason
end

supports :resize do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,22 +69,22 @@
context "supports management console access?" do
it 'supports console access if powered on' do
vm.update(:raw_power_state => power_state_on)
expect(vm.supports?(:native_console)).to be_truthy
expect(vm.supports?(:management_console)).to be_truthy
end

it 'no console access if powered off' do
vm.update(:raw_power_state => power_state_suspended)
expect(vm.supports?(:native_console)).to be_truthy
expect(vm.supports?(:management_console)).to be_truthy
end

it 'no console access if orphaned' do
vm.update(:ems_id => nil)
expect(vm.supports?(:native_console)).to be_falsey
expect(vm.supports?(:management_console)).to be_falsey
end

it 'no console access if archived' do
vm.update(:ems_id => nil, :storage_id => nil)
expect(vm.supports?(:native_console)).to be_falsey
expect(vm.supports?(:management_console)).to be_falsey
end
end
end