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

CNF-16400: CNF-16401: Artifacts server api_versions and GET one #467

Conversation

irinamihai
Copy link
Collaborator

Description:

  • add support for getting the API version and minor versions
$ curl -kq https://o2ims.apps.$MY_CLUSTER/o2ims-infrastructureArtifacts/api_versions -H "Authorization: Bearer ${MY_TOKEN}"  | jq
{
  "apiVersions": [
    {
      "version": "1.0.0"
    }
  ],
  "uriPrefix": "/o2ims-infrastructureArtifacts/v1"
}

$ curl -kq https://o2ims.apps.$MY_CLUSTER/o2ims-infrastructureArtifacts/v1/api_versions -H "Authorization: Bearer ${MY_TOKEN}"  | jq
{
  "apiVersions": [
    {
      "version": "1.0.0"
    }
  ],
  "uriPrefix": "/o2ims-infrastructureArtifacts/v1"
}
  • add support for getting one ManagedInfrastructureTemplate by specifying the ManagedInfrastructureTemplateId in the request. ManagedInfrastructureTemplateId is currently compared to <clusterTemplateName>.<clusterTemplateVersion> (equal to ClusterTemplate metadata.name) of a ClusterTemplate to determine a match.
$ curl -kq "https://o2ims.apps.$MY_CLUSTER/o2ims-infrastructureArtifacts/v1/managedInfrastructureTemplates/sno-ran-du.v4-17-3-1" -H "Authorization: Bearer ${MY_TOKEN}"  | jq

$ curl -kq "https://o2ims.apps.$MY_CLUSTER/o2ims-infrastructureArtifacts/v1/managedInfrastructureTemplates/random-name" -H "Authorization: Bearer ${MY_TOKEN}"  | jq
{
  "additionalAttributes": {
    "managedInfrastructureTemplateId": "random-name"
  },
  "detail": "requested ManagedInfrastructureTemplate not found",
  "status": 404
}

@openshift-ci-robot
Copy link
Collaborator

openshift-ci-robot commented Jan 14, 2025

@irinamihai: This pull request references CNF-16400 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "4.19.0" version, but no target version was set.

In response to this:

Description:

  • add support for getting the API version and minor versions
$ curl -kq https://o2ims.apps.$MY_CLUSTER/o2ims-infrastructureArtifacts/api_versions -H "Authorization: Bearer ${MY_TOKEN}"  | jq
{
 "apiVersions": [
   {
     "version": "1.0.0"
   }
 ],
 "uriPrefix": "/o2ims-infrastructureArtifacts/v1"
}

$ curl -kq https://o2ims.apps.$MY_CLUSTER/o2ims-infrastructureArtifacts/v1/api_versions -H "Authorization: Bearer ${MY_TOKEN}"  | jq
{
 "apiVersions": [
   {
     "version": "1.0.0"
   }
 ],
 "uriPrefix": "/o2ims-infrastructureArtifacts/v1"
}
  • add support for getting one ManagedInfrastructureTemplate by specifying the ManagedInfrastructureTemplateId in the request. ManagedInfrastructureTemplateId is currently compared to <clusterTemplateName>.<clusterTemplateVersion> (equal to ClusterTemplate metadata.name) of a ClusterTemplate to determine a match.
$ curl -kq "https://o2ims.apps.$MY_CLUSTER/o2ims-infrastructureArtifacts/v1/managedInfrastructureTemplates/sno-ran-du.v4-17-3-1" -H "Authorization: Bearer ${MY_TOKEN}"  | jq

$ curl -kq "https://o2ims.apps.$MY_CLUSTER/o2ims-infrastructureArtifacts/v1/managedInfrastructureTemplates/random-name" -H "Authorization: Bearer ${MY_TOKEN}"  | jq
{
 "additionalAttributes": {
   "managedInfrastructureTemplateId": "random-name"
 },
 "detail": "requested ManagedInfrastructureTemplate not found",
 "status": 404
}

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@browsell
Copy link
Collaborator

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 14, 2025
Description:
- add support for getting the version and minor versions
- add support for getting one ManagedInfrastructureTemplate
  by specifying the ManagedInfrastructureTemplateId in the request.
  ManagedInfrastructureTemplateId is currently compared to
  <clusterTemplateName>.<clusterTemplateVersion> (ClusterTemplate
  metadata.name) of a ClusterTemplate to determine a match.
@irinamihai irinamihai force-pushed the artifacts-server-api-versions branch from 3ccc260 to 9689adc Compare January 15, 2025 16:16
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jan 15, 2025
@irinamihai irinamihai requested a review from alegacy January 15, 2025 16:17
@alegacy
Copy link
Collaborator

alegacy commented Jan 15, 2025

/lgtm
/approve

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 15, 2025
Copy link

openshift-ci bot commented Jan 15, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: alegacy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 15, 2025
@openshift-merge-bot openshift-merge-bot bot merged commit 8ccb318 into openshift-kni:main Jan 15, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants