Replace prometheus host and port by URL and infer it from OSM_HOSTNAME

Change-Id: Iff647f8c61ad3891ff995f4d458ce93e0a0d9ac6
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
diff --git a/robot-systest/lib/vim_lib.resource b/robot-systest/lib/vim_lib.resource
index e46f632..4688bf9 100644
--- a/robot-systest/lib/vim_lib.resource
+++ b/robot-systest/lib/vim_lib.resource
@@ -73,15 +73,15 @@
 
 Check For VIM Target Metric
     [Documentation]   Check in a loop if the metric of osm_vim_status is present in Prometheus for the VIM account in OSM.
-    [Arguments]   ${vim_name}   ${prometheus_host}   ${prometheus_port}   ${prometheus_user}   ${prometheus_password}
+    [Arguments]   ${vim_name}   ${prometheus_url}   ${prometheus_user}   ${prometheus_password}
     ${vim_account_id}=   Get VIM Target ID   ${vim_name}
-    Wait Until Keyword Succeeds   ${VIM_STATUS_MAX_WAIT_TIME}   ${VIM_STATUS_POL_TIME}   Check If VIM Target Has Metric   ${vim_account_id}   ${prometheus_host}   ${prometheus_port}   ${prometheus_user}   ${prometheus_password}
+    Wait Until Keyword Succeeds   ${VIM_STATUS_MAX_WAIT_TIME}   ${VIM_STATUS_POL_TIME}   Check If VIM Target Has Metric   ${vim_account_id}   ${prometheus_url}   ${prometheus_user}   ${prometheus_password}
 
 Check For VIM Target Status
     [Documentation]   Check in a loop if the value of the metric osm_vim_status in Prometheus for the VIM account is 1 (reachable).
-    [Arguments]   ${vim_name}   ${prometheus_host}   ${prometheus_port}   ${prometheus_user}   ${prometheus_password}
+    [Arguments]   ${vim_name}   ${prometheus_url}   ${prometheus_user}   ${prometheus_password}
     ${vim_account_id}=   Get VIM Target ID   ${vim_name}
-    Wait Until Keyword Succeeds   ${VIM_STATUS_MAX_WAIT_TIME}   ${VIM_STATUS_POL_TIME}   Check If VIM Target Is Available   ${vim_account_id}   ${prometheus_host}   ${prometheus_port}   ${prometheus_user}   ${prometheus_password}
+    Wait Until Keyword Succeeds   ${VIM_STATUS_MAX_WAIT_TIME}   ${VIM_STATUS_POL_TIME}   Check If VIM Target Is Available   ${vim_account_id}   ${prometheus_url}   ${prometheus_user}   ${prometheus_password}
 
 Get VIM Target ID
     [Documentation]   Get from OSM the VIM account id associated to the VIM account name passed as parameter.
@@ -105,12 +105,16 @@
 
 Check If VIM Target Is Available
     [Documentation]   Check if the value of the metric osm_vim_status in Prometheus for the VIM account is 1 (reachable).
-    [Arguments]   ${vim_account_id}   ${prometheus_host}   ${prometheus_port}   ${prometheus_user}   ${prometheus_password}
-    ${metric}=   Get Metric   ${prometheus_host}   ${prometheus_port}   ${prometheus_user}   ${prometheus_password}   osm_vim_status   vim_account_id=${vim_account_id}
+    [Arguments]   ${vim_account_id}   ${prometheus_url}   ${prometheus_user}   ${prometheus_password}
+    Log   ${prometheus_url}
+    Log   ${prometheus_user}
+    Log   ${prometheus_password}
+    Log   ${vim_account_id}
+    ${metric}=   Get Metric   ${prometheus_url}   ${prometheus_user}   ${prometheus_password}   osm_vim_status   vim_account_id=${vim_account_id}
     Should Be Equal As Integers   ${metric}   1   msg=VIM Target '${vim_account_id}' is not active   values=false
 
 Check If VIM Target Has Metric
     [Documentation]   Check if the metric of osm_vim_status is present in Prometheus for the VIM account in OSM.
-    [Arguments]   ${vim_account_id}   ${prometheus_host}   ${prometheus_port}   ${prometheus_user}   ${prometheus_password}
-    ${metric}=   Get Metric   ${prometheus_host}   ${prometheus_port}   ${prometheus_user}   ${prometheus_password}   osm_vim_status   vim_account_id=${vim_account_id}
+    [Arguments]   ${vim_account_id}   ${prometheus_url}   ${prometheus_user}   ${prometheus_password}
+    ${metric}=   Get Metric   ${prometheus_url}   ${prometheus_user}   ${prometheus_password}   osm_vim_status   vim_account_id=${vim_account_id}
     Should Be True   ${metric} <2   msg=VIM Target '${vim_account_id}' has no metric