Skip to content

Commit

Permalink
Merge branch 'main' into 76-build-cicd-pipeline-for-gx-credential-gen…
Browse files Browse the repository at this point in the history
…erator

Signed-off-by: anjastrunk <[email protected]>
  • Loading branch information
anjastrunk authored Apr 11, 2024
2 parents d2cd065 + c96fb45 commit 4184f88
Show file tree
Hide file tree
Showing 20 changed files with 3,092 additions and 673 deletions.
2 changes: 1 addition & 1 deletion cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def openstack(cloud, timeout, config):
os_cloud = OsCloud(conn, Config(config_dict))

# run discovery
creds = os_cloud.discover_properties()
creds = os_cloud.discover()

props = json_ld.get_json_ld_context()
props["@graph"] = creds
Expand Down
261 changes: 143 additions & 118 deletions config/config.yaml
Original file line number Diff line number Diff line change
@@ -1,121 +1,146 @@
default:
operating system:
Alpine Linux:
copyright owner: "Alpine Linux"
resource policy: "default: allow intent"
license:
- https://gitlab.alpinelinux.org/alpine/aports/-/issues/9074
Arch Linux:
copyright owner: "Judd Vinet, Aaron Griffin, Levente Polyák and others"
resource policy: "default: allow intent"
license:
- https://gitlab.archlinux.org/archlinux
CentOS Linux:
copyright owner: "The CentOS Project and others"
resource policy: "default: allow intent"
license:
- https://github.com/CentOS/
Debian:
copyright owner: "Ian Murdock and others"
resource policy: "default: allow intent"
license:
- https://www.debian.org/legal/licenses/index.en.html
Fedora:
copyright owner: "Fedora-Project"
resource policy: "default: allow intent"
license:
- https://docs.fedoraproject.org/en-US/legal/fedora-linux-license/
FreeBSD:
copyright owner: "The FreeBSD Project"
resource policy: "default: allow intent"
license:
- GPL-3.0-only
- LGPL-2.0
Gentoo Linux:
copyright owner: "Gentoo Foundation, Inc."
resource policy: "default: allow intent"
license:
- https://www.gentoo.org/glep/glep-0076.html
Mandrakelinux:
copyright owner: "Mandriva Linux"
resource policy: "default: allow intent"
license:
- GPL-3.0-only
Mandriva Linux:
copyright owner: "Mandriva S. A."
resource policy: "default: allow intent"
license:
- GPL-3.0-only
Mandriva Enterprise Server:
copyright owner: "Mandriva S. A."
resource policy: "default: allow intent"
license:
- GPL-3.0-only
MS-DOS:
copyright owner: "Microsoft Corporation"
resource policy: "default: allow intent"
license:
- https://www.microsoft.com/licensing/docs/view/Licensing-Guides
NetBSD:
copyright owner: "The NetBSD Foundation"
resource policy: "default: allow intent"
license:
- https://www.netbsd.org/about/redistribution.html
Novell NetWare:
copyright owner: "Micro Focus International"
resource policy: "default: allow intent"
license:
- https://support.novell.com/techcenter/articles/ana19960702.html
OpenBSD:
copyright owner: "OpenBSD"
resource policy: "default: allow intent"
license:
- https://www.openbsd.org/policy.html
OpenSolaris:
copyright owner: "Sun Microsystems"
resource policy: "default: allow intent"
license:
- https://opensource.apple.com/source/xnu/xnu-2050.7.9/tools/tests/libMicro/OPENSOLARIS.LICENSE.auto.html
openSUSE:
copyright owner: "openSUSE contributors & others"
resource policy: "default: allow intent"
license:
- https://en.opensuse.org/openSUSE:License
Rocky Linux:
copyright owner: "Rocky Enterprise Software Foundation"
resource policy: "default: allow intent"
license:
- https://rockylinux.org/licensing
Red Hat Enterprise Linux:
copyright owner: "Red Hat, Inc."
resource policy: "default: allow intent"
license:
- https://www.redhat.com/en/store/red-hat-enterprise-linux-server
SUSE Linux Enterprise Server:
copyright owner: "SUSE"
resource policy: "default: allow intent"
license:
- https://www.suse.com/products/terms_and_conditions.pdf
Ubuntu:
copyright owner: "Canonical"
resource policy: "default: allow intent"
license:
- https://ubuntu.com/legal/open-source-licences
Microsoft Windows:
copyright owner: "Microsoft Corporation"
resource policy: "default: allow intent"
license:
- https://www.microsoft.com/licensing
CirrOS:
copyright owner: "Canonical Ltd."
resource policy: "default: allow intent"
license:
- GPL-2.0-only
AlmaLinux:
copyright owner: "Canonical Ltd."
resource policy: "default: allow intent"
license:
- https://almalinux.org/p/the-almalinux-os-licensing-policy/
software resources:
Alpine Linux:
copyright owner: "Alpine Linux"
resource policy: "default: allow intent"
license:
- https://gitlab.alpinelinux.org/alpine/aports/-/issues/9074
Arch Linux:
copyright owner: "Judd Vinet, Aaron Griffin, Levente Polyák and others"
resource policy: "default: allow intent"
license:
- https://gitlab.archlinux.org/archlinux
CentOS Linux:
copyright owner: "The CentOS Project and others"
resource policy: "default: allow intent"
license:
- https://github.com/CentOS/
Debian:
copyright owner: "Ian Murdock and others"
resource policy: "default: allow intent"
license:
- https://www.debian.org/legal/licenses/index.en.html
Fedora:
copyright owner: "Fedora-Project"
resource policy: "default: allow intent"
license:
- https://docs.fedoraproject.org/en-US/legal/fedora-linux-license/
FreeBSD:
copyright owner: "The FreeBSD Project"
resource policy: "default: allow intent"
license:
- GPL-3.0-only
- LGPL-2.0
Gentoo Linux:
copyright owner: "Gentoo Foundation, Inc."
resource policy: "default: allow intent"
license:
- https://www.gentoo.org/glep/glep-0076.html
Mandrakelinux:
copyright owner: "Mandriva Linux"
resource policy: "default: allow intent"
license:
- GPL-3.0-only
Mandriva Linux:
copyright owner: "Mandriva S. A."
resource policy: "default: allow intent"
license:
- GPL-3.0-only
Mandriva Enterprise Server:
copyright owner: "Mandriva S. A."
resource policy: "default: allow intent"
license:
- GPL-3.0-only
MS-DOS:
copyright owner: "Microsoft Corporation"
resource policy: "default: allow intent"
license:
- https://www.microsoft.com/licensing/docs/view/Licensing-Guides
NetBSD:
copyright owner: "The NetBSD Foundation"
resource policy: "default: allow intent"
license:
- https://www.netbsd.org/about/redistribution.html
Novell NetWare:
copyright owner: "Micro Focus International"
resource policy: "default: allow intent"
license:
- https://support.novell.com/techcenter/articles/ana19960702.html
OpenBSD:
copyright owner: "OpenBSD"
resource policy: "default: allow intent"
license:
- https://www.openbsd.org/policy.html
OpenSolaris:
copyright owner: "Sun Microsystems"
resource policy: "default: allow intent"
license:
- https://opensource.apple.com/source/xnu/xnu-2050.7.9/tools/tests/libMicro/OPENSOLARIS.LICENSE.auto.html
openSUSE:
copyright owner: "openSUSE contributors & others"
resource policy: "default: allow intent"
license:
- https://en.opensuse.org/openSUSE:License
Rocky Linux:
copyright owner: "Rocky Enterprise Software Foundation"
resource policy: "default: allow intent"
license:
- https://rockylinux.org/licensing
Red Hat Enterprise Linux:
copyright owner: "Red Hat, Inc."
resource policy: "default: allow intent"
license:
- https://www.redhat.com/en/store/red-hat-enterprise-linux-server
SUSE Linux Enterprise Server:
copyright owner: "SUSE"
resource policy: "default: allow intent"
license:
- https://www.suse.com/products/terms_and_conditions.pdf
Ubuntu:
copyright owner: "Canonical"
resource policy: "default: allow intent"
license:
- https://ubuntu.com/legal/open-source-licences
Microsoft Windows:
copyright owner: "Microsoft Corporation"
resource policy: "default: allow intent"
license:
- https://www.microsoft.com/licensing
CirrOS:
copyright owner: "Canonical Ltd."
resource policy: "default: allow intent"
license:
- GPL-2.0-only
AlmaLinux:
copyright owner: "Canonical Ltd."
resource policy: "default: allow intent"
license:
- https://almalinux.org/p/the-almalinux-os-licensing-policy/
Debian 11:
copyright owner: "AlmaLinux OS Foundation"
resource policy: "default: allow intent"
license:
- https://www.debian.org/legal/licenses/
KVM:
copyright owner: "Qumranet"
resource policy: "default: allow intent"
license:
- GPL-2.0-or-later
- LGPL-3.0-or-later
Xen:
copyright owner: "The Linux Foundation"
resource policy: "default: allow intent"
license:
- GPL-2.0
vmware:
copyright owner: "Broadcom"
resource policy: "default: allow intent"
license:
- https://www.vmware.com/support/support-resources/licensing.html
hyper-v:
copyright owner: "Microsoft Corporation"
resource policy: "default: allow intent"
license:
- https://www.microsoft.com/windows-server/pricing
#cloud resources:
# own images:
# AlmaLinux 8:
Expand Down
13 changes: 13 additions & 0 deletions generator/common/config.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from typing import List

