-
Notifications
You must be signed in to change notification settings - Fork 75
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
MultiRegistry Beta API #944
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall this looks great. A few suggestions and questions inline.
curl -X GET \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ | ||
"https://api.digitalocean.com/v2/registry" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"https://api.digitalocean.com/v2/registry" | |
"https://api.digitalocean.com/v2/registries" |
@@ -0,0 +1,51 @@ | |||
operationId: multiregistry_create |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
operationId: multiregistry_create | |
operationId: registries_create |
The operation ID is used by generated clients to name methods. So that we are consistent with godo and other resources, we probably want to use registries
here in place of multiregistry
.
@@ -0,0 +1,51 @@ | |||
operationId: multiregistry_create | |||
|
|||
summary: Create Container Registry By Name (Beta) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
summary: Create Container Registry By Name (Beta) | |
summary: [Beta] Create Container Registry By Name |
Let's put the beta tag up front for clarity.
operationId: multiregistry_delete | ||
|
||
summary: Delete Container Registry By Name (Beta) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
operationId: multiregistry_delete | |
summary: Delete Container Registry By Name (Beta) | |
operationId: registries_delete | |
summary: [Beta] Delete Container Registry By Name |
operationId: multiregistry_get | ||
|
||
summary: Get Container Registry By Name (Beta) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
operationId: multiregistry_get | |
summary: Get Container Registry By Name (Beta) | |
operationId: registries_get | |
summary: [Beta] Get a Container Registry By Name |
operationId: multiregistry_get_all | ||
|
||
summary: Get All Container Registries (Beta) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
operationId: multiregistry_get_all | |
summary: Get All Container Registries (Beta) | |
operationId: registries_list | |
summary: [Beta] List All Container Registries |
operationId: multiregistry_get_dockerCredentials | ||
|
||
summary: Get Docker Credentials By Registry Name (Beta) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
operationId: multiregistry_get_dockerCredentials | |
summary: Get Docker Credentials By Registry Name (Beta) | |
operationId: registries_get_dockerCredentials | |
summary: [Beta] Get Docker Credentials By Registry Name |
"region": "fra1" | ||
} | ||
|
||
resp = client.registry.create(body=req) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resp = client.registry.create(body=req) | |
resp = client.registries.create(body=req) |
As mentioned, these are generated from the operation ID. So at the moment, that would actually be client.multiregistry.create
, but I think we really want client.registries.create
.
curl -X GET \ | ||
-H "Content-Type: application/json" \ | ||
-H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \ | ||
"https://api.digitalocean.com/v2/registries" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"https://api.digitalocean.com/v2/registries" | |
"https://api.digitalocean.com/v2/registries/example" |
@@ -0,0 +1,39 @@ | |||
type: object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nearly identical to the existing registry model. It's just missing the subscription
piece. I wonder if we could do this in a way that doesn't require duplication?
Maybe something like rename this to models/registry_base.yml
and update the models/registry.yml
to be:
type: object
allOf:
- $ref: 'registry_base.yml'
- type: object
properties:
subscription:
allOf:
- readOnly: true
- $ref: 'subscription.yml'
This PR adds the new endpoints for MultiRegistry Beta in Container Registry Product.
Endpoints added:
JIRA: DOCR-1003
Channel: #docr-eng