Skip to content

Instantly share code, notes, and snippets.

@domq
Last active August 29, 2015 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save domq/aa6f6fb8fb94b51e49b6 to your computer and use it in GitHub Desktop.
Save domq/aa6f6fb8fb94b51e49b6 to your computer and use it in GitHub Desktop.
epflsti/cluster.foreman: run step 4 of foreman_setup wizard
# 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