Top Level Namespace
- Includes:
- CloudCLI
Defined Under Namespace
Modules: CloudCLI, CloudClient, DriverExecHelper, OpenNebula, Role, Service, VCenterDriver Classes: ActionManager, GenericCommand, LocalCommand, OpenNebulaDriver, RemotesCommand, SSHCommand, Sample, SampleDriver, TemplateDriver, VCenterConf, VirtualMachineDriver
Constant Summary collapse
- BIN_LOCATION =
ONE_LOCATION + '/bin'
- LIB_LOCATION =
ONE_LOCATION + '/lib'
- ETC_LOCATION =
ONE_LOCATION + '/etc/'
- VAR_LOCATION =
ONE_LOCATION+"/var/"
- CHECK_REFS =
true
- ONE_LOCATION =
ENV["ONE_LOCATION"]
Instance Method Summary collapse
- #check_item(item, target_class) ⇒ Object
- #check_valid(parameter, label) ⇒ Object
-
#error_message(message) ⇒ Object
—————————————————————————- # Helper functions # —————————————————————————- #.
Methods included from CloudCLI
#cmd_name, #print_xml, #version_text
Instance Method Details
#check_item(item, target_class) ⇒ Object
124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/vcenter_driver.rb', line 124 def check_item(item, target_class) item.name if CHECK_REFS if target_class if !item.instance_of?(target_class) raise "Expecting type 'RbVmomi::VIM::#{target_class}'. " \ "Got '#{item.class} instead." end end rescue RbVmomi::Fault => e raise "Reference \"#{item._ref}\" error [#{e.}]. \ The reference does not exist" end |
#check_valid(parameter, label) ⇒ Object
116 117 118 119 120 121 122 |
# File 'lib/vcenter_driver.rb', line 116 def check_valid(parameter, label) return unless parameter.nil? || parameter.empty? STDERR.puts ("The parameter '#{label}'\ is required for this action.") exit(-1) end |
#error_message(message) ⇒ Object
—————————————————————————- # Helper functions # —————————————————————————- #
108 109 110 111 112 113 114 |
# File 'lib/vcenter_driver.rb', line 108 def () error_str = "ERROR MESSAGE --8<------\n" error_str << error_str << "\nERROR MESSAGE ------>8--" error_str end |