Last active
August 29, 2015 14:19
-
-
Save domq/aa6f6fb8fb94b51e49b6 to your computer and use it in GitHub Desktop.
epflsti/cluster.foreman: run step 4 of foreman_setup wizard
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
# TODO: turn this into a "rails runner" script | |
class ForemanSetup::ProvisionersController | |
# Re-open the class and neuter the "all done, transfer to view" plumbing: | |
def step5_foreman_setup_provisioner_path | |
end | |
def process_success(ignored) | |
end | |
end | |
c = ForemanSetup::ProvisionersController.new() | |
FakeRequest = Struct.new(:parameters) | |
c.request = FakeRequest.new | |
c.request.parameters = { | |
:id => 1, | |
"foreman_setup_provisioner" => { | |
"hostgroup_attributes" => { | |
"id" => 1, | |
"medium_id" => 1 | |
}, | |
"activation_key" => { "value" => "" }, | |
"satellite_type" => { "value" => "" }, | |
}, | |
"medium_type" => "path" | |
} | |
c.instance_variable_set( | |
:@provisioner, ForemanSetup::Provisioner.find_by_provision_interface("eth0")) | |
c.step4_update() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment