VES Endpoint basic-auth issue.
Issue-ID: SIM-36
Change-Id: I7cfc6538b6287a9ef662f4356f6bfc656fecd8bf
Signed-off-by: Alex Stancu <alexandru.stancu@highstreet-technologies.com>
environment:
#NTS_IP: "2001:db8:1::1"
NTS_IP: "10.20.11.121"
environment:
#NTS_IP: "2001:db8:1::1"
NTS_IP: "10.20.11.121"
+ #EXTERNAL_NTS_IP: "8.8.8.8"
NETCONF_BASE: 50000
DOCKER_ENGINE_VERSION: "1.40"
#MODELS_IMAGE: "ntsim_onf_core_model_1_2"
NETCONF_BASE: 50000
DOCKER_ENGINE_VERSION: "1.40"
#MODELS_IMAGE: "ntsim_onf_core_model_1_2"
- sr_free_val(val);
- val = NULL;
+ if (strcmp(val->data.enum_val, "basic-auth") == 0)
+ {
+ sr_free_val(val);
+ val = NULL;
- /* get the value from sysrepo, we do not care if the value did not change in our case */
- rc = sr_get_item(session, "/network-topology-simulator:simulator-config/ves-endpoint-details/ves-endpoint-username", &val);
- if (rc != SR_ERR_OK) {
- goto sr_error;
- }
+ /* get the value from sysrepo, we do not care if the value did not change in our case */
+ rc = sr_get_item(session, "/network-topology-simulator:simulator-config/ves-endpoint-details/ves-endpoint-username", &val);
+ if (rc != SR_ERR_OK) {
+ goto sr_error;
+ }
- rc = ves_username_changed(val->data.string_val);
- if (rc != SR_ERR_OK) {
- goto sr_error;
- }
+ rc = ves_username_changed(val->data.string_val);
+ if (rc != SR_ERR_OK) {
+ goto sr_error;
+ }
- sr_free_val(val);
- val = NULL;
+ sr_free_val(val);
+ val = NULL;
- /* get the value from sysrepo, we do not care if the value did not change in our case */
- rc = sr_get_item(session, "/network-topology-simulator:simulator-config/ves-endpoint-details/ves-endpoint-password", &val);
- if (rc != SR_ERR_OK) {
- goto sr_error;
- }
+ /* get the value from sysrepo, we do not care if the value did not change in our case */
+ rc = sr_get_item(session, "/network-topology-simulator:simulator-config/ves-endpoint-details/ves-endpoint-password", &val);
+ if (rc != SR_ERR_OK) {
+ goto sr_error;
+ }
- rc = ves_password_changed(val->data.string_val);
- if (rc != SR_ERR_OK) {
- goto sr_error;
- }
+ rc = ves_password_changed(val->data.string_val);
+ if (rc != SR_ERR_OK) {
+ goto sr_error;
+ }
- sr_free_val(val);
- val = NULL;
+ sr_free_val(val);
+ val = NULL;
+ }
+ else
+ {
+ sr_free_val(val);
+ val = NULL;
+ }
/* get the value from sysrepo, we do not care if the value did not change in our case */
rc = sr_get_item(session, "/network-topology-simulator:simulator-config/ves-endpoint-details/ves-endpoint-port", &val);
/* get the value from sysrepo, we do not care if the value did not change in our case */
rc = sr_get_item(session, "/network-topology-simulator:simulator-config/ves-endpoint-details/ves-endpoint-port", &val);