aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/northbound/addCMHandle/model/src/main/yang/cm-handle-api.yang
blob: 29014f6629d0f2f08f1330c55fe275177e444547 (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
/*
 * Yang model for the CMHandle registration with CPS
 *
 */

module CMHandle-API {

    yang-version "1.1";

    namespace "org:onap:ccsdk";

    prefix cmHandle-api;

    description
      "Defines the services for cm-handle registration for the mounted devices in SDN-C.";

    revision "2021-06-15" {
      description
        "YANG Model for CM Handle API";
    }

    /**********************************************************************************
     * Data type definitions
     *
     * The following data type definitions are used to define common data structures,
     * define constraints, or to impart special meanings to data objects related to the
     * SDN-R controller functions.
     **********************************************************************************/

    typedef action {
        type enumeration {
            enum "addCMHandle";
        }
        description "The action to be taken by SDNR";
    }

    /**********************************************************************************
     * All requests will include this standard header
     *
     * The standard request header is used to define a correlation identification for
     * the request that is returned on all responses.  This correlation identifier
     * (called the service-request-id) is meaningful to the caller and is included on
     * all responses from the services.
     **********************************************************************************/

    /**********************************************************************************
     * All responses will include this standard header
     *
     * The standard response header includes the time of completion as well as a
     * success|failure indication
     **********************************************************************************/


   grouping status {
          description "The specific response codes are to be aligned with SDC reference doc
                       (main table removed to avoid duplication and digression from main table).
                       See SDC and ECOMP Distribution Consumer Interface Agreement";
          container status {
              description "The specific response codes are to be aligned with SDC reference doc
                           (main table removed to avoid duplication and digression from main table).
                           See SDC and ECOMP Distribution Consumer Interface Agreement";
              leaf code {
                  description "Response code";
                  type uint16;
                  mandatory true;
              }
              leaf message {
                  description "Response message";
                  type string;
                  mandatory true;
              }
          }
    }

     typedef cmHandle-action-status {
         type enumeration {
                 enum "IN_PROGRESS";
                 enum "SUCCESSFUL";
                 enum "FAILED";
                 enum "NOT_FOUND";
                 enum "ABORTED";
                 enum "MULTIPLE_REQUESTS_FOUND";
         }
         description "The status of the cm-handle registration";
     }

    /**********************************************************************************
     * Define the addCMHandle service
     **********************************************************************************/
    rpc addCMHandle {
        description "An operation to register the cm-handle for the mounted devices";

        output {
            uses status;
        }
    }
}