class Fog::Proxmox::Compute::Mock
Mock
class
class Mock
action_server
request
class Mock
clone_server
request
class Mock
create_backup
request
class Mock
create_server
request
class Mock
create_snapshot
request
class Mock
create_spice
request
class Mock
create_term
request
class Mock
create_vnc
request
class Mock
delete_server
request
class Mock
delete_snapshot
request
class Mock
delete_volume
request
class Mock
get_statistics request
class Mock
get_server_config
request
class Mock
get_server_status
request
class Mock
get_snapshot_config
request
class Mock
get_task
collection
class Mock
get_volume
request
class Mock
list_nodes
request
class Mock
list_servers
request
class Mock
list_snapshots
request
class Mock
list_storages
request
class Mock
list_tasks
request
class Mock
list_volumes
request
class Mock
status_task
class Mock
migrate_server
request
class Mock
move_volume
request
class Mock
next_vmid
collection
class Mock
resize_container
request
class Mock
resize_server
request
class Mock
rollback_snapshot
request
class Mock
status_task
class Mock
get_task
collection
class Mock
template_server
request
class Mock
update_server
request
class Mock
update_snapshot
request
Attributes
Public Class Methods
# File lib/fog/proxmox/compute.rb, line 102 def initialize(options = {}) @proxmox_uri = URI.parse(options[:proxmox_url]) @proxmox_auth_method = options[:proxmox_auth_method] @proxmox_tokenid = options[:proxmox_tokenid] @proxmox_userid = options[:proxmox_userid] @proxmox_username = options[:proxmox_username] @proxmox_password = options[:proxmox_password] @proxmox_token = options[:proxmox_token] @proxmox_path = @proxmox_uri.path @config = options end
Public Instance Methods
# File lib/fog/proxmox/compute/requests/action_server.rb, line 41 def action_server(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/clone_server.rb, line 40 def clone_server(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/create_backup.rb, line 38 def create_backup(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/create_server.rb, line 39 def create_server(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/create_snapshot.rb, line 40 def create_snapshot(_path_params, _body_params) 'UPID:proxmox:00003E13:6F21770F:5E37E2D0:qmsnapshot:100:root@pam:' end
# File lib/fog/proxmox/compute/requests/create_spice.rb, line 40 def create_spice(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/create_term.rb, line 40 def create_term(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/create_vnc.rb, line 40 def create_vnc(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/delete_server.rb, line 41 def delete_server(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/delete_snapshot.rb, line 41 def delete_snapshot(_path_params, _query_params) 'UPID:proxmox:00002CC5:646E24B1:5E1C7E26:qmdelsnapshot:100:root@pam:' end
# File lib/fog/proxmox/compute/requests/delete_volume.rb, line 36 def delete_volume(_node, _storage, _volume); end
# File lib/fog/proxmox/compute/requests/get_node_statistics.rb, line 40 def get_node_statistics(_path_params, _query_params); end
# File lib/fog/proxmox/compute/requests/get_server_config.rb, line 39 def get_server_config(_path_params) { onboot: 0, memory: 512, ostype: 'l26', cores: 1, keyboard: 'en-us', digest: nil, smbios1: nil, vmgenid: nil, balloon: 0, kvm: 0, cpu: 'cputype=kvm64', sockets: 1, bootdisk: 'scsi0', vga: 'std' } end
# File lib/fog/proxmox/compute/requests/get_server_status.rb, line 39 def get_server_status(_path_params) { netout: 0, ha: { 'managed' => 0 }, mem: 0, vmid: '100', maxdisk: 8_589_934_592, diskread: 0, template: '', qmpstatus: 'stopped', diskwrite: 0, maxmem: 536_870_912, pid: nil, uptime: 0, status: 'stopped', cpu: 'cputype=kvm64', cpus: 1, disk: 0, netin: 0 } end
# File lib/fog/proxmox/compute/requests/get_snapshot_config.rb, line 40 def get_snapshot_config(_path_params); end
# File lib/fog/proxmox/compute/requests/get_task.rb, line 37 def get_task(_node, _upid); end
# File lib/fog/proxmox/compute/requests/get_vnc.rb, line 40 def get_vnc(_path_params, _query_params); end
# File lib/fog/proxmox/compute/requests/get_volume.rb, line 38 def get_volume(_node, _storage, _volume); end
# File lib/fog/proxmox/compute/requests/list_nodes.rb, line 37 def list_nodes [ { 'node' => 'proxmox', 'type' => 'node' } ] end
# File lib/fog/proxmox/compute/requests/list_servers.rb, line 38 def list_servers(_options = {}) if options[:type] == 'qemu' [ { 'vmid' => '100', 'type' => 'qemu', 'node_id' => 'proxmox', 'config' => { 'vmid' => '100', 'description' => nil, 'smbios1' => nil, 'numa' => 0, 'kvm' => 0, 'vcpus' => nil, 'cores' => 1, 'bootdisk' => 'scsi0', 'onboot' => 0, 'boot' => nil, 'agent' => '0', 'scsihw' => nil, 'sockets' => 1, 'memory' => 512, 'min_memory' => nil, 'shares' => nil, 'balloon' => 0, 'cpu' => 'cputype=kvm64', 'cpulimit' => nil, 'cpuunits' => nil, 'keyboard' => 'en-us', 'vga' => 'std', 'storage' => nil, 'template' => '', 'arch' => nil, 'swap' => nil, 'hostname' => nil, 'nameserver' => nil, 'searchdomain' => nil, 'password' => nil, 'startup' => nil, 'console' => nil }, 'digest' => nil, 'maxdisk' => 8_589_934_592, 'disk' => 0, 'diskwrite' => 0, 'diskread' => 0, 'uptime' => 0, 'netout' => 0, 'netin' => 0, 'cpu' => 'cputype=kvm64', 'cpus' => 1, 'template' => '', 'status' => 'stopped', 'maxcpu' => nil, 'mem' => 0, 'maxmem' => 536_870_912, 'qmpstatus' => 'stopped', 'ha' => { 'managed' => 0 }, 'pid' => nil, 'blockstat' => nil, 'balloon' => 0, 'ballooninfo' => nil, 'vmgenid' => nil, 'lock' => nil, 'maxswap' => nil, 'swap' => nil } ] else [] end end
# File lib/fog/proxmox/compute/requests/list_snapshots.rb, line 39 def list_snapshots(_path_params) [ { 'name' => 'snapshot1', 'description' => 'latest snapshot', 'snaptime' => 1_578_057_452, 'vmstate' => 0, 'node_id' => 'proxmox', 'server_id' => '100', 'server_type' => 'qemu', 'vmgenid' => nil }, { 'name' => 'snapshot2', 'description' => 'latest snapshot2', 'snaptime' => 1_578_058_452, 'vmstate' => 0, 'node_id' => 'proxmox', 'server_id' => '100', 'server_type' => 'qemu', 'vmgenid' => nil } ] end
# File lib/fog/proxmox/compute/requests/list_storages.rb, line 40 def list_storages(_node, _options = {}) [] end
# File lib/fog/proxmox/compute/requests/list_tasks.rb, line 38 def list_tasks(_node, _options = {}) [] end
# File lib/fog/proxmox/compute/requests/list_volumes.rb, line 38 def list_volumes(_node, _storage, _options = {}) [] end
# File lib/fog/proxmox/compute/requests/log_task.rb, line 38 def log_task(_node, _upid, _options = {}) [{ 't' => 'TASK OK', 'n' => 1 }] end
# File lib/fog/proxmox/compute/requests/migrate_server.rb, line 40 def migrate_server(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/move_disk.rb, line 39 def move_disk(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/move_volume.rb, line 39 def move_volume(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/next_vmid.rb, line 38 def next_vmid; end
# File lib/fog/proxmox/compute/requests/resize_container.rb, line 39 def resize_container(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/resize_server.rb, line 39 def resize_server(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/rollback_snapshot.rb, line 42 def rollback_snapshot(_path_params) 'UPID:proxmox:00002EBF:646E2BF3:5E1C7E39:qmrollback:100:root@pam:' end
# File lib/fog/proxmox/compute/requests/status_task.rb, line 37 def status_task(_node, _upid); end
# File lib/fog/proxmox/compute/requests/stop_task.rb, line 37 def stop_task(_node, _taskid); end
# File lib/fog/proxmox/compute/requests/template_server.rb, line 40 def template_server(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/update_server.rb, line 40 def update_server(_path_params, _body_params); end
# File lib/fog/proxmox/compute/requests/update_snapshot.rb, line 41 def update_snapshot(_path_params, _body_params); end