From a4c4988db12573975916ba8fc4b23c9f09b356e5 Mon Sep 17 00:00:00 2001 From: Komal Thareja Date: Tue, 7 May 2024 17:32:51 -0400 Subject: [PATCH 1/5] added support for allocated state --- fabrictestbed/__init__.py | 2 +- fabrictestbed/slice_manager/slice_manager.py | 6 ++++-- pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fabrictestbed/__init__.py b/fabrictestbed/__init__.py index 5f2ae61..c5f3cc7 100644 --- a/fabrictestbed/__init__.py +++ b/fabrictestbed/__init__.py @@ -1,2 +1,2 @@ -__version__ = "1.7.0b1" +__version__ = "1.7.0b2" __VERSION__ = __version__ diff --git a/fabrictestbed/slice_manager/slice_manager.py b/fabrictestbed/slice_manager/slice_manager.py index 58750b6..8b0f915 100644 --- a/fabrictestbed/slice_manager/slice_manager.py +++ b/fabrictestbed/slice_manager/slice_manager.py @@ -277,7 +277,7 @@ def clear_token_cache(self, *, file_name: str = None): return Status.FAILURE, f"Failed to clear token cache: {Utils.extract_error_message(exception=exception)}" def create(self, *, slice_name: str, ssh_key: Union[str, List[str]], topology: ExperimentTopology = None, - slice_graph: str = None, + slice_graph: str = None, lease_start_time: str = None, lease_end_time: str = None) -> Tuple[Status, Union[SliceManagerException, List[Sliver]]]: """ Create a slice @@ -285,6 +285,7 @@ def create(self, *, slice_name: str, ssh_key: Union[str, List[str]], topology: E @param ssh_key SSH Key(s) @param topology Experiment topology @param slice_graph Slice Graph string + @param lease_start_time Lease Start Time @param lease_end_time Lease End Time @return Tuple containing Status and Exception/Json containing slivers created """ @@ -304,7 +305,8 @@ def create(self, *, slice_name: str, ssh_key: Union[str, List[str]], topology: E if self.__should_renew(): self.__load_tokens() return self.oc_proxy.create(token=self.get_id_token(), slice_name=slice_name, ssh_key=ssh_key, - topology=topology, slice_graph=slice_graph, lease_end_time=lease_end_time) + topology=topology, slice_graph=slice_graph, lease_end_time=lease_end_time, + lease_start_time=lease_start_time) except Exception as e: error_message = Utils.extract_error_message(exception=e) return Status.FAILURE, SliceManagerException(error_message) diff --git a/pyproject.toml b/pyproject.toml index 7b447d0..79b4b6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ dependencies = [ "fabric_fss_utils>=1.5.1", "click", "fabric-credmgr-client==1.6.1", - "fabric-orchestrator-client==1.7.0b1", + "fabric-orchestrator-client==1.7.0b2", "paramiko" ] From 56bd4cbb5ff8cc065cce32ce6862fa84d3c58689 Mon Sep 17 00:00:00 2001 From: Komal Thareja Date: Fri, 10 May 2024 04:43:28 -0400 Subject: [PATCH 2/5] add support for metrics api --- fabrictestbed/__init__.py | 2 +- fabrictestbed/slice_manager/slice_manager.py | 20 +++++++++++++++++++- pyproject.toml | 2 +- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/fabrictestbed/__init__.py b/fabrictestbed/__init__.py index c5f3cc7..5aa2f16 100644 --- a/fabrictestbed/__init__.py +++ b/fabrictestbed/__init__.py @@ -1,2 +1,2 @@ -__version__ = "1.7.0b2" +__version__ = "1.7.0b3" __VERSION__ = __version__ diff --git a/fabrictestbed/slice_manager/slice_manager.py b/fabrictestbed/slice_manager/slice_manager.py index 8b0f915..e99b557 100644 --- a/fabrictestbed/slice_manager/slice_manager.py +++ b/fabrictestbed/slice_manager/slice_manager.py @@ -629,4 +629,22 @@ def get_project_info(self, project_name: str = "all", project_id: str = "all", u return core_api_proxy.get_user_projects(project_name=project_name, project_id=project_id, uuid=uuid) except Exception as e: error_message = Utils.extract_error_message(exception=e) - raise SliceManagerException(error_message) \ No newline at end of file + raise SliceManagerException(error_message) + + def get_metrics_overview(self, excluded_projects: List[str] = None, + authenticated: bool = False) -> Tuple[Status, Union[list, Exception]]: + """ + Get Metrics overview + @param excluded_projects: excluded_projects + @param authenticated: Specific user metrics + @return list of metrics + """ + try: + token = None + if authenticated and self.__should_renew(): + self.__load_tokens() + token = self.get_id_token() + return self.oc_proxy.get_metrics_overview(token=token, excluded_projects=excluded_projects) + except Exception as e: + error_message = Utils.extract_error_message(exception=e) + return Status.FAILURE, SliceManagerException(error_message) \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 79b4b6f..b6660ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ dependencies = [ "fabric_fss_utils>=1.5.1", "click", "fabric-credmgr-client==1.6.1", - "fabric-orchestrator-client==1.7.0b2", + "fabric-orchestrator-client==1.7.0b3", "paramiko" ] From 77478f888f09521824fdb8be3e9f13a39cab9e9f Mon Sep 17 00:00:00 2001 From: Komal Thareja Date: Fri, 10 May 2024 10:01:51 -0400 Subject: [PATCH 3/5] up the version --- fabrictestbed/__init__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fabrictestbed/__init__.py b/fabrictestbed/__init__.py index 5aa2f16..01d22ec 100644 --- a/fabrictestbed/__init__.py +++ b/fabrictestbed/__init__.py @@ -1,2 +1,2 @@ -__version__ = "1.7.0b3" +__version__ = "1.7.0b4" __VERSION__ = __version__ diff --git a/pyproject.toml b/pyproject.toml index b6660ca..4e11a98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ dependencies = [ "fabric_fss_utils>=1.5.1", "click", "fabric-credmgr-client==1.6.1", - "fabric-orchestrator-client==1.7.0b3", + "fabric-orchestrator-client==1.7.0b4", "paramiko" ] From e71a3458e188b6c3015b89e8fd7b4a7e87602e19 Mon Sep 17 00:00:00 2001 From: Komal Thareja Date: Sat, 11 May 2024 06:38:35 -0400 Subject: [PATCH 4/5] up dependencies --- fabrictestbed/__init__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fabrictestbed/__init__.py b/fabrictestbed/__init__.py index 01d22ec..954e5d6 100644 --- a/fabrictestbed/__init__.py +++ b/fabrictestbed/__init__.py @@ -1,2 +1,2 @@ -__version__ = "1.7.0b4" +__version__ = "1.7.0b5" __VERSION__ = __version__ diff --git a/pyproject.toml b/pyproject.toml index 4e11a98..0db8315 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ dependencies = [ "fabric_fss_utils>=1.5.1", "click", "fabric-credmgr-client==1.6.1", - "fabric-orchestrator-client==1.7.0b4", + "fabric-orchestrator-client==1.7.0b5", "paramiko" ] From 82a8ea7617ea6c8675c7eeee072f9eb689fd3508 Mon Sep 17 00:00:00 2001 From: Komal Thareja Date: Mon, 24 Jun 2024 10:47:02 -0400 Subject: [PATCH 5/5] up the version --- fabrictestbed/__init__.py | 2 +- pyproject.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fabrictestbed/__init__.py b/fabrictestbed/__init__.py index 954e5d6..57c9738 100644 --- a/fabrictestbed/__init__.py +++ b/fabrictestbed/__init__.py @@ -1,2 +1,2 @@ -__version__ = "1.7.0b5" +__version__ = "1.7.0b8" __VERSION__ = __version__ diff --git a/pyproject.toml b/pyproject.toml index 0db8315..8ccbfca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,7 +20,7 @@ dependencies = [ "fabric_fss_utils>=1.5.1", "click", "fabric-credmgr-client==1.6.1", - "fabric-orchestrator-client==1.7.0b5", + "fabric-orchestrator-client==1.7.0b8", "paramiko" ]