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
115 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/vcenter_driver.rb', line 115 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
107 108 109 110 111 112 113 |
# File 'lib/vcenter_driver.rb', line 107 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 # —————————————————————————- #
99 100 101 102 103 104 105 |
# File 'lib/vcenter_driver.rb', line 99 def () error_str = "ERROR MESSAGE --8<------\n" error_str << error_str << "\nERROR MESSAGE ------>8--" error_str end |