Skip to content

Instantly share code, notes, and snippets.

View MarcGrimme's full-sized avatar

Marc Grimme MarcGrimme

View GitHub Profile
@MarcGrimme
MarcGrimme / gist:7025809
Created October 17, 2013 14:22
default_volume_attributes
{
"datastore"=> "TESTING",
"name"=> "Hard disk",
"size_gb"=> "20",
"_delete"=> "",
"thin" => false,
}
@MarcGrimme
MarcGrimme / gist:7025797
Created October 17, 2013 14:22
default_nic_attributes
{
"network"=> "QA",
"_delete"=> "",
"type"=> "VirtualVmxnet3"
}
@MarcGrimme
MarcGrimme / gist:7025775
Created October 17, 2013 14:21
compute_datastore_filter
default_datastore_filter datastore or not datastore.name == "TESTING"
@MarcGrimme
MarcGrimme / gist:7025764
Created October 17, 2013 14:21
interfaces_attributes
{ "interfaces_attributes"=>{
"new_interfaces"=>{
"_destroy"=>"false",
"type"=>"Nic::Managed",
"mac"=>"FF:FF:FF:FF:FF:FF",
"name"=>if params[:host][:name] then params[:host][:name] else "" end + "-srv",
"domain_id"=>@domain.id,
"subnet_id"=> if @domain.subnets and @subnet and @domain.subnets.find_by_name(@subnet.name.split("-")[0]+"-Backend") then
@domain.subnets.find_by_name(@subnet.name.split("-")[0]+"-Backend").id
else
@MarcGrimme
MarcGrimme / gist:7025738
Created October 17, 2013 14:19
compute_attributes
{ "compute_attributes" => {
"guest_id"=> "rhel6_64Guest",
"cluster"=> "ATIX_Test",
"path"=> "/Datencenter/axref200/vm",
"interfaces_attributes" => {
"0" => view_context.default_nic_attributes,
"1" => view_context.default_nic_attributes,
},
"volumes_attributes"=> {
"0" => view_context.default_volume_attributes.merge(:size_gb => 10)
@MarcGrimme
MarcGrimme / gist:7022277
Created October 17, 2013 10:00
Settings for foreman
---
# You must restart the Rack server after changing either of these values
# because they are cached at startup.
#
:unattended: true
:login: true
:require_ssl: false
:locations_enabled: false
:organizations_enabled: false
#JSONP or "JSON with padding" is a complement to the base JSON data format.