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