summaryrefslogtreecommitdiffstats
path: root/source/schema/openstack-compute.yang
blob: c3e790c39be6874cfcc2c824a23b8c149b9c41fb (plain)
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
module openstack-compute {
  prefix os-com;

  import nfv-infrastructure { prefix nfvi; }
  import complex-types { prefix ct; }

  identity nova { base nvfi:compute; }
  
  feature availability-zone {
    description "Specifies whether availability zone functionality is available.";
  }
  feature extended-status {
    description "Specifies whether extended status functionality is available.";
  }
  feature security-groups {
    description "Specifies whether security groups functionality is available.";
  }

  ct:complex-type ServerInstance {
    ct:extends nfvi:ServerInstance;

    leaf zone {
      if-feature availability-zone;
      type string;
    }

    leaf project {
      type instance-identifier { ct:instance-type nfvi:ResourceProject; }
      mandatory true;
    }

    container extended-status {
      if-feature extended-status;
      leaf locked-by;
      leaf power;
      leaf task;
      leaf vm;
    }

    leaf-list security-groups {
      if-feature security-groups;
      type instance-identifier { ct:instance-type SecurityGroup; }
    }

  }

  choice version {
    case v2.1 {
      ct:instance-list servers { ct:instance-type ServerInstance; }
    }
  }

  // OpenStack Nova specific RPC calls
  rpc resize {
    input {
      leaf server { type instance-type { ct:instance-type ServerInstance; } }
      // other params for resize
    }
  }
  rpc backup;
  rpc migrate;
  rpc restore;
  rpc evacuate;
  rpc lock;
  rpc unlock;
  rpc suspend;
  rpc resume;
  rpc pause;
  rpc unpause;
  rpc inject-network;
  rpc reset-network;
}