class Fog::Compute::Openvz::Server

Public Instance Methods

compact(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 107
def compact(options = {})
  data = service.compact_server(ctid, options)
end
convert(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 103
def convert(options = {})
  data = service.convert_server(ctid, options)
end
destroy(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 81
def destroy(options = {})
  data = service.destroy_server(ctid, options)
end
exec(args) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 147
def exec(args)
  if args.is_a?(String)
    data = service.exec_server(ctid,[ args ])
  else
    data = service.exec_server(ctid,args)
  end
end
exec2(args) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 155
def exec2(args)
  if args.is_a?(String)
    data = service.exec2_server(ctid,[ args ])
  else
    data = service.exec2_server(ctid,args)
  end
end
mount(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 85
def mount(options = {})
  data = service.mount_server(ctid, options)
end
persisted?() click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 61
def persisted?
  ctid.nil?
end
public_ip_address() click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 69
def public_ip_address
  if ip.nil?
    return nil
  else
    return ip.first
  end
end
public_ip_addresses() click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 65
def public_ip_addresses
  return ip
end
quotainit(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 143
def quotainit(options = {})
  data = service.quotainit_server(ctid, options)
end
quotaoff(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 139
def quotaoff(options = {})
  data = service.quotaoff_server(ctid, options)
end
quotaon(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 135
def quotaon(options = {})
  data = service.quotaon_server(ctid, options)
end
ready?() click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 183
def ready?
  status == 'running'
end
reboot(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 97
def reboot(options = {})
  data = service.restart_server(ctid, options)
end
Also aliased as: restart
restart(options = {})
Alias for: reboot
resume(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 175
def resume(options = {})
  data = service.resume_server(ctid, options)
end
runscript(args) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 163
def runscript(args)
  if args.is_a?(String)
    data = service.runscript_server(ctid,[ args ])
  else
    data = service.runscript_server(ctid,args)
  end
end
save() click to toggle source

vzctl create <ctid> [–ostemplate <name>] [–config <name>]

[--layout ploop|simfs] [--hostname <name>] [--name <name>] [--ipadd <addr>]
[--diskspace <kbytes>] [--private <path>] [--root <path>]
[--local_uid <UID>] [--local_gid <GID>]
# File lib/fog/openvz/models/compute/server.rb, line 40
def save
  requires :ctid
  raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if persisted?
  meta_hash = {}
  create_options = {
    'ctid' => ctid,
    'ostemplate' => ostemplate,
    'layout' => layout ,
    'hostname' => hostname,
    'name' => name,
    'ipadd' => ipadd,
    'diskspace' => diskspace,
    'private' => private,
    'root' => root,
    'local_uid' => local_uid,
    'local_gid' => local_gid
  }
  data = service.create_server(create_options)
  reload
end
set(options) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 179
def set(options)
  data = service.set_server(ctid,options)
end
snapshot(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 111
def snapshot(options = {})
  data = service.snapshot_server(ctid, options)
end
snapshot_delete(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 119
def snapshot_delete(options = {})
  data = service.snapshot_delete_server(ctid, options)
end
snapshot_list(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 131
def snapshot_list(options = {})
  data = service.snapshot_list_server(ctid, options)
end
snapshot_mount(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 123
def snapshot_mount(options = {})
  data = service.snapshot_mount_server(ctid, options)
end
snapshot_switch(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 115
def snapshot_switch(options = {})
  data = service.snapshot_switch_server(ctid, options)
end
snapshot_umount(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 127
def snapshot_umount(options = {})
  data = service.snapshot_umount_server(ctid, options)
end
start() click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 77
def start
  data = service.start_server(ctid)
end
stop(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 93
def stop(options = {})
  data = service.stop_server(ctid, options)
end
suspend(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 171
def suspend(options = {})
  data = service.suspend_server(ctid, options)
end
umount(options = {}) click to toggle source
# File lib/fog/openvz/models/compute/server.rb, line 89
def umount(options = {})
  data = service.umount_server(ctid, options)
end