Bharat saraswal | 246a70c | 2016-06-16 13:24:06 +0530 | [diff] [blame] | 1 | module port-pair { |
| 2 | |
| 3 | yang-version 1; |
| 4 | |
| 5 | namespace "sfc.portpair"; |
| 6 | |
| 7 | prefix "port-pair"; |
| 8 | |
| 9 | organization "Huawei india pvt. ltd.."; |
| 10 | |
| 11 | description "This submodule defines for port pair."; |
| 12 | |
| 13 | revision "2016-05-24" { |
| 14 | description "Initial revision."; |
| 15 | } |
| 16 | |
| 17 | typedef uuid { |
| 18 | type string; |
| 19 | } |
| 20 | |
| 21 | typedef port-pair-id { |
| 22 | type uuid; |
| 23 | } |
| 24 | |
| 25 | typedef tenant-id { |
| 26 | type uuid; |
| 27 | } |
| 28 | |
| 29 | grouping port-pair { |
| 30 | container port-pair { |
| 31 | |
| 32 | leaf name { |
| 33 | type string; |
| 34 | } |
| 35 | |
| 36 | leaf id { |
| 37 | type port-pair-id; |
| 38 | } |
| 39 | |
| 40 | leaf tenantIdentifier { |
| 41 | type tenant-id; |
| 42 | } |
| 43 | |
| 44 | leaf description { |
| 45 | type string; |
| 46 | } |
| 47 | |
| 48 | leaf ingress { |
| 49 | type uuid; |
| 50 | } |
| 51 | |
| 52 | leaf egress { |
| 53 | type uuid; |
| 54 | } |
| 55 | } |
| 56 | } |
| 57 | rpc exists { |
| 58 | input { |
| 59 | leaf id { |
| 60 | type port-pair-id; |
| 61 | } |
| 62 | } |
| 63 | output { |
| 64 | leaf is-present { |
| 65 | type boolean; |
| 66 | } |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | rpc get-port-pair-count { |
| 71 | |
| 72 | output { |
| 73 | leaf count { |
| 74 | type int32; |
| 75 | } |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | rpc get-port-pair { |
| 80 | input { |
| 81 | leaf id { |
| 82 | type port-pair-id; |
| 83 | } |
| 84 | } |
| 85 | output { |
| 86 | uses port-pair; |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | rpc create-port-pair { |
| 91 | input { |
| 92 | uses port-pair; |
| 93 | } |
| 94 | output { |
| 95 | leaf is-created { |
| 96 | type boolean; |
| 97 | } |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | rpc update-port-pair { |
| 102 | input { |
| 103 | uses port-pair; |
| 104 | } |
| 105 | output { |
| 106 | leaf is-updated { |
| 107 | type boolean; |
| 108 | } |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | rpc remove-port-pair { |
| 113 | input { |
| 114 | leaf id { |
| 115 | type port-pair-id; |
| 116 | } |
| 117 | } |
| 118 | output { |
| 119 | leaf is-removed { |
| 120 | type boolean; |
| 121 | } |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | |
| 126 | notification port-pair-put { |
| 127 | uses port-pair; |
| 128 | } |
| 129 | |
| 130 | notification port-pair-Delete { |
| 131 | uses port-pair; |
| 132 | } |
| 133 | |
| 134 | notification port-pair-Update { |
| 135 | uses port-pair; |
| 136 | } |
| 137 | } |