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

Fixes #20881 - Clean legacy api from discovery #374

Merged
merged 1 commit into from Oct 17, 2017

Conversation

rabajaj0509
Copy link
Member

No description provided.

@theforeman-bot
Copy link
Member

Issues: #20881

Copy link
Member

@lzap lzap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good let's merge then!

@@ -180,7 +180,7 @@ def test_reboot_success_legacy
host = discover_host_from_facts(facts)
Host::Discovered::any_instance.stubs(:proxied?).returns(false)
Host::Discovered::any_instance.stubs(:proxy_url).returns("http://1.2.3.4:8443")
::ForemanDiscovery::NodeAPI::PowerLegacyDirectService.any_instance.expects(:reboot).returns(true)
::ForemanDiscovery::NodeAPI::PowerService.any_instance.expects(:reboot).returns(true)
ActiveSupport::Deprecation.silence do
post "reboot", { :id => host.id }, set_session_user
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also test_reboot_success_legacy test, can you remove that? It is useless I think. Other that that we can merge!

def legacy_direct_service(data)
ForemanDiscovery::NodeAPI::PowerLegacyDirectService.new(data)
end

def legacy_proxied_service(data)
ForemanDiscovery::NodeAPI::PowerLegacyProxiedService.new(data)
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The legacy_proxied_service can go away too, it should be unused.

::ProxyAPI::BMC.new(:url => url).power :action => "cycle"
end
end
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also remove the legacy_proxied.service.rb file please.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lzap good catch, thanks :)

@lzap
Copy link
Member

lzap commented Sep 15, 2017

Ok we are good to go once it is all green.

@lzap
Copy link
Member

lzap commented Sep 15, 2017

@lzap
Copy link
Member

lzap commented Sep 27, 2017

Foreman core fixed so [test]

@lzap
Copy link
Member

lzap commented Oct 3, 2017

We can hopefully [test] now.

@lzap
Copy link
Member

lzap commented Oct 17, 2017

One failure in core is unrelated. Thanks.

@lzap lzap merged commit 0ffb996 into theforeman:develop Oct 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants