--- /dev/null
+/*\r
+ * Copyright (c) 2015 Huawei Technologies Co., Ltd. and others. All rights reserved.\r
+ *\r
+ * This program and the accompanying materials are made available under the\r
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
+ * and is available at http://www.eclipse.org/legal/epl-v10.html\r
+ */\r
+ \r
+module nemo-intent {\r
+ yang-version 1; \r
+ namespace "urn:opendaylight:params:xml:ns:yang:nemo:intent"; \r
+ prefix "nemo-intent";\r
+ \r
+ import nemo-common {prefix nemo-common;}\r
+ import nemo-object {prefix nemo-object;}\r
+ import nemo-operation {prefix nemo-operation;}\r
+ import nemo-result {prefix nemo-result;}\r
+ \r
+ revision "2015-06-29" {\r
+ description\r
+ "Initial revision.";\r
+ }\r
+ \r
+ grouping intent-instance {\r
+ description "";\r
+ leaf intent-id {\r
+ description "A unique ID for the intent";\r
+ type nemo-common:intent-id; \r
+ mandatory true;\r
+ } \r
+ leaf intent-name {\r
+ description "A user-visible name for the intent";\r
+ type nemo-common:intent-name;\r
+ } \r
+ container objects {\r
+ description "";\r
+ list node {\r
+ key "node-id";\r
+ uses nemo-object:node-instance;\r
+ } \r
+ list connection {\r
+ key "connection-id";\r
+ uses nemo-object:connection-instance;\r
+ } \r
+ list flow {\r
+ key "flow-id";\r
+ uses nemo-object:flow-instance;\r
+ } \r
+ }\r
+ \r
+ container operation {\r
+ leaf apply-on-object {\r
+ type nemo-common:object-id;\r
+ mandatory true;\r
+ } \r
+ leaf priority{\r
+ type int64;\r
+ default 1;\r
+ }\r
+ uses nemo-operation:condition-instance;\r
+ uses nemo-operation:action-instance;\r
+ uses nemo-operation:constraint-instance; \r
+ }\r
+ \r
+ container result{\r
+ leaf result-to-object {\r
+ type nemo-common:object-id;\r
+ mandatory true;\r
+ } \r
+ leaf priority{\r
+ type int64;\r
+ default 1;\r
+ }\r
+ choice result-mode {\r
+ mandatory true;\r
+ case expected-case {\r
+ uses nemo-result:expected-instance;\r
+ }\r
+ case avoid-case{\r
+ uses nemo-result:avoid-instance;\r
+ } \r
+ } \r
+ } \r
+ container contexts{\r
+ list context {\r
+ key "context-id";\r
+ leaf context-id {\r
+ type nemo-common:context-id;\r
+ mandatory true;\r
+ }\r
+ leaf context-name{\r
+ type nemo-common:context-name;\r
+ mandatory true;\r
+ }\r
+ } \r
+ }\r
+ }\r
+ \r
+ container users {\r
+ description "The list of all known users";\r
+ list user {\r
+ description "";\r
+ key "user-id";\r
+ leaf user-id {\r
+ description "A unique ID for the user"; \r
+ type nemo-common:user-id;\r
+ mandatory true;\r
+ }\r
+ leaf user-name {\r
+ description "A user-visible name for the user";\r
+ type nemo-common:user-name;\r
+ mandatory false;\r
+ } \r
+ list intent{\r
+ key "intent-id";\r
+ uses intent-instance;\r
+ min-elements 1;\r
+ }\r
+ } \r
+ }\r
+ \r
+ rpc register-node-instance {\r
+ description "";\r
+ input {\r
+ uses nemo-object:node-instance;\r
+ }\r
+ }\r
+ \r
+ rpc unregister-node-instance {\r
+ description "";\r
+ input {\r
+ uses nemo-object:node-instance;\r
+ }\r
+ }\r
+ \r
+}
\ No newline at end of file