Module: Chef::Knife::Cloud::OvirtServiceOptions

Included in:
OvirtServerCreate, OvirtServerDelete, OvirtServerList, OvirtStorageList, OvirtVolumeCreate, OvirtVolumeList
Defined in:
lib/chef/knife/cloud/ovirt_service_options.rb

Class Method Summary collapse

Class Method Details

.included(includer) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/chef/knife/cloud/ovirt_service_options.rb', line 12

def self.included(includer)
  includer.class_eval do
    include FogOptions
    # Ovirt Connection params.
    option :ovirt_username,
           short: '-A USERNAME',
           long: '--ovirt-username KEY',
           description: 'Your Ovirt Username',
           proc: proc { |key| Chef::Config[:knife][:ovirt_username] = key }

    option :ovirt_password,
           short: '-K SECRET',
           long: '--ovirt-password SECRET',
           description: 'Your Ovirt Password',
           proc: proc { |key| Chef::Config[:knife][:ovirt_password] = key }

    option :ovirt_url,
           long: '--ovirt-url URL',
           description: 'Your Ovirt URL',
           proc: proc { |url| Chef::Config[:knife][:ovirt_url] = url }
  end
end