Class: Fog::Generators::Compute::VcloudDirector::Customization
- Inherits:
-
Object
- Object
- Fog::Generators::Compute::VcloudDirector::Customization
- Defined in:
- lib/fog/vcloud_director/generators/compute/customization.rb
Overview
This is the data structure it accepts, this is the output of #get_vm_customization:
{:type=>"application/vnd.vmware.vcloud.guestCustomizationSection+xml",
:href=>
"https://example.com/api/vApp/vm-2bbbf556-55dc-4974-82e6-aa6e814f0b64/guestCustomizationSection/",
:id=>"vm-2bbbf556-55dc-4974-82e6-aa6e814f0b64",
:enabled=>false,
:change_sid=>false,
:virtual_machine_id=>"2bbbf556-55dc-4974-82e6-aa6e814f0b64",
:join_domain_enabled=>false,
:use_org_settings=>false,
:admin_password_enabled=>false,
:admin_password_auto=>true,
:reset_password_required=>false,
:customization_script=>"hola\nmundo",
:has_customization_script=>true,
:computer_name=>"DEVWEB-001"}
This is what it generates:
<vcloud:GuestCustomizationSection
xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1"
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
href="https://vcloud.example.com/api/vApp/vm-55cc91f2-7e12-48d4-ad90-6f637a51fd88/guestCustomizationSection/"
ovf:required="false"
type="application/vnd.vmware.vcloud.guestCustomizationSection+xml">
<ovf:Info>Specifies Guest OS Customization Settings</ovf:Info>
<vcloud:Enabled>true</vcloud:Enabled>
<vcloud:ChangeSid>true</vcloud:ChangeSid>
<vcloud:VirtualMachineId>55cc91f2-7e12-48d4-ad90-6f637a51fd88</vcloud:VirtualMachineId>
<vcloud:JoinDomainEnabled>false</vcloud:JoinDomainEnabled>
<vcloud:UseOrgSettings>false</vcloud:UseOrgSettings>
<vcloud:AdminPasswordEnabled>true</vcloud:AdminPasswordEnabled>
<vcloud:AdminPasswordAuto>true</vcloud:AdminPasswordAuto>
<vcloud:ResetPasswordRequired>false</vcloud:ResetPasswordRequired>
<vcloud:ComputerName>DEVWEB-001</vcloud:ComputerName>
</vcloud:GuestCustomizationSection>
Instance Method Summary collapse
- #generate_xml ⇒ Object
-
#initialize(attrs = {}) ⇒ Customization
constructor
A new instance of Customization.
Constructor Details
#initialize(attrs = {}) ⇒ Customization
Returns a new instance of Customization.
46 47 48 |
# File 'lib/fog/vcloud_director/generators/compute/customization.rb', line 46 def initialize(attrs={}) @attrs = attrs end |
Instance Method Details
#generate_xml ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/fog/vcloud_director/generators/compute/customization.rb', line 50 def generate_xml output = "" output << header output << body(@attrs) output << tail output end |