summaryrefslogtreecommitdiffstats
path: root/docs/refspec/open-o/sdn-nsd/sdno_type_definition.yaml
blob: 5b6375035c324e44fe45d4a12b9ffc5be276a6c3 (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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
# Copyright 2017 Huawei Technologies Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
tosca_definitions_version: tosca_simple_yaml_1_0
description: sdno basic types


metadata:
    version: 0.1
    vendor: sdno
    template_author: Huawei
    
# *****************************************************************************
# macros
# ****************************************************************************    
dsl_definitions:
        
    BaseServiceInfo: &BaseServiceInfo
        adminStatus:
            type: AdministrationStateType
            description: Used to administratively activate or deactivate already deployed service object
            default: 'none'
        operStatus:
            type: OperationalStateType
            description: Used to indicate if the service entity is operational.
            default: 'none'
        syncStatus:
            type: SyncStateType
            description: Used to indicate of the service entity is in sync or out of sync with the network
            default: 'none'
        actionState:
            type: ActionStateType
            description: Stores the result of the last action on the service object.
            default: 'none'
        statusReason:
            type: string
            description: In case of ERROR actionState, it will have the reason for the error. 
                         Otherwise its empty. It is required to make create process to be asynchronous.
            default: 'none'
        createTime:
            type: string
            description: create time
            default: 'none'
        updateTime:
            type: string
            description: update time
            default: 'none' 
        ownerID:
            type: string
            description: ID of the owner of the object, can contain controllerID
            default: 'sdno' 
        tenantID:
            type: string
            description: ID of the tenant
            default: 'none'
        location:
            type: string
            description: Location if on single location
            default: 'none'
        additionalInfo:
            type: list
            #max size = 1000
            entry_schema:                     
                type: AdditionalInfoRow
            required: false
 
# *****************************************************************************
# data types
# *****************************************************************************
data_types:

    ActionType:
        derived_from: string
        description: >-
            Generic API operations for Connectivity Service lifecycle management. The specific REST requests would be mapped to 
            these generic ones.
        constraints:
            - valid_values: ['create','deploy','get','update','undeploy','delete']
 
    ActionStateType:
        derived_from: string
        description: State and/or result of the generic API operations. In the case of the exception, additional information may be present in the statusReason property.
        constraints:
            - valid_values: ['none', 'normal', 'creating', 'deleting', 'updating', 'create_exception', 'update_exception','delete_exception','deploying', 'deploy_exception', 'undeploying', 'undeploy_exception', 'checking', 'check_exception']

    LifecycleStateType:
        derived_from: string
        description: >-
            Currently supported lifecycle states for connectivity service. Connectivity Service can either be created 
            in the inventory or deployed on the network. 
        constraints:
            - valid_values: ['none','created','deployed']

    AdministrationStateType:
        derived_from: string
        description: >-
            Administrative State that indicates if already deployed connectivity service object or its component is activated or not.
        constraints:
            - valid_values: ['none', 'active', 'inactive', 'partially_inactive']

    OperationalStateType:
        derived_from: string
        description: >-
            Operational State that indicates if already deployed and activated connectivity service object or its component is operational or not.
        constraints:
            - valid_values: ['none','up','down', 'partially_down']

 
    SyncStateType:
        derived_from: string
        description: >-
            Sync State that indicates if already deployed and activated connectivity service object is in sync or out of sync with the network.
        constraints:
            - valid_values: ['none', 'sync', 'out-sync']
 
    DirectionalityType:
        derived_from: string
        description: Directionality of the connectivity service flow in the endpoint or port.
        constraints:
            - valid_values: ['input','output','bidirectional']
 
    AdditionalInfoRow:
        derived_from: tosca.datatypes.Root
        description: Row in the additional info list
        properties:
            id:
                type: string
                default: 'none'
            name:
                type: string
                default: 'none'
            value:
                type: string
                default: 'none'
            firstParentUuid:
                type: string
                default: 'none'
 
    StateMachineRow:
        derived_from: tosca.datatypes.Root
        description: Row in the state transition table
        properties:
            apiOperation:
                type: ActionType
            currentState:
                type: LifecycleStateType
            transitionWorkflow:
                type: string
            newState:
                type: LifecycleStateType

    StateMachineType:
        derived_from: tosca.datatypes.Root
        description: Connectivity Service State Engine
        properties:
            rows:
                type: list
                entry_schema:
                    type: StateMachineRow


# *****************************************************************************
# capability types
# *****************************************************************************                
                
capability_types:
    # ConnectionEndPoint can be derived from tosca.capabilities.Endpoint ?
    sdno.capability.ConnectionEndPoint:
            derived_from: tosca.capabilities.Root

    # ServiceEndPoint can be derived from tosca.capabilities.Endpoint ?
    sdno.capability.ServiceEndPoint:
            derived_from: tosca.capabilities.Root
      
    sdno.capability.Realizes:
         derived_from: tosca.capabilities.Root

    sdno.capability.Host:
         derived_from: tosca.capabilities.Node

    sdno.capability.Bindable:
         derived_from: tosca.capabilities.Node
 
# *****************************************************************************
# interface_types
# *****************************************************************************                
interface_types:

    sdno.interfaces.lifecycle.Standard:
        create:
            description: Standard lifecycle create operation.
        update:
            description: Standard lifecycle configure and update operation.
        deploy:
            description: Standard lifecycle deploy operation.
        undeploy:
            description: Standard lifecycle undeploy operation.
        delete:
            description: Standard lifecycle delete operation.
        get:
            description: Standard lifecycle get operation.


# *****************************************************************************
# relationship types
# *****************************************************************************
relationship_types:
 
    sdno.relationship.ServiceEndPoint:
        description: >-
            The relationship specifies which ServiceEndPoints are terminating the ConnectivityService.
            The association of the ConnectivityService to ServiceEndPoints is made via the Ports of the ConnectivityService,
            where each Port of the ConnectivityService has a role and directionality in the context of the ConnectivityService.
        derived_from: tosca.relationships.Root
        properties:
            # This is initial simple ConnectivityServicePort model, this may be enhanced later via separate Nodes and/or Types
            connectivityServicePort:
                type: string
                required: false
            role:
                type: string
                required: false
            directionality:
                type: DirectionalityType
                required: false
        valid_target_types: [sdno.capability.ServiceEndPoint]
              
    sdno.relationship.ConnectionEndPoint:
        description: >-
            The relationship specifies which ConnectionEndPonts are terminating the Connection.
            The association of the Connection to ConnectionEndPoints is made via the Ports of the Connection,
            where each Port of the Connection has a role and directionality in the context of the Connection. 
        derived_from: tosca.relationships.Root
        properties:
            # This is initial simple ConnectionPort model, this may be enhanced later via separate Nodes and/or Types
            connectionPort:
                type: string
                required: false
            role:
                type: string
                required: false
            directionality:
                type: DirectionalityType
                required: false
        valid_target_types: [sdno.capability.ConnectionEndPoint]
    
    sdno.relationship.RealizedBy:
        description: >-
            The relationship specifies what Connenctions are Connectivity Services or Connections realized from. 
        derived_from: tosca.relationships.Root
        valid_target_types: [sdno.capability.Realizes]   
 
    sdno.relationship.HostedOn:
        description: >-
            The relationship specifies what Node the Endpoint is hosted on. 
        derived_from: tosca.relationships.Root
        valid_target_types: [sdno.capability.Host]   

    sdno.relationship.BindsTo:
        description: >-
            The relationship  represents a network association relationship between NodeEdgePoint and Network Node types
        derived_from: tosca.relationships.DependsOn
        valid_target_types: [sdno.capability.Bindable]
 
 
# *****************************************************************************
# artifact types
# *****************************************************************************
artifact_types:
    sdno.artifacts.Implementation.Swagger:
        derived_from: tosca.artifacts.Implementation
        description: swagger API document
        mime_type: application/x-jaml
        file_ext: [jaml]

    sdno.artifacts.Implementation.ToscaSwaggerMapper:
        derived_from: tosca.artifacts.Implementation
        description: mapping between property of TOSCA node instance and data model used by swagger API
        mime_type: application/x-tsmap
        file_ext: [tsmap]

 
# *****************************************************************************
# node types
# *****************************************************************************
node_types:

    sdno.node.Root:
        derived_from: tosca.nodes.Root
        description: The SDNO Node Type all other SDNO base Node Types derive from
        properties:
            id:
               type: string
               required: true
               default: 'none'
            name:
               type: string
               required: true
               default: 'none' 
            description:
                type: string
                required: true
                default: 'none' 
            version:
                type: string
                required: true
                default: '1.0'
 
    sdno.node.Node:
        derived_from: sdno.node.Root
        description: >-
            It represents a network element which can be managed remotely (through controller or not). Sometimes called managed element.
        properties:
            ipAddress:
               type: string
               default: 0.0.0.0
            logicID:
                type: string
                default: 'none'
            phyNeID:
                type: string
                default: 'none'
            nativeID:
                type: string
                default: 'none'
            controllerID:
                type: string
                default: 'none'
            siteName:
                type: string
                default: 'none'
        capabilities:
            host: 
                type: sdno.capability.Host
            binding: 
                type: sdno.capability.Bindable        

    sdno.node.NodeEdgePoint:
        derived_from: sdno.node.Root
        description: >-
            It represents the inward network-facing aspects of the edge-port functions that access the forwarding capabilities provided by the Node.
        properties:
            mgrIP:
               type: string
               default: 0.0.0.0
        requirements:
            - binding: 
                node: sdno.node.Node
                capability: sdno.capability.Bindable
                relationship: sdno.relationship.BindsTo
              
    sdno.node.ServiceEndPoint:
        derived_from: sdno.node.Root
        description: >-
            It represents the outward customer-facing aspects of the edge-port functions that access the forwarding capabilities provided by the Node.
            Hence it provides a limited, simplified view of interest to external clients, 
            that enable the clients to request connectivity without the need to understand the provider network internals.
        properties: *BaseServiceInfo
        capabilities:
            endPoint:
                type: sdno.capability.ServiceEndPoint
        requirements:
                - node:
                    node: sdno.node.Node
                    capability:  sdno.capability.Host
                    relationship: sdno.relationship.HostedOn
                    occurrences: [0, UNBOUNDED]
                        
    sdno.node.ConnectivityService:
        derived_from: sdno.node.Root
        description: >-
            It represents an “intent-like” request for connectivity between two or more ServiceEndPoints.
            As such, ConnectivityService is a container for connectivity request details and is distinct 
            from the Connection that realizes the request
        # properties: *BaseServiceInfo
        properties: 
            adminStatus:
                type: AdministrationStateType
                description: Used to administratively activate or deactivate already deployed service object
                default: 'none'
            operStatus:
                type: OperationalStateType
                description: Used to indicate if the service entity is operational.
                default: 'none'
            syncStatus:
                type: SyncStateType
                description: Used to indicate of the service entity is in sync or out of sync with the network
                default: 'none'
            actionState:
                type: ActionStateType
                description: Stores the result of the last action on the service object.
                default: 'none'
            statusReason:
                type: string
                description: In case of ERROR actionState, it will have the reason for the error. 
                             Otherwise its empty. It is required to make create process to be asynchronous.
                default: 'none'
            createTime:
                type: string
                description: create time
                default: 'none'
            updateTime:
                type: string
                description: update time
                default: 'none' 
            ownerID:
                type: string
                description: ID of the owner of the object, can contain controllerID
                default: 'sdno' 
            tenantID:
                type: string
                description: ID of the tenant
                default: 'none'
            location:
                type: string
                description: Location if on single location
                default: 'none'
            additionalInfo:
                type: list
                #max size = 1000
                entry_schema:                     
                    type: AdditionalInfoRow
                required: false
            templateId:
                type: string
                default: 'none'
            lifecycleState: 
                type: LifecycleStateType
                default: 'none'
            state_machine:
                type: StateMachineType
                default:
                    rows:
                        - {apiOperation: create, currentState: none, transitionWorkflow: create, newState: created}
                        - {apiOperation: create, currentState: created, transitionWorkflow: error, newState: created}
                        - {apiOperation: create, currentState: deployed, transitionWorkflow: error, newState: deployed}
                        - {apiOperation: deploy, currentState: none, transitionWorkflow: deploy, newState: deployed}
                        - {apiOperation: deploy, currentState: created, transitionWorkflow: deployCreated, newState: deployed}
                        - {apiOperation: deploy, currentState: deployed, transitionWorkflow: ERR, newState: deployed}
                        - {apiOperation: get, currentState: none, transitionWorkflow: ERR, newState: none}
                        - {apiOperation: get, currentState: created, transitionWorkflow: get, newState: created}
                        - {apiOperation: get, currentState: deployed, transitionWorkflow: get, newState: deployed}
                        - {apiOperation: update, currentState: none, transitionWorkflow: ERR, newState: none}
                        - {apiOperation: update, currentState: created, transitionWorkflow: updatecreated, newState: created}
                        - {apiOperation: update, currentState: deployed, transitionWorkflow: updateDeployed, newState: deployed}
                        - {apiOperation: undeploy, currentState: none, transitionWorkflow: ERR, newState: none}
                        - {apiOperation: undeploy, currentState: created, transitionWorkflow: ERR, newState: created}
                        - {apiOperation: undeploy, currentState: deployed, transitionWorkflow: undeploy, newState: created}
                        - {apiOperation: delete, currentState: none, transitionWorkflow: ERR, newState: none}
                        - {apiOperation: delete, currentState: created, transitionWorkflow: deleteCreated, newState: none}
                        - {apiOperation: delete, currentState: deployed, transitionWorkflow: deleteDeployed, newState: none}
        interfaces:
            standard:
                type: sdno.interfaces.lifecycle.Standard
                create: 
                    implementation: 
                        primary: 'POST /openoapi/sdnonslcm/v1/ns'
                delete:
                     implementation: 
                         primary: 'DELETE /openoapi/sdnonslcm/v1/ns/{instanceid}'
                get:
                     implementation: 
                         primary: 'GET /openoapi/sdnonslcm/v1/ns/{instanceid}'                  
                deploy:
                     implementation: 
                         primary: 'POST /openoapi/sdnonslcm/v1/ns/{instanceid}/instantiate'
                undeploy:
                     implementation: 
                         primary: 'POST /openoapi/sdnonslcm/v1/ns/{instanceid}/terminate'
                update: 
                     implementation:
                         primary: 'PUT /openoapi/sdnonslcm/v1/ns/{instanceid}'
        requirements:
            - endPoint:
                node: sdno.node.ServiceEndPoint
                capability:  sdno.capability.ServiceEndPoint
                relationship: sdno.relationship.ServiceEndPoint
                # check aria processing for the min=2 
                occurrences: [2, UNBOUNDED]
            - realizes:
                node: sdno.node.Connection
                capability: sdno.capability.Realizes
                relationship: sdno.relationship.RealizedBy
                occurrences: [1, UNBOUNDED]

            
    sdno.node.ConnectionEndPoint:
        derived_from: sdno.node.Root
        properties:
            *BaseServiceInfo
        interfaces:
            standard:
                type: sdno.interfaces.lifecycle.Standard    
        description: >-
            It represents the ingress/egress port aspects that access the forwarding function provided 
            by the Connection.
        capabilities:
            endPoint:
                type: sdno.capability.ConnectionEndPoint
        requirements:
                - node:
                    node: sdno.node.Node
                    capability:  sdno.capability.Host
                    relationship: sdno.relationship.HostedOn
                    occurrences: [0, UNBOUNDED] 
 
    sdno.node.Connection:
        derived_from: sdno.node.Root
        properties:
            *BaseServiceInfo
        interfaces:
            standard:
                type: sdno.interfaces.lifecycle.Standard         
        description: >-
            The Connection represents an enabled potential for forwarding between two or more connectionEndPoints
        capabilities:
            realizes:
                type: sdno.capability.Realizes
        requirements:
            - endPoint:
                node: sdno.node.ConnectionEndPoint
                capability: sdno.capability.ConnectionEndPoint
                relationship: sdno.relationship.ConnectionEndPoint
                # check aria processing for the min=2 
                occurrences: [0, UNBOUNDED]
            - realizes:
                node: sdno.node.Connection
                capability: sdno.capability.Realizes
                relationship: sdno.relationship.RealizedBy
                occurrences: [0, UNBOUNDED]