app/api/v_sphere/virtual_machine.rb
# handles name format YYYYMMDD_vm-name
handles name format YYYYMMDD_vm-name
handles name format YYYYMMDD_vm - name
def name
      return @name unless @name.nil?
      @vsphere_name ||= @vm.name
      @name = if /^\d{8}_vm-/.match? @vsphere_name
        @vsphere_name[12..-1]
      else
        @vsphere_name
      end
    end
def name return @name unless @name . nil? @vsphere_name ||= @vm . name @name = if / ^ \d {8}_vm- / . match? @vsphere_name @vsphere_name [ 12 .. - 1 ] else @vsphere_name end end
handles name format YYYYMMDD_vm-name
handles name format YYYYMMDD_vm - name