from generator.common import const


def _get_value(config, keys: List[str]):
if not keys:
Expand All @@ -19,3 +21,14 @@ def __init__(self, config):

def get_value(self, keys: List[str]):
return _get_value(self.config, keys)

def get_copyright_owner(self, software: str) -> List[str]:
return self.get_value([const.CONFIG_SOFTWARE, software, const.CONFIG_COPYRIGHT])

def get_license(self, software: str) -> List[str]:
return self.get_value([const.CONFIG_SOFTWARE, software, const.CONFIG_LICENSE])

def get_resource_policy(self, software: str) -> List[str]:
return self.get_value(
[const.CONFIG_SOFTWARE, software, const.CONFIG_RESOURCE_POLICY]
)
11 changes: 11 additions & 0 deletions generator/common/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

UNIT_MB = "https://qudt.org/vocab/unit/MegaBYTE"
UNIT_GB = "https://qudt.org/vocab/unit/GigaBYTE"
UNIT_GHZ = "https://qudt.org/vocab/unit/GigaHZ"

CONFIG_VM_IMAGE = "vm image"
CONFIG_RESOURCE_POLICY = "resource policy"
Expand All @@ -19,9 +20,11 @@
CONFIG_WALLETS = "wallets"
CONFIG_DEFAULT = "default"
CONFIG_CLOUD_RESOURCES = "cloud resources:"
CONFIG_SOFTWARE = "software resources"
CONFIG_FILESYSTEM_WALLET = "filesystem"
CONFIG_XFSC_WALLET = "xfsc"


CONFIG_OS_ALP = "Alpine Linux"
CONFIG_OS_ARCH = "Arch Linux"
CONFIG_OS_CENTOS = "CentOS Linux"
Expand All @@ -46,4 +49,12 @@
CONFIG_OS_CIRROS = "CirrOS"
CONFIG_OS_ALMALINUX = "AlmaLinux"

CONFIG_HV_KVM = "KVM"
CONFIG_HV_QUEMU = "quemu"
CONFIG_HV_XEN = "Xen"
CONFIG_HV_ESXI = "ESXi"
CONFIG_HV_CH = "Cloud Hypervisor"
CONFIG_HV_VMW = "vmware"
CONFIG_HV_HYV = "hyper-v"

CONFIG_FILE = "config/config.yaml"
Loading

0 comments on commit 4184f88

Please sign in to comment.