SovereignCloudStack / gx-credential-generator

Tools for creating Gaia-X Credentials (OpenStack, k8s, ...)
https://scs.community/
Eclipse Public License 2.0
7 stars 4 forks source link

Anomaly when I run gx-sd-generator.py #35

Closed maystery closed 1 year ago

maystery commented 1 year ago

Here I paste the two command output:

openstack-discovery.py:

openstack:
  RegionOne:
    cloudformation:
      endpoint: https://api.gx-scs.sovereignit.cloud:8000/v1
      name: heat-cfn
    compute:
      availability_zones:
      - nova
      endpoint: https://api.gx-scs.sovereignit.cloud:8774/v2.1
      extensions:
      - NMN
      - OS-DCF
      - OS-EXT-AZ
      - OS-EXT-IMG-SIZE
      - OS-EXT-IPS
      - OS-EXT-IPS-MAC
      - OS-EXT-SRV-ATTR
      - OS-EXT-STS
      - OS-FLV-DISABLED
      - OS-FLV-EXT-DATA
      - OS-SCH-HNT
      - OS-SRV-USG
      - os-access-ips
      - os-admin-actions
      - os-admin-password
      - os-agents
      - os-aggregates
      - os-assisted-volume-snapshots
      - os-attach-interfaces
      - os-availability-zone
      - os-baremetal-ext-status
      - os-baremetal-nodes
      - os-block-device-mapping
      - os-block-device-mapping-v2-boot
      - os-cell-capacities
      - os-cells
      - os-certificates
      - os-cloudpipe
      - os-cloudpipe-update
      - os-config-drive
      - os-console-auth-tokens
      - os-console-output
      - os-consoles
      - os-create-backup
      - os-create-server-ext
      - os-deferred-delete
      - os-evacuate
      - os-extended-evacuate-find-host
      - os-extended-floating-ips
      - os-extended-hypervisors
      - os-extended-networks
      - os-extended-quotas
      - os-extended-rescue-with-image
      - os-extended-services
      - os-extended-services-delete
      - os-extended-status
      - os-extended-volumes
      - os-fixed-ips
      - os-flavor-access
      - os-flavor-extra-specs
      - os-flavor-manage
      - os-flavor-rxtx
      - os-flavor-swap
      - os-floating-ip-dns
      - os-floating-ip-pools
      - os-floating-ips
      - os-floating-ips-bulk
      - os-fping
      - os-hide-server-addresses
      - os-hosts
      - os-hypervisor-status
      - os-hypervisors
      - os-instance-actions
      - os-instance_usage_audit_log
      - os-keypairs
      - os-lock-server
      - os-migrate-server
      - os-migrations
      - os-multiple-create
      - os-networks
      - os-networks-associate
      - os-pause-server
      - os-personality
      - os-preserve-ephemeral-rebuild
      - os-quota-class-sets
      - os-quota-sets
      - os-rescue
      - os-security-group-default-rules
      - os-security-groups
      - os-server-diagnostics
      - os-server-external-events
      - os-server-group-quotas
      - os-server-groups
      - os-server-list-multi-status
      - os-server-password
      - os-server-sort-keys
      - os-server-start-stop
      - os-services
      - os-shelve
      - os-simple-tenant-usage
      - os-suspend-server
      - os-tenant-networks
      - os-used-limits
      - os-used-limits-for-admin
      - os-user-data
      - os-user-quotas
      - os-virtual-interfaces
      - os-volume-attachment-update
      - os-volumes
      flavors:
      - name: SCS-1V:8
        numberOfvCPUs: 1
        ramSize:
          Unit: GiB
          Value: 8.0
      - diskSize:
          Unit: GB
          Value: 50
        name: SCS-4V:16:50
        numberOfvCPUs: 4
        ramSize:
          Unit: GiB
          Value: 16.0
      - diskSize:
          Unit: GB
          Value: 10
        name: SCS-1V:4:10
        numberOfvCPUs: 1
        ramSize:
          Unit: GiB
          Value: 4.0
      - name: SCS-16V:32
        numberOfvCPUs: 16
        ramSize:
          Unit: GiB
          Value: 32.0
      - diskSize:
          Unit: GB
          Value: 100
        name: SCS-4V:8:100
        numberOfvCPUs: 4
        ramSize:
          Unit: GiB
          Value: 8.0
      - diskSize:
          Unit: GB
          Value: 100
        name: SCS-4V:32:100
        numberOfvCPUs: 4
        ramSize:
          Unit: GiB
          Value: 32.0
      - diskSize:
          Unit: GB
          Value: 20
        name: SCS-1V:8:20
        numberOfvCPUs: 1
        ramSize:
          Unit: GiB
          Value: 8.0
      - diskSize:
          Unit: GB
          Value: 100
        name: SCS-8V:32:100
        numberOfvCPUs: 8
        ramSize:
          Unit: GiB
          Value: 32.0
      - name: SCS-1V:1
        numberOfvCPUs: 1
        ramSize:
          Unit: GiB
          Value: 1.0
      - diskSize:
          Unit: GB
          Value: 5
        name: SCS-1V:2:5
        numberOfvCPUs: 1
        ramSize:
          Unit: GiB
          Value: 2.0
      - name: SCS-4V:32
        numberOfvCPUs: 4
        ramSize:
          Unit: GiB
          Value: 32.0
      - name: SCS-1V:4
        numberOfvCPUs: 1
        ramSize:
          Unit: GiB
          Value: 4.0
      - diskSize:
          Unit: GB
          Value: 20
        name: SCS-1V:0.5:20
        numberOfvCPUs: 1
        ramSize:
          Unit: GiB
          Value: 0.5
      - diskSize:
          Unit: GB
          Value: 100
        name: SCS-2V:4:100
        numberOfvCPUs: 2
        ramSize:
          Unit: GiB
          Value: 4.0
      - diskSize:
          Unit: GB
          Value: 100
        name: SCS-8V:8:100
        numberOfvCPUs: 8
        ramSize:
          Unit: GiB
          Value: 8.0
      - name: SCS-2V:16
        numberOfvCPUs: 2
        ramSize:
          Unit: GiB
          Value: 16.0
      - diskSize:
          Unit: GB
          Value: 50
        name: SCS-8V:32:50
        numberOfvCPUs: 8
        ramSize:
          Unit: GiB
          Value: 32.0
      - name: SCS-8V:16
        numberOfvCPUs: 8
        ramSize:
          Unit: GiB
          Value: 16.0
      - name: SCS-4V:16
        numberOfvCPUs: 4
        ramSize:
          Unit: GiB
          Value: 16.0
      - name: SCS-1V:2
        numberOfvCPUs: 1
        ramSize:
          Unit: GiB
          Value: 2.0
      - diskSize:
          Unit: GB
          Value: 50
        name: SCS-8V:16:50
        numberOfvCPUs: 8
        ramSize:
          Unit: GiB
          Value: 16.0
      - diskSize:
          Unit: GB
          Value: 20
        name: SCS-1V:1:20
        numberOfvCPUs: 1
        ramSize:
          Unit: GiB
          Value: 1.0
      - diskSize:
          Unit: GB
          Value: 50
        name: SCS-4V:8:50
        numberOfvCPUs: 4
        ramSize:
          Unit: GiB
          Value: 8.0
      - diskSize:
          Unit: GB
          Value: 50
        name: SCS-4V:32:50
        numberOfvCPUs: 4
        ramSize:
          Unit: GiB
          Value: 32.0
      - diskSize:
          Unit: GB
          Value: 50
        name: SCS-2V:4:50
        numberOfvCPUs: 2
        ramSize:
          Unit: GiB
          Value: 4.0
      - diskSize:
          Unit: GB
          Value: 20
        name: SCS-2V:2:20
        numberOfvCPUs: 2
        ramSize:
          Unit: GiB
          Value: 2.0
      - name: SCS-2V:2
        numberOfvCPUs: 2
        ramSize:
          Unit: GiB
          Value: 2.0
      - name: SCS-1V:0.5
        numberOfvCPUs: 1
        ramSize:
          Unit: GiB
          Value: 0.5
      - diskSize:
          Unit: GB
          Value: 5
        name: SCS-1L:1:5
        numberOfvCPUs: 1
        ramSize:
          Unit: GiB
          Value: 1.0
      - name: SCS-8V:32
        numberOfvCPUs: 8
        ramSize:
          Unit: GiB
          Value: 32.0
      - name: SCS-2V:8
        numberOfvCPUs: 2
        ramSize:
          Unit: GiB
          Value: 8.0
      - diskSize:
          Unit: GB
          Value: 100
        name: SCS-16V:64:100
        numberOfvCPUs: 16
        ramSize:
          Unit: GiB
          Value: 64.0
      - diskSize:
          Unit: GB
          Value: 20
        name: SCS-2V:8:20
        numberOfvCPUs: 2
        ramSize:
          Unit: GiB
          Value: 8.0
      - name: SCS-2V:4
        numberOfvCPUs: 2
        ramSize:
          Unit: GiB
          Value: 4.0
      - diskSize:
          Unit: GB
          Value: 100
        name: SCS-16V:32:100
        numberOfvCPUs: 16
        ramSize:
          Unit: GiB
          Value: 32.0
      - diskSize:
          Unit: GB
          Value: 50
        name: SCS-2V:16:50
        numberOfvCPUs: 2
        ramSize:
          Unit: GiB
          Value: 16.0
      - name: SCS-4V:8
        numberOfvCPUs: 4
        ramSize:
          Unit: GiB
          Value: 8.0
      - diskSize:
          Unit: GB
          Value: 20
        name: SCS-2V:4:20
        numberOfvCPUs: 2
        ramSize:
          Unit: GiB
          Value: 4.0
      - diskSize:
          Unit: GB
          Value: 10
        name: SCS-1V:1:10
        numberOfvCPUs: 1
        ramSize:
          Unit: GiB
          Value: 1.0
      - name: SCS-1L:1
        numberOfvCPUs: 1
        ramSize:
          Unit: GiB
          Value: 1.0
      - diskSize:
          Unit: GB
          Value: 20
        name: SCS-4V:8:20
        numberOfvCPUs: 4
        ramSize:
          Unit: GiB
          Value: 8.0
      - diskSize:
          Unit: GB
          Value: 100
        name: SCS-8V:16:100
        numberOfvCPUs: 8
        ramSize:
          Unit: GiB
          Value: 16.0
      - diskSize:
          Unit: GB
          Value: 100
        name: SCS-4V:16:100
        numberOfvCPUs: 4
        ramSize:
          Unit: GiB
          Value: 16.0
      - diskSize:
          Unit: GB
          Value: 100
        name: SCS-2V:8:100
        numberOfvCPUs: 2
        ramSize:
          Unit: GiB
          Value: 8.0
      - diskSize:
          Unit: GB
          Value: 10
        name: SCS-2V:4:10
        numberOfvCPUs: 2
        ramSize:
          Unit: GiB
          Value: 4.0
      - name: SCS-16V:64
        numberOfvCPUs: 16
        ramSize:
          Unit: GiB
          Value: 64.0
      - name: SCS-8V:8
        numberOfvCPUs: 8
        ramSize:
          Unit: GiB
          Value: 8.0
      - diskSize:
          Unit: GB
          Value: 20
        name: octavia
        numberOfvCPUs: 1
        ramSize:
          Unit: GiB
          Value: 1.0
      name: nova
      versions:
      - max_microversion: '2.93'
        min_microversion: '2.1'
        status: CURRENT
        url: https://api.gx-scs.sovereignit.cloud:8774/v2.1/
        version: '2.1'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:8774/v2/
        version: '2.0'
    compute_legacy:
      endpoint: https://api.gx-scs.sovereignit.cloud:8774/v2/${OS_PROJECT_ID}
      name: nova_legacy
    dns:
      endpoint: https://api.gx-scs.sovereignit.cloud:9001/v2
      name: designate
      versions:
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9001/v2
        version: '2.0'
      - status: CURRENT
        url: https://api.gx-scs.sovereignit.cloud:9001/v2
        version: '2.0'
    identity:
      endpoint: https://api.gx-scs.sovereignit.cloud:5000
      name: keystone
      versions:
      - status: CURRENT
        url: https://api.gx-scs.sovereignit.cloud:5000/v3/
        version: '3.14'
    image:
      endpoint: https://api.gx-scs.sovereignit.cloud:9292/v2/
      name: glance
      versions:
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.0'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.1'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.2'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.3'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.4'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.5'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.6'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.7'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.8'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.9'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.10'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.11'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.12'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.13'
      - status: CURRENT
        url: https://api.gx-scs.sovereignit.cloud:9292/v2/
        version: '2.15'
    key_manager:
      endpoint: https://api.gx-scs.sovereignit.cloud:9311/v1/
      name: barbican
      versions:
      - status: CURRENT
        url: https://api.gx-scs.sovereignit.cloud:9311/v1/
        version: '1.0'
    load_balancer:
      endpoint: https://api.gx-scs.sovereignit.cloud:9876/v2.0
      flavors:
      - description: Active Passive
        name: amphora
      name: octavia
      versions:
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.0'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.1'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.2'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.3'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.4'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.5'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.6'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.7'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.8'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.9'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.10'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.11'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.12'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.13'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.14'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.15'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.16'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.17'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.18'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.19'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.20'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.21'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.22'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.23'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.24'
      - status: SUPPORTED
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.25'
      - status: CURRENT
        url: https://api.gx-scs.sovereignit.cloud:9876/v2
        version: '2.26'
    network:
      availability_zones:
      - nova
      endpoint: https://api.gx-scs.sovereignit.cloud:9696
      extensions:
      - address-group
      - address-scope
      - agent
      - allowed-address-pairs
      - auto-allocated-topology
      - availability_zone
      - default-subnetpools
      - dns-integration
      - dns-domain-ports
      - dns-integration-domain-keywords
      - expose-port-forwarding-in-fip
      - external-net
      - extra_dhcp_opt
      - extraroute
      - filter-validation
      - floating-ip-port-forwarding-description
      - floating-ip-port-forwarding-detail
      - floating-ip-port-forwarding-port-ranges
      - fip-port-details
      - flavors
      - floating-ip-port-forwarding
      - floatingip-pools
      - router
      - ext-gw-mode
      - multi-provider
      - net-mtu
      - net-mtu-writable
      - network_availability_zone
      - network-ip-availability
      - pagination
      - port-device-profile
      - port-mac-address-regenerate
      - port-numa-affinity-policy
      - port-resource-request
      - port-resource-request-groups
      - binding
      - binding-extended
      - port-security
      - project-id
      - provider
      - qos
      - qos-bw-limit-direction
      - qos-bw-minimum-ingress
      - qos-default
      - qos-fip
      - qos-gateway-ip
      - qos-port-network-policy
      - qos-pps-minimum
      - qos-pps-minimum-rule-alias
      - qos-pps
      - qos-rule-type-details
      - qos-rule-type-filter
      - qos-rules-alias
      - quota-check-limit
      - quotas
      - quota_details
      - rbac-policies
      - rbac-address-scope
      - rbac-security-groups
      - revision-if-match
      - standard-attr-revisions
      - router_availability_zone
      - security-groups-normalized-cidr
      - security-groups-remote-address-group
      - security-groups-shared-filtering
      - security-group
      - service-type
      - sorting
      - standard-attr-description
      - stateful-security-group
      - subnet-dns-publish-fixed-ip
      - subnet-service-types
      - subnet_allocation
      - standard-attr-tag
      - standard-attr-timestamp
      name: neutron
      versions:
      - status: CURRENT
        url: https://api.gx-scs.sovereignit.cloud:9696/v2.0/
        version: '2.0'
    object_store:
      endpoint: https://api.gx-scs.sovereignit.cloud:8080/swift/v1/AUTH_${OS_PROJECT_ID}
      name: swift
      versions:
      - status: CURRENT
        url: https://api.gx-scs.sovereignit.cloud:8080/swift/v1/
        version: '1.0'
    orchestration:
      endpoint: https://api.gx-scs.sovereignit.cloud:8004/v1/${OS_PROJECT_ID}
      name: heat
      versions:
      - status: CURRENT
        url: https://api.gx-scs.sovereignit.cloud:8004/v1/
        version: '1.0'
    placement:
      endpoint: https://api.gx-scs.sovereignit.cloud:8780/
      name: placement
      versions:
      - max_microversion: '1.39'
        min_microversion: '1.0'
        status: CURRENT
        url: https://api.gx-scs.sovereignit.cloud:8780/
        version: '1.0'
    volume:
      availability_zones:
      - nova
      endpoint: https://api.gx-scs.sovereignit.cloud:8776/v3/${OS_PROJECT_ID}
      extensions:
      - os-volume-transfer
      - backups
      - encryption
      - scheduler-stats
      - OS-SCH-HNT
      - cgsnapshots
      - qos-specs
      - os-vol-tenant-attr
      - os-quota-sets
      - os-snapshot-unmanage
      - os-extended-snapshot-attributes
      - os-admin-actions
      - os-snapshot-actions
      - os-extended-services
      - os-vol-host-attr
      - os-types-extra-specs
      - os-volume-unmanage
      - os-quota-class-sets
      - os-volume-encryption-metadata
      - os-vol-mig-status-attr
      - capabilities
      - os-volume-actions
      - os-services
      - os-types-manage
      - os-volume-type-access
      - os-used-limits
      - os-hosts
      - os-snapshot-manage
      - os-vol-image-meta
      - os-availability-zone
      - os-volume-manage
      - consistencygroups
      name: cinderv3
      versions:
      - max_microversion: '3.70'
        min_microversion: '3.0'
        status: CURRENT
        url: https://api.gx-scs.sovereignit.cloud:8776/v3/
        version: '3.0'
      volume_types:
      - name: LUKS
        public: true
      - name: __DEFAULT__
        public: true
  auth_url: https://api.gx-scs.sovereignit.cloud:5000
  regions:
  - RegionOne

