Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add metadata server #6

Merged
merged 1 commit into from
Nov 6, 2023
Merged

Conversation

jhernand
Copy link
Collaborator

@jhernand jhernand commented Nov 6, 2023

This patch adds a new metadata-server that responds to the API versions and cloud information endpoints. For example, for the API versions:

$ curl http://localhost:8080/O2ims_infrastructureInventory/api_versions
{
  "uriPrefix": "/O2ims_infrastructureInventory/v1",
  "apiVersions": [
    {
      "version": "1.0.0"
    }
  ]
}

$ curl http://localhost:8080/O2ims_infrastructureInventory/v1/api_versions
{
  "uriPrefix": "/O2ims_infrastructureInventory/v1",
  "apiVersions": [
    {
      "version": "1.0.0"
    }
  ]
}

And for the cloud information:

$ curl http://localhost:8080/O2ims_infrastructureInventory/v1
{
  "oCloudId": "6575154c-72fc-4ed8-9a87-a81885ab38bb",
  "globalCloudId": "6575154c-72fc-4ed8-9a87-a81885ab38bb",
  "name": "OpenShift O-Cloud",
  "description": "OpenShift O-Cloud",
  "serviceUri": "https://localhost:8080",
  "extensions": {}
}

Related: https://issues.redhat.com/browse/MGMT-16115

This patch adds a new `metadata-server` that responds to the API
versions and cloud information endpoints. For example, for the API
versions:

```shell
$ curl http://localhost:8080/O2ims_infrastructureInventory/api_versions
{
  "uriPrefix": "/O2ims_infrastructureInventory/v1",
  "apiVersions": [
    {
      "version": "1.0.0"
    }
  ]
}

$ curl http://localhost:8080/O2ims_infrastructureInventory/v1/api_versions
{
  "uriPrefix": "/O2ims_infrastructureInventory/v1",
  "apiVersions": [
    {
      "version": "1.0.0"
    }
  ]
}

```

And for the cloud information:

```shell
$ curl http://localhost:8080/O2ims_infrastructureInventory/v1
{
  "oCloudId": "6575154c-72fc-4ed8-9a87-a81885ab38bb",
  "globalCloudId": "6575154c-72fc-4ed8-9a87-a81885ab38bb",
  "name": "OpenShift O-Cloud",
  "description": "OpenShift O-Cloud",
  "serviceUri": "https://localhost:8080",
  "extensions": {}
}
```

Related: https://issues.redhat.com/browse/MGMT-16115
Signed-off-by: Juan Hernandez <[email protected]>
@jhernand jhernand merged commit 4259744 into openshift-kni:main Nov 6, 2023
4 checks passed
@jhernand jhernand deleted the add_metadata_server branch November 6, 2023 19:09
irinamihai pushed a commit to irinamihai/oran-o2ims that referenced this pull request Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant