From 52368cdfa6b8ae79f2ceb89898f98276ca772f9c Mon Sep 17 00:00:00 2001 From: Sebastian Luna-Valero Date: Tue, 14 Nov 2023 08:30:32 +0100 Subject: [PATCH 01/12] Remove INFN-PADOVA-STACK --- config/sites.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/sites.yaml b/config/sites.yaml index a5ca259..546bd71 100644 --- a/config/sites.yaml +++ b/config/sites.yaml @@ -18,7 +18,6 @@ - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/IN2P3-IRES.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/INFN-CLOUD-BARI.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/INFN-CLOUD-CNAF.yaml" -- "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/INFN-PADOVA-STACK.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/NCG-INGRID-PT.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/SCAI.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/TR-FC1-ULAKBIM.yaml" From 58772d2b2ba4c554cbe146529d59d4a91e26c746 Mon Sep 17 00:00:00 2001 From: Enol Fernandez Date: Tue, 21 Nov 2023 09:37:30 +0000 Subject: [PATCH 02/12] Add new site: CENI --- config/sites.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/sites.yaml b/config/sites.yaml index 546bd71..c9563cd 100644 --- a/config/sites.yaml +++ b/config/sites.yaml @@ -3,6 +3,7 @@ - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/100IT.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/BIFI.yaml" +- "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/CENI.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/CESGA.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/CESGA-CLOUD.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/CESNET-MCC.yaml" From cd6c163c0c95e3c8075f113449462bdc100dc1b9 Mon Sep 17 00:00:00 2001 From: CatalinCondurache Date: Tue, 27 Feb 2024 11:45:05 +0000 Subject: [PATCH 03/12] Update sites.yaml Add new site CSTCLOUD-EGI --- config/sites.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/config/sites.yaml b/config/sites.yaml index c9563cd..f36f224 100644 --- a/config/sites.yaml +++ b/config/sites.yaml @@ -9,6 +9,7 @@ - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/CESNET-MCC.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/CETA-GRID.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/CLOUDIFIN.yaml" +- "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/CSTCLOUD-EGI.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/CYFRONET-CLOUD.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/DESY-CC.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/GRNET-OPENSTACK.yaml" From 26e77daac596142583e37dc481503d17bfbab9eb Mon Sep 17 00:00:00 2001 From: Enol Fernandez Date: Fri, 26 Apr 2024 11:37:25 +0100 Subject: [PATCH 04/12] Remove site GSI-LCG2 No longer available in production --- config/sites.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/sites.yaml b/config/sites.yaml index f36f224..9589460 100644 --- a/config/sites.yaml +++ b/config/sites.yaml @@ -13,7 +13,6 @@ - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/CYFRONET-CLOUD.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/DESY-CC.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/GRNET-OPENSTACK.yaml" -- "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/GSI-LCG2.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/IFCA-LCG2.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/IISAS-FedCloud-cloud.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/ILIFU-UCT.yaml" From 6151db1988c6987ebc9051ea24dd84cf152d7be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enol=20Fern=C3=A1ndez?= Date: Mon, 17 Jun 2024 11:20:56 +0100 Subject: [PATCH 05/12] Remove sites See also https://github.com/EGI-Federation/fedcloud-catchall-operations/pull/343 --- config/sites.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/sites.yaml b/config/sites.yaml index 9589460..cc67827 100644 --- a/config/sites.yaml +++ b/config/sites.yaml @@ -1,7 +1,6 @@ # List of sites in https://github.com/EGI-Federation/fedcloud-catchall-operations/tree/main/sites # As GitHub API has limited access rates, the list of sites is stored here for simple access -- "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/100IT.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/BIFI.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/CENI.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/CESGA.yaml" @@ -24,7 +23,6 @@ - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/TR-FC1-ULAKBIM.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/UA-BITP.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/UNIV-LILLE.yaml" -- "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/UPV-GRyCAP.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/WALTON-CLOUD.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/fedcloud.srce.hr.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/EODC.yaml" From 0495e7097a4765a8d032fdaf0859ebaf98d45348 Mon Sep 17 00:00:00 2001 From: Sebastian Luna-Valero Date: Thu, 20 Jun 2024 10:30:24 +0200 Subject: [PATCH 06/12] Remove sites: UNIV-LILLE --- config/sites.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/sites.yaml b/config/sites.yaml index cc67827..72025e8 100644 --- a/config/sites.yaml +++ b/config/sites.yaml @@ -22,7 +22,6 @@ - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/SCAI.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/TR-FC1-ULAKBIM.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/UA-BITP.yaml" -- "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/UNIV-LILLE.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/WALTON-CLOUD.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/fedcloud.srce.hr.yaml" - "https://raw.githubusercontent.com/EGI-Federation/fedcloud-catchall-operations/main/sites/EODC.yaml" From eea38b92b7d8495d7c922b999169d6bc22dd9a0a Mon Sep 17 00:00:00 2001 From: Sebastian Luna-Valero Date: Wed, 3 Jul 2024 09:26:42 +0200 Subject: [PATCH 07/12] add vo-list command --- fedcloudclient/sites.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/fedcloudclient/sites.py b/fedcloudclient/sites.py index 8f4cd5a..40d6a07 100644 --- a/fedcloudclient/sites.py +++ b/fedcloudclient/sites.py @@ -28,6 +28,7 @@ all_site_params, oidc_params, site_vo_params, + vo_params, ) from fedcloudclient.shell import print_set_env_command @@ -321,9 +322,21 @@ def list_(): """ List all sites """ + for site in list_sites(): + print(site) + + +@site.command("vo-list") +@vo_params +def vo_list(vo): + """ + List all sites in a VO + """ read_site_config() for site_info in __site_config_data: - print(site_info["gocdb"]) + for vos in site_info["vos"]: + if vo == vos["name"]: + print(site_info["gocdb"]) @site.command() From bc254d31f485255b2f2f07c6318643c77b5c87de Mon Sep 17 00:00:00 2001 From: Sebastian Luna-Valero Date: Wed, 3 Jul 2024 09:38:07 +0200 Subject: [PATCH 08/12] add docs --- docs/cheat.rst | 8 +++++++- docs/quickstart.rst | 12 +++++++++++- docs/usage.rst | 11 +++++++++++ 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/docs/cheat.rst b/docs/cheat.rst index 2a3e0a5..0f8c595 100644 --- a/docs/cheat.rst +++ b/docs/cheat.rst @@ -77,12 +77,18 @@ Basic usages $ fedcloud token list-vos -* List sites in EGI Federated Cloud: +* List sites in the EGI Federated Cloud: :: $ fedcloud site list +* List all sites supporting a Virtual Organization in the EGI Federated Cloud: + +:: + + $ fedcloud site vo-list --vo vo.access.egi.eu + * Execute an OpenStack command: :: diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 631d205..1c1f4e9 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -43,7 +43,7 @@ Basic usages training.egi.eu ... -* List sites in EGI Federated Cloud +* List sites in the EGI Federated Cloud :: @@ -53,6 +53,16 @@ Basic usages CESGA ... +* List sites supporting a Virtual Organization in the EGI Federated Cloud + +:: + + $ fedcloud site vo-list --vo vo.access.egi.eu + BIFI + CENI + CESGA-CLOUD + ... + * Execute an OpenStack command, e.g. list images in eosc-synergy.eu VO on IISAS-FedCloud site (or other combination of site and VO you have access): diff --git a/docs/usage.rst b/docs/usage.rst index 24c78ec..2ccf8d5 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -278,6 +278,17 @@ VOs and so on. ... +* **"fedcloud site vo-list --vo "** : List all sites supporting a Virtual Organization + +:: + + $ fedcloud site vo-list --vo vo.access.egi.eu + BIFI + CENI + CESGA-CLOUD + ... + + * **"fedcloud site show --site "** : Show configuration of the corresponding site. :: From 8fbe0eda63e6126693465b20dffc1240e38843dd Mon Sep 17 00:00:00 2001 From: Sebastian Luna-Valero Date: Wed, 3 Jul 2024 09:50:26 +0200 Subject: [PATCH 09/12] linting --- fedcloudclient/sites.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fedcloudclient/sites.py b/fedcloudclient/sites.py index 40d6a07..053877f 100644 --- a/fedcloudclient/sites.py +++ b/fedcloudclient/sites.py @@ -334,9 +334,9 @@ def vo_list(vo): """ read_site_config() for site_info in __site_config_data: - for vos in site_info["vos"]: - if vo == vos["name"]: - print(site_info["gocdb"]) + for vos in site_info["vos"]: + if vo == vos["name"]: + print(site_info["gocdb"]) @site.command() From 2e13e6202f3707bad044ff5260cbe374512414f6 Mon Sep 17 00:00:00 2001 From: Sebastian Luna-Valero Date: Wed, 3 Jul 2024 10:53:17 +0200 Subject: [PATCH 10/12] unify vo-list with list, making --vo optional --- docs/cheat.rst | 2 +- docs/quickstart.rst | 2 +- docs/usage.rst | 2 +- fedcloudclient/decorators.py | 8 ++++++++ fedcloudclient/sites.py | 35 +++++++++++++++-------------------- 5 files changed, 26 insertions(+), 23 deletions(-) diff --git a/docs/cheat.rst b/docs/cheat.rst index 0f8c595..ea899fe 100644 --- a/docs/cheat.rst +++ b/docs/cheat.rst @@ -87,7 +87,7 @@ Basic usages :: - $ fedcloud site vo-list --vo vo.access.egi.eu + $ fedcloud site list --vo vo.access.egi.eu * Execute an OpenStack command: diff --git a/docs/quickstart.rst b/docs/quickstart.rst index 1c1f4e9..3d10d70 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -57,7 +57,7 @@ Basic usages :: - $ fedcloud site vo-list --vo vo.access.egi.eu + $ fedcloud site list --vo vo.access.egi.eu BIFI CENI CESGA-CLOUD diff --git a/docs/usage.rst b/docs/usage.rst index 2ccf8d5..6b944c6 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -278,7 +278,7 @@ VOs and so on. ... -* **"fedcloud site vo-list --vo "** : List all sites supporting a Virtual Organization +* **"fedcloud site list --vo "** : List all sites supporting a Virtual Organization :: diff --git a/fedcloudclient/decorators.py b/fedcloudclient/decorators.py index 832464c..81e9807 100644 --- a/fedcloudclient/decorators.py +++ b/fedcloudclient/decorators.py @@ -100,6 +100,14 @@ def wrapper(*args, **kwargs): metavar="vo-name", ) +# Optional decorator for --vo +vo_params_optional = click.option( + "--vo", + help="Name of the VO", + required=False, + envvar="EGI_VO", + metavar="vo-name", +) def site_vo_params(func): """ diff --git a/fedcloudclient/sites.py b/fedcloudclient/sites.py index 053877f..fe491ab 100644 --- a/fedcloudclient/sites.py +++ b/fedcloudclient/sites.py @@ -28,7 +28,7 @@ all_site_params, oidc_params, site_vo_params, - vo_params, + vo_params_optional, ) from fedcloudclient.shell import print_set_env_command @@ -183,16 +183,22 @@ def delete_site_config(config_dir): shutil.rmtree(config_dir, ignore_errors=True) -def list_sites(): +def list_sites(vo=None): """ - List of all sites IDs in site configurations + List all sites IDs in site configurations + Optionally list all sites supporting a Virtual Organization :return: list of site IDs """ read_site_config() result = [] for site_info in __site_config_data: - result.append(site_info["gocdb"]) + if vo is None: + result.append(site_info["gocdb"]) + else: + for vos in site_info["vos"]: + if vo == vos["name"]: + result.append(site_info["gocdb"]) return result @@ -318,27 +324,16 @@ def save_config(): @site.command("list") -def list_(): +@vo_params_optional +def list_(vo=None): """ - List all sites + List all sites. If "--vo " is provided, list only sites + supporting a Virtual Organization. """ - for site in list_sites(): + for site in list_sites(vo): print(site) -@site.command("vo-list") -@vo_params -def vo_list(vo): - """ - List all sites in a VO - """ - read_site_config() - for site_info in __site_config_data: - for vos in site_info["vos"]: - if vo == vos["name"]: - print(site_info["gocdb"]) - - @site.command() @site_vo_params @oidc_params From 96ef652900871dedebc4dec436f48798a0ef8150 Mon Sep 17 00:00:00 2001 From: Sebastian Luna-Valero Date: Wed, 3 Jul 2024 10:57:32 +0200 Subject: [PATCH 11/12] linting --- fedcloudclient/decorators.py | 1 + 1 file changed, 1 insertion(+) diff --git a/fedcloudclient/decorators.py b/fedcloudclient/decorators.py index 81e9807..74eea23 100644 --- a/fedcloudclient/decorators.py +++ b/fedcloudclient/decorators.py @@ -109,6 +109,7 @@ def wrapper(*args, **kwargs): metavar="vo-name", ) + def site_vo_params(func): """ Decorator for site and VO parameters From 9ccc98a7e5f6e6e166eba04df7cd38271ff907f0 Mon Sep 17 00:00:00 2001 From: Enol Fernandez Date: Wed, 17 Jul 2024 08:28:37 +0100 Subject: [PATCH 12/12] Add image sync fields to schema --- fedcloudclient/schema.json | 36 ++++++++++++++++++++++++++++-------- 1 file changed, 28 insertions(+), 8 deletions(-) diff --git a/fedcloudclient/schema.json b/fedcloudclient/schema.json index 1439e28..b52ceef 100644 --- a/fedcloudclient/schema.json +++ b/fedcloudclient/schema.json @@ -5,6 +5,25 @@ "title": "site specs", "description": "site configuration schema", "definitions": { + "imagesdata": { + "type": "object", + "properties": { + "sync": { + "type": "boolean", + "description": "Do image synchronisation", + "default": false + }, + "formats": { + "type": "array", + "title": "formats", + "description": "Supported VM image formats at the site.", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false + }, "vodata": { "type": "object", "properties": { @@ -22,17 +41,11 @@ } } }, - "required": [ - "auth", - "name" - ], + "required": ["auth", "name"], "additionalProperties": true } }, - "required": [ - "gocdb", - "endpoint" - ], + "required": ["gocdb", "endpoint"], "properties": { "gocdb": { "$id": "#/properties/gocdb", @@ -70,6 +83,13 @@ "items": { "$ref": "#/definitions/vodata" } + }, + "images": { + "$id": "#/properties/images", + "title": "Image Configuration", + "description": "Image configuration", + "type": "object", + "$ref": "#/definitions/imagesdata" } }, "additionalProperties": false