Sha256: c241225eeb16373c79e7e512d2d304edb01063ae93aceade9363175746a165d9

Contents?: true

Size: 850 Bytes

Versions: 22

Compression:

Stored size: 850 Bytes

Contents

module VmShepherd
  module Vcloud
    class Deployer
      def self.deploy_and_power_on_vapp(client:, ovf_dir:, vapp_config:, vdc_name:)
        catalog = client.create_catalog(vapp_config.catalog)

        # upload template and instantiate vapp
        catalog.upload_vapp_template(vdc_name, vapp_config.name, ovf_dir)

        # instantiate template
        network_config                = VCloudSdk::NetworkConfig.new(vapp_config.network, 'Network 1')
        vapp                          = catalog.instantiate_vapp_template(vapp_config.name, vdc_name, vapp_config.name, nil, nil, network_config)

        # reconfigure vm
        vm                            = vapp.find_vm_by_name(vapp_config.name)
        vm.product_section_properties = vapp_config.build_properties

        # power on vapp
        vapp.power_on
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
vm_shepherd-1.12.6 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-3.0.2 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-3.0.1 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-3.0.0 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-2.0.3 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-2.0.2 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-2.0.1 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-2.0.0 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-1.12.5 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-1.12.4 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-1.12.3 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-1.12.2 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-1.12.1 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-1.12.0 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-1.11.8 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-1.11.7 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-1.11.6 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-1.11.5 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-1.11.4 lib/vm_shepherd/vcloud/deployer.rb
vm_shepherd-1.11.3 lib/vm_shepherd/vcloud/deployer.rb