7 [Documentation] Returns the proper URI to use depending on if RFC8040 is to be used or not. Variable input
8 ... error checking is done to ensure the ${USE_RFC8040} Flag is one of True or False and the ${datastore_flag} variable
9 ... must be config, operational or rpc. @{node_value_list} is expected to be in the format of node=value. RFC8040 can
10 ... use that as is with '=' delimiter, but older restconf URI will convert the '=' to a '/'
11 [Arguments] ${identifier} ${datastore_flag}=config @{node_value_list}
12 IF "${USE_RFC8040}" == "True"
13 ${uri} = Generate RFC8040 URI ${identifier} ${datastore_flag} @{node_value_list}
15 ${uri} = Set Variable ${None}
17 IF "${USE_RFC8040}" == "True" RETURN ${uri}
18 IF "${USE_RFC8040}" != "False"
19 Fail Invalid Value for RFC8040 Flag: ${USE_RFC8040}
21 IF "${datastore_flag}"!="config" and "${datastore_flag}"!="operational" and "${datastore_flag}"!="rpc"
22 Fail Invalid value for datastore: ${datastore_flag}
24 IF "${datastore_flag}"=="config"
25 ${uri} = Set Variable ${CONFIG_API}/${identifier}
26 ELSE IF "${datastore_flag}"=="operational"
27 ${uri} = Set Variable ${OPERATIONAL_API}/${identifier}
29 ${uri} = Set Variable ${OPERATIONS_API}/${identifier}
31 ${node_value_path} = Set Variable ${EMPTY}
32 FOR ${nv} IN @{node_value_list}
33 ${nv} = String.Replace String ${nv} = /
34 ${node_value_path} = Set Variable ${node_value_path}/${nv}
36 RETURN ${uri}${node_value_path}
39 [Arguments] ${identifier} ${datastore_flag}=config @{node_value_list}
40 ${node_value_path} = Set Variable ${EMPTY}
41 FOR ${nv} IN @{node_value_list}
42 ${node_value_path} = Set Variable ${node_value_path}/${nv}
44 IF "${datastore_flag}" == "config"
45 ${uri} = Set Variable rests/data/${identifier}${node_value_path}?content=config
46 ELSE IF "${datastore_flag}"=="operational"
47 ${uri} = Set Variable rests/data/${identifier}${node_value_path}?content=nonconfig
49 ${uri} = Set Variable rests/operations/${identifier}