gx-sd-generator.py:

INFO: Retry connection with 'default' domain
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/openstack/connection.py", line 500, in authorize
    return self.session.get_token()
  File "/usr/lib/python3/dist-packages/keystoneauth1/session.py", line 1205, in get_token
    return (self.get_auth_headers(auth) or {}).get('X-Auth-Token')
  File "/usr/lib/python3/dist-packages/keystoneauth1/session.py", line 1183, in get_auth_headers
    return auth.get_headers(self, **kwargs)
  File "/usr/lib/python3/dist-packages/keystoneauth1/plugin.py", line 95, in get_headers
    token = self.get_token(session)
  File "/usr/lib/python3/dist-packages/keystoneauth1/identity/base.py", line 88, in get_token
    return self.get_access(session).auth_token
  File "/usr/lib/python3/dist-packages/keystoneauth1/identity/base.py", line 134, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File "/usr/lib/python3/dist-packages/keystoneauth1/identity/v3/base.py", line 183, in get_auth_ref
    resp = session.post(token_url, json=body, headers=headers,
  File "/usr/lib/python3/dist-packages/keystoneauth1/session.py", line 1131, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/lib/python3/dist-packages/keystoneauth1/session.py", line 968, in request
    raise exceptions.from_response(resp, method, url)
keystoneauth1.exceptions.http.NotFound: Not Found (HTTP 404) (Request-ID: req-6c45a813-b6ca-4d65-aaf6-2c279269703f)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/mayster/gaia-x/hackaton/gx-self-description-generator/openstack-discovery.py", line 415, in ostackconn
    conn.authorize()
  File "/usr/lib/python3/dist-packages/openstack/connection.py", line 502, in authorize
    raise exceptions.raise_from_response(e.response)
  File "/usr/lib/python3/dist-packages/openstack/exceptions.py", line 234, in raise_from_response
    raise cls(
openstack.exceptions.ResourceNotFound: ResourceNotFound: 404: Client Error for url: https://api.gx-scs.sovereignit.cloud:5000/auth/tokens, 404 Not Found: Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/openstack/connection.py", line 500, in authorize
    return self.session.get_token()
  File "/usr/lib/python3/dist-packages/keystoneauth1/session.py", line 1205, in get_token
    return (self.get_auth_headers(auth) or {}).get('X-Auth-Token')
  File "/usr/lib/python3/dist-packages/keystoneauth1/session.py", line 1183, in get_auth_headers
    return auth.get_headers(self, **kwargs)
  File "/usr/lib/python3/dist-packages/keystoneauth1/plugin.py", line 95, in get_headers
    token = self.get_token(session)
  File "/usr/lib/python3/dist-packages/keystoneauth1/identity/base.py", line 88, in get_token
    return self.get_access(session).auth_token
  File "/usr/lib/python3/dist-packages/keystoneauth1/identity/base.py", line 134, in get_access
    self.auth_ref = self.get_auth_ref(session)
  File "/usr/lib/python3/dist-packages/keystoneauth1/identity/v3/base.py", line 183, in get_auth_ref
    resp = session.post(token_url, json=body, headers=headers,
  File "/usr/lib/python3/dist-packages/keystoneauth1/session.py", line 1131, in post
    return self.request(url, 'POST', **kwargs)
  File "/usr/lib/python3/dist-packages/keystoneauth1/session.py", line 968, in request
    raise exceptions.from_response(resp, method, url)
keystoneauth1.exceptions.http.NotFound: Not Found (HTTP 404) (Request-ID: req-0ea47a46-80ad-46e7-8f72-ec4a85ab6152)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./gx-sd-generator.py", line 175, in <module>
    main(sys.argv)
  File "./gx-sd-generator.py", line 162, in main
    conn = ostack.ostackconn(ostack.cloud, timeout)
  File "/home/mayster/gaia-x/hackaton/gx-self-description-generator/openstack-discovery.py", line 420, in ostackconn
    conn.authorize()
  File "/usr/lib/python3/dist-packages/openstack/connection.py", line 502, in authorize
    raise exceptions.raise_from_response(e.response)
  File "/usr/lib/python3/dist-packages/openstack/exceptions.py", line 234, in raise_from_response
    raise cls(
openstack.exceptions.ResourceNotFound: ResourceNotFound: 404: Client Error for url: https://api.gx-scs.sovereignit.cloud:5000/auth/tokens, 404 Not Found: Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.
maystery commented 1 year ago

I found the cause of the issue. If you run it in venv you need to run it with Python prefix instead of direct execution.

Closing the issue.

garloff commented 1 year ago

So python3 ./gx-sd-generator.py works while ./gx-sd-generator.py does not?

maystery commented 1 year ago

That's right, in venv the interpreter differs from the file defined in the first line. Also, I think my base interpreter is contaminated with system-wide installations that's why the result is inconsistent in my case. (ups)

garloff commented 1 year ago

I'm using a shebang (#!) with #! /usr/bin/python3 rather than the more common #! /usr/bin/env python3 in the script, though I've seen both in the wild with reasoning for either side. If avoiding the env breaks venv, we should rather go back to using env. Interested in quickly checking this?

maystery commented 1 year ago

#!/usr/bin/env python3 works fine. I sent a PR #41 with this small modification.

garloff commented 1 year ago

Fixed by merged PR #41.