summaryrefslogtreecommitdiffstats
path: root/source/schema/nfv-mano.yang
blob: 0e3bbbe0d949aa0582e55ad0ae3cffce8c4a2cd4 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
module nfv-mano {
  namespace "urn:opnfv:promise:nfv:mano";
  prefix mano;

  import access-control-models { prefix acm; }
  import nfv-infrastructure { prefix nfvi; }
  import complex-types { prefix ct; }
  import ietf-inet-types { prefix inet; }
  import iana-crypt-hash { prefix ianach; }

  description
    "NFV Management and Orchestration Data Models with complex types and typed
     instance identifiers representing the NFVO, VNFM, and the VIM.";
  
  revision 2015-09-03 {
    description
      "This YANG module is modeled using 'yangforge' which natively provides
       complex types and typed instance identifiers.  This module
       provides various collections of infrastructure management data
       models for instance based management";
  }

  grouping provider-credentials {
    leaf endpoint {
      type inet:uri;
      description "The target URL endpoint for the resource provider";
      mandatory true;
    }
    leaf username {
      type string;
      mandatory true;
    }
    leaf password {
      type acm:password;
      mandatory true;
    }
    leaf region {
      type string;
      description "Optional specified region for the provider";
    }
  }

  ct:complex-type ServiceOrchestrator {
    ct:extends acm:Domain;
    ct:abstract true;
    // TBD
  }

  ct:complex-type ResourceOrchestrator {
    ct:extends acm:Domain;
    ct:abstract true;
    // TBD
  }

  ct:complex-type VirtualNetworkFunctionManager {
    ct:extends acm:Domain;
    ct:abstract true;
    // TBD
  }
  
  ct:complex-type VirtualInfrastructureManager {
    ct:extends acm:Domain;
    ct:abstract true;
    
    leaf name { type string; mandatory true; }

    container auth {
      description 'Conceptual container that will be extended by explicit provider';
      // ct:instance-list credentials { ct:instance-type AccessCredential; }
      // ct:instance-list roles { ct:instance-type AccessRole; }
      // ct:instance-list policies { ct:instance-type AccessPolicy; }
    }

    ct:instance-list hosts { ct:instance-type nfvi:PhysicalHost; }
    ct:instance-list hypervisors { ct:instance-type nfvi:Hypervisor; }

    container compute {
      if-feature has-compute;
      description "Contains compute related resources";

      ct:instance-list servers { ct:instance-type nfvi:ServerInstance; }
      ct:instance-list images { ct:instance-type nfvi:VirtualMachineImage; }
      ct:instance-list flavors { ct:instance-type nfvi:ComputeFlavor; }
    }

    container network {
      if-feature has-networking;
      description "Contains networking related resources";
        
      ct:instance-list networks { ct:instance-type nfvi:Network; }
      ct:instance-list subnets { ct:instance-type nfvi:SubNetwork; }
      ct:instance-list ports { ct:instance-type nfvi:SwitchPort; }
      //ct:instance-list routers { ct:instance-type Router; }
    }
  }

  container stack {
    container nfvo {
      ct:instance service  { ct:instance-type ServiceOrchestrator; }
      ct:instance resource { ct:instance-type ResourceOrchestrator; }
    }
    container vnfm {
      ct:instance-list managers { ct:instance-type VirtualNetworkFunctionManager; }
    }
    container vim {
      ct:instance-list managers { ct:instance-type VirtualInfrastructureManager; }
    }
  }

  rpc add-vim {
    description "This operation allows you to add a new VirtualInfrastructureManager into the NFVI stack";
    input {
      uses provider-credentials;
      
      leaf provider {
        description "Select a specific resource provider";
        mandatory true;
        type enumeration {
          enum openstack;
          enum hp;
          enum rackspace;
          enum amazon {
            status planned;
          }
          enum joyent {
            status planned;
          }
          enum azure {
            status planned;
          }
        }
      }
    }
    output {
      leaf id {
        description "Unique identifier for the newly added provider found in /promise/providers";
        type instance-identifier {
          ct:instance-type VirtualInfrastructureManager;
        }
      }
      leaf result {
        type enumeration {
          enum success;
          enum error;
        }
      }
    }
  }
}