forked from hooklift/node-libvirt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
domain.h
94 lines (86 loc) · 4.89 KB
/
domain.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
// Copyright 2010, Camilo Aguilar. Cloudescape, LLC.
#ifndef SRC_DOMAIN_H_
#define SRC_DOMAIN_H_
#include "node_libvirt.h"
#include "hypervisor.h"
#include "error.h"
namespace NodeLibvirt {
class Domain : public ObjectWrap {
friend class Hypervisor;
public:
static void Initialize();
static inline bool HasInstance(v8::Handle<v8::Value> value) {
if (!value->IsObject()) {
return false;
}
v8::Local<v8::Object> object = value->ToObject();
return constructor_template->HasInstance(object);
}
virDomainPtr domain() const;
protected:
static Handle<Value> Create(const Arguments& args);
static Handle<Value> LookupById(const Arguments& args);
static Handle<Value> LookupByName(const Arguments& args);
static Handle<Value> LookupByUUID(const Arguments& args);
static Handle<Value> Define(const Arguments& args);
static Handle<Value> Undefine(const Arguments& args);
static Handle<Value> GetId(const Arguments& args);
static Handle<Value> GetInfo(const Arguments& args);
static Handle<Value> GetName(const Arguments& args);
static Handle<Value> GetUUID(const Arguments& args);
static Handle<Value> GetAutostart(const Arguments& args);
static Handle<Value> SetAutostart(const Arguments& args);
static Handle<Value> GetOsType(const Arguments& args);
static Handle<Value> GetMaxMemory(const Arguments& args);
static Handle<Value> SetMaxMemory(const Arguments& args);
static Handle<Value> SetMemory(const Arguments& args);
static Handle<Value> GetMaxVcpus(const Arguments& args);
static Handle<Value> IsActive(const Arguments& args);
static Handle<Value> IsPersistent(const Arguments& args);
static Handle<Value> IsUpdated(const Arguments& args);
static Handle<Value> Reboot(const Arguments& args);
static Handle<Value> Save(const Arguments& args);
static Handle<Value> Restore(const Arguments& args);
static Handle<Value> Suspend(const Arguments& args);
static Handle<Value> Resume(const Arguments& args);
static Handle<Value> Shutdown(const Arguments& args);
static Handle<Value> Start(const Arguments& args);
static Handle<Value> Stop(const Arguments& args);
static Handle<Value> GetVcpus(const Arguments& args);
static Handle<Value> SetVcpus(const Arguments& args);
static Handle<Value> Migrate(const Arguments& args);
static Handle<Value> SetMigrationMaxDowntime(const Arguments& args);
static Handle<Value> PinVcpu(const Arguments& args);
static Handle<Value> AttachDevice(const Arguments& args);
static Handle<Value> DetachDevice(const Arguments& args);
static Handle<Value> UpdateDevice(const Arguments& args);
static Handle<Value> ToXml(const Arguments& args);
static Handle<Value> GetJobInfo(const Arguments& args);
static Handle<Value> AbortCurrentJob(const Arguments& args);
static Handle<Value> GetSchedType(const Arguments& args);
static Handle<Value> GetSchedParams(const Arguments& args);
static Handle<Value> SetSchedParams(const Arguments& args);
static Handle<Value> GetSecurityLabel(const Arguments& args);
static Handle<Value> SaveManagedImage(const Arguments& args);
static Handle<Value> RemoveManagedImage(const Arguments& args);
static Handle<Value> HasManagedImage(const Arguments& args);
static Handle<Value> MemoryPeek(const Arguments& args);
static Handle<Value> GetMemoryStats(const Arguments& args);
static Handle<Value> BlockPeek(const Arguments& args);
static Handle<Value> GetBlockStats(const Arguments& args);
static Handle<Value> GetBlockInfo(const Arguments& args);
static Handle<Value> CoreDump(const Arguments& args);
static Handle<Value> GetInterfaceStats(const Arguments& args);
static Handle<Value> HasCurrentSnapshot(const Arguments& args);
static Handle<Value> RevertToSnapshot(const Arguments& args);
static Handle<Value> TakeSnapshot(const Arguments& args);
static Handle<Value> GetCurrentSnapshot(const Arguments& args);
static Handle<Value> DeleteSnapshot(const Arguments& args);
static Handle<Value> LookupSnapshotByName(const Arguments& args);
static Handle<Value> GetSnapshots(const Arguments& args);
private:
virDomainPtr domain_;
static Persistent<FunctionTemplate> constructor_template;
};
} //namespace NodeLibvirt
#endif // SRC_DOMAIN_H