Module: Chef::Knife::Cloud::VraServiceOptions
- Included in:
- VraCatalogList, VraServerCreate, VraServerDelete, VraServerList, VraServerShow
- Defined in:
- lib/chef/knife/cloud/vra_service_options.rb
Overview
rubocop:disable Style/AlignParameters rubocop:disable Metrics/BlockLength
Class Method Summary collapse
Class Method Details
.included(includer) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/chef/knife/cloud/vra_service_options.rb', line 27 def self.included(includer) includer.class_eval do option :vra_base_url, long: "--vra-base-url API_URL", description: "URL for the vRA server", proc: proc { |url| url.sub(%r{/(\/)+$/}, "") } option :vra_username, long: "--vra-username USERNAME", description: "Username to use with the vRA API" option :vra_password, long: "--vra-password PASSWORD", description: "Password to use with the vRA API" option :vra_tenant, long: "--vra-tenant TENANT", description: "Tenant name (organization) to use with the vRA API" option :vra_disable_ssl_verify, long: "--vra-disable-ssl-verify", description: "Skip any SSL verification for the vRA API", boolean: true, default: false option :vra_page_size, long: "--page-size NUM_OF_ITEMS", description: "Maximum number of items to fetch from the vRA API when pagination is forced", default: 200, proc: proc { |page_size| page_size.to_i } option :request_refresh_rate, long: "--request-refresh-rate SECS", description: "Number of seconds to sleep between each check of the request status, defaults to 2", default: 2, proc: proc { |secs| secs.to_i } end end |