+++ /dev/null
-*** Settings ***
-Documentation Test suite for nemo engine functionality
-
-Library RequestsLibrary
-Library OperatingSystem
-Library ../../../libraries/Common.py
-Variables ../../../variables/Variables.py
-Resource ../../../libraries/Utils.robot
-Resource ${CURDIR}/../../../libraries/TemplatedRequests.robot
-
-Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
-Suite Teardown Delete All Sessions
-
-
-*** Variables ***
-${REGISTER_TENANT_FILE} ${CURDIR}/../../../variables/nemo/register-user.json
-${STRUCTURE_HOST_FILE} ${CURDIR}/../../../variables/nemo/intent-node-host.json
-${STRUCTURE_INTENT_FILE} ${CURDIR}/../../../variables/nemo/structure-intent.json
-${PREDEFINE_ROLE_FILE} ${CURDIR}/../../../variables/nemo/predefine/role.json
-${PREDEFINE_NODE_FILE} ${CURDIR}/../../../variables/nemo/predefine/node.json
-${PREDEFINE_CONNECTION_FILE} ${CURDIR}/../../../variables/nemo/predefine/connection.json
-
-
-*** Test Cases ***
-Add Pre-define Role
- [Documentation] Add Pre-define Role
- [Tags] put
- ${body} OperatingSystem.Get File ${PREDEFINE_ROLE_FILE}
- ${resp} RequestsLibrary.Put Request
- ... session
- ... ${PREDEFINE_ROLE_URI}
- ... data=${body}
- ... headers=${HEADERS_YANG_JSON}
- Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
-
-Add Pre-define Node
- [Documentation] Add Pre-define Node
- [Tags] put
- ${body} OperatingSystem.Get File ${PREDEFINE_NODE_FILE}
- ${resp} RequestsLibrary.Put Request
- ... session
- ... ${PREDEFINE_NODE_URI}
- ... data=${body}
- ... headers=${HEADERS_YANG_JSON}
- Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
-
-Add Pre-define Connection
- [Documentation] Add Pre-define Connection
- [Tags] put
- ${body} OperatingSystem.Get File ${PREDEFINE_CONNECTION_FILE}
- ${resp} RequestsLibrary.Put Request
- ... session
- ... ${PREDEFINE_CONNECTION_URI}
- ... data=${body}
- ... headers=${HEADERS_YANG_JSON}
- Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
-
-Register Tenant
- [Documentation] Register Tenant
- [Tags] post
- ${body} OperatingSystem.Get File ${REGISTER_TENANT_FILE}
- ${resp} RequestsLibrary.Post Request
- ... session
- ... ${REGISTER_TENANT_URI}
- ... data=${body}
- ... headers=${HEADERS_YANG_JSON}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Add Host Intent
- [Documentation] Add Host Intent
- [Tags] post
- ${body} OperatingSystem.Get File ${STRUCTURE_HOST_FILE}
- ${resp} RequestsLibrary.Post Request
- ... session
- ... ${STRUCTURE_INTENT_URI}
- ... data=${body}
- ... headers=${HEADERS_YANG_JSON}
- Log ${resp.content}
- Should Be Equal As Strings ${resp.status_code} 200
-
-Add Structure Intent
- [Documentation] Add Structure Intent
- [Tags] post
- ${body} OperatingSystem.Get File ${STRUCTURE_INTENT_FILE}
- ${resp} RequestsLibrary.Post Request
- ... session
- ... ${STRUCTURE_INTENT_URI}
- ... data=${body}
- ... headers=${HEADERS_YANG_JSON}
- Should Be Equal As Strings ${resp.status_code} 200
+++ /dev/null
-# Place the suites in run order:
-integration/test/csit/suites/nemo/engine
OPERATIONAL_API = "/rests/data"
MODULES_API = "/rests/data/ietf-yang-library:modules-state?content=nonconfig"
-# NEMO Variables
-PREDEFINE_ROLE_URI = "/rests/data/nemo-user:user-roles"
-PREDEFINE_NODE_URI = "/rests/data/nemo-object:node-definitions"
-PREDEFINE_CONNECTION_URI = "/rests/data/nemo-object:connection-definitions"
-REGISTER_TENANT_URI = "/rests/operations/nemo-intent:register-user"
-STRUCTURE_INTENT_URI = "/rests/operations/nemo-intent:structure-style-nemo-update"
-
# TOKEN
AUTH_TOKEN_API = "/oauth2/token"
REVOKE_TOKEN_API = "/oauth2/revoke"
# FIXME: Move to a separate Centinel-related Resource and add description.
${GET_DASHBOARDRECORD}
... /rests/data/dashboardrule:dashboardRecord/?content=nonconfig
-# FIXME: Move to a separate Nemo-related Resource and add description.
-${GET_INTENTS_URI}
-... /retconf/config/intent:intents
# Deprecated. Sometimes conflicts with argument name. TODO: Migrate most suites to TemplatedRequests, then chose a more descriptive name.
&{HEADERS}
... Content-Type=application/json
# A shorthand. FIXME: Find who uses this and eliminate, or at least add a good description.
${PORTS}
... ports/detail.json
-# FIXME: Move to a separate Nemo-related Resource and add description.
-${PREDEFINE_CONNECTION_URI}
-... /rests/data/nemo-object:connection-definitions
-# FIXME: Move to a separate Nemo-related Resource and add description.
-${PREDEFINE_NODE_URI}
-... /rests/data/nemo-object:node-definitions
-# FIXME: Move to a separate Nemo-related Resource and add description.
-${PREDEFINE_ROLE_URI}
-... /rests/data/nemo-user:user-roles
# Deprecated. FIXME: Name is to generic. Eradicate.
${PREFIX}
... http://${ODL_SYSTEM_IP}:${PORT}
${REGEX_NAMESERVER} nameserver [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}
${REGEX_OBTAINED} [0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3} obtained
${REGEX_UUID} [0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}
-# FIXME: Move to a separate Nemo-related Resource and add description.
-${REGISTER_TENANT_URI}
-... /rests/operations/nemo-intent:register-user
${RESTCONFPORT} 8181 # Primary port for ODL RESTCONF, although 8080 should also work.
${RESTCONFPORT_TLS} 8443 # Port for ODL RESTCONF Secure (TLS) operations
# Deprecated. Restconf port used by AD-SAL services. FIXME: Eradicate.
# FIXME: Move to a separate Centinel-related Resource and add description.
${STREAMRECORD_CONFIG}
... /rests/data/stream:streamRecord
-# FIXME: Move to a separate Nemo-related Resource and add description.
-${STRUCTURE_INTENT_URI}
-... /rests/operations/nemo-intent:structure-style-nemo-update
# FIXME: Move to a separate Centinel-related Resource and add description.
${SUBSCRIPTION}
... /rests/data/subscribe:subscription/
+++ /dev/null
-{
- "input":{
- "user-id": "14ce424a-3e50-4a2a-ad5c-b29845158c8b",
- "objects":{
- "node":[
- {
- "node-name": "server1",
- "node-type": "host",
- "node-id":"7b796915-adf4-4356-b5ca-de005ac410c1"
- },
- {
- "node-name": "server2",
- "node-type": "host",
- "node-id":"22282cca-9a13-4d0c-a67e-a933ebb0b0ae"
- },
- {
- "node-name": "vm1",
- "node-type": "host",
- "node-id":"1eaf9a67-a171-42a8-9282-71cf702f61dd"
- },
- {
- "node-name": "vm2",
- "node-type": "host",
- "node-id":"6c787caa-156a-49ed-8546-547bdccf283c"
- }
- ]
- }
- }
-}
+++ /dev/null
-{
- "connection-definitions": {
- "connection-definition":[
- {
- "connection-type": "p2p",
- "property-definition": [
- {
- "property-name": "bandwidth",
- "property-value-type": "int"
- }
- ]
- },
- {
- "connection-type": "p2mp",
- "property-definition": [
- {
- "property-name": "bandwidth",
- "property-value-type": "int"
- }
- ]
- },
- {
- "connection-type": "mesh",
- "property-definition": [
- {
- "property-name": "bandwidth",
- "property-value-type": "int"
- }
- ]
- },
- {
- "connection-type": "chain",
- "property-definition": [
- {
- "property-name": "bandwidth",
- "property-value-type": "int"
- }
- ]
- }
- ]
- }
-}
+++ /dev/null
-{
- "node-definitions": {
- "node-definition": [
- {
- "node-type": "host",
- "property-definition": [
- {
- "property-name": "name",
- "property-value-type": "string"
- },
- {
- "property-name": "location",
- "property-value-type": "string"
- },
- {
- "property-name": "mac-address",
- "property-value-type": "string"
- },
- {
- "property-name": "ip-address",
- "property-value-type": "string"
- }
- ]
- },
- {
- "node-type": "l2-group",
- "property-definition": [
- {
- "property-name": "ip-prefix",
- "property-value-type": "string"
- },
- {
- "property-name": "gateway-ip",
- "property-value-type": "string"
- },
- {
- "property-name": "location",
- "property-value-type": "string"
- }
- ]
- },
- {
- "node-type": "l3-group",
- "property-definition": [
- {
- "property-name": "ip-prefix",
- "property-value-type": "string"
- }
- ]
- },
- {
- "node-type": "ext-group",
- "property-definition": [
- {
- "property-name": "location",
- "property-value-type": "string",
- "is-required": "required"
- },
- {
- "property-name": "ac-info-network",
- "property-value-type": "string",
- "is-required": "required"
- },
- {
- "property-name": "ac-info-protocol",
- "property-value-type": "string",
- "is-required": "required"
- },
- {
- "property-name": "ip-prefix",
- "property-value-type": "string"
- }
- ]
- },
- {
- "node-type": "chain-group"
- },
- {
- "node-type": "fw",
- "property-definition": [
- {
- "property-name": "location",
- "property-value-type": "string",
- "is-required": "required"
- },
- {
- "property-name": "operating-mode",
- "property-value-type": "string",
- "is-required": "required"
- }
- ]
- },
- {
- "node-type": "lb",
- "property-definition": [
- {
- "property-name": "location",
- "property-value-type": "string",
- "is-required": "required"
- },
- {
- "property-name": "operating-mode",
- "property-value-type": "string",
- "is-required": "required"
- }
- ]
- },
- {
- "node-type": "cache",
- "property-definition": [
- {
- "property-name": "location",
- "property-value-type": "string",
- "is-required": "required"
- },
- {
- "property-name": "operating-mode",
- "property-value-type": "string",
- "is-required": "required"
- }
- ]
- }
- ]
- }
-}
+++ /dev/null
-{
- "user-roles": {
- "user-role": [
- {
- "role-name": "tenant",
- "role-description": "It's a non-administor user"
- }
- ]
- }
-}
+++ /dev/null
-{
- "input":{
- "user-id":"14ce424a-3e50-4a2a-ad5c-b29845158c8b",
- "user-name":"user2",
- "user-password":"abc",
- "user-role":"tenant"
- }
-}
\ No newline at end of file
+++ /dev/null
-{
- "input":{
- "user-id": "14ce424a-3e50-4a2a-ad5c-b29845158c8b",
- "objects":{
- "node":[
- {
- "node-name": "dmz",
- "node-type": "l2-group",
- "sub-node": [
- {
- "node-id":"7b796915-adf4-4356-b5ca-de005ac410c1",
- "order":"0"
- }
- ],
- "property": [
- {
- "property-name": "location",
- "property-values": {
- "string-value": [
- {
- "order": "0",
- "value": "openflow:3"
- }
- ]
- }
- },
- {
- "property-name": "ip-prefix",
- "property-values": {
- "string-value": [
- {
- "order": "0",
- "value": "192.168.11.0/24"
- }
- ]
- }
- },
- {
- "property-name": "gateway-ip",
- "property-values": {
- "string-value": [
- {
- "order": "0",
- "value": "192.168.11.1"
- }
- ]
- }
- }
- ],
- "node-id": "b46cfa7f-93a3-43f4-ac20-09307c75feca"
- },
- {
- "node-name": "interior",
- "node-type": "l2-group",
- "sub-node": [
- {
- "node-id":"22282cca-9a13-4d0c-a67e-a933ebb0b0ae",
- "order":"0"
- },
- {
- "node-id":"1eaf9a67-a171-42a8-9282-71cf702f61dd",
- "order":"0"
- }
- ],
- "property": [
- {
- "property-name": "location",
- "property-values": {
- "string-value": [
- {
- "order": "0",
- "value": "openflow:3"
- }
- ]
- }
- },
- {
- "property-name": "ip-prefix",
- "property-values": {
- "string-value": [
- {
- "order": "0",
- "value": "192.168.12.0/24"
- }
- ]
- }
- },
- {
- "property-name": "gateway-ip",
- "property-values": {
- "string-value": [
- {
- "order": "0",
- "value": "192.168.12.1"
- }
- ]
- }
- }
- ],
- "node-id": "175425f7-c9c9-474a-962c-70cb6c180d4d"
- }
- ],
- "connection":[
- {
- "connection-name": "c1",
- "connection-id": "e0d56fee-7235-4748-a2a1-eb5e3733d866",
- "end-node": [
- {
- "order": "0",
- "node-id": "b46cfa7f-93a3-43f4-ac20-09307c75feca"
- },
- {
- "order": "0",
- "node-id": "175425f7-c9c9-474a-962c-70cb6c180d4d"
- }
- ],
- "connection-type": "p2p"
- }
- ],
- "flow":[
- {
- "match-item": [
- {
- "match-item-value": {
- "string-value": "192.168.12.0/24"
- },
- "match-item-name": "src-ip"
- },
- {
- "match-item-value": {
- "string-value": "192.168.11.0/24"
- },
- "match-item-name": "dst-ip"
- }
- ],
- "flow-id": "cf48eeee-882e-435a-adf4-ea22ba88331f",
- "flow-name": "f1"
- }
- ]
- },
- "operations":{
- "operation":[
- {
- "operation-name": "o1",
- "target-object": "cf48eeee-882e-435a-adf4-ea22ba88331f",
- "priority":"0",
- "operation-id": "619ee3bb-1e40-480f-b0fa-a331820a5518",
- "action":[
- {
- "action-name":"allow",
- "order":"0"
- }
- ]
- }
- ]
- }
- }
-}
"infrautils",
"snmp",
"bgpcep",
- "nemo",
"netconf",
"sxp",
"jsonrpc",