c3e790c39be6874cfcc2c824a23b8c149b9c41fb
[promise.git] / deprecated / source / schema / openstack-compute.yang
1 module openstack-compute {
2   prefix os-com;
3
4   import nfv-infrastructure { prefix nfvi; }
5   import complex-types { prefix ct; }
6
7   identity nova { base nvfi:compute; }
8   
9   feature availability-zone {
10     description "Specifies whether availability zone functionality is available.";
11   }
12   feature extended-status {
13     description "Specifies whether extended status functionality is available.";
14   }
15   feature security-groups {
16     description "Specifies whether security groups functionality is available.";
17   }
18
19   ct:complex-type ServerInstance {
20     ct:extends nfvi:ServerInstance;
21
22     leaf zone {
23       if-feature availability-zone;
24       type string;
25     }
26
27     leaf project {
28       type instance-identifier { ct:instance-type nfvi:ResourceProject; }
29       mandatory true;
30     }
31
32     container extended-status {
33       if-feature extended-status;
34       leaf locked-by;
35       leaf power;
36       leaf task;
37       leaf vm;
38     }
39
40     leaf-list security-groups {
41       if-feature security-groups;
42       type instance-identifier { ct:instance-type SecurityGroup; }
43     }
44
45   }
46
47   choice version {
48     case v2.1 {
49       ct:instance-list servers { ct:instance-type ServerInstance; }
50     }
51   }
52
53   // OpenStack Nova specific RPC calls
54   rpc resize {
55     input {
56       leaf server { type instance-type { ct:instance-type ServerInstance; } }
57       // other params for resize
58     }
59   }
60   rpc backup;
61   rpc migrate;
62   rpc restore;
63   rpc evacuate;
64   rpc lock;
65   rpc unlock;
66   rpc suspend;
67   rpc resume;
68   rpc pause;
69   rpc unpause;
70   rpc inject-network;
71   rpc reset-network;
72 }