Skip to content

Commit

Permalink
feat: Implement ID based client workflow to container registry API
Browse files Browse the repository at this point in the history
  • Loading branch information
jopemachine committed Aug 5, 2024
1 parent c1445da commit 30a9958
Show file tree
Hide file tree
Showing 4 changed files with 499 additions and 118 deletions.
128 changes: 110 additions & 18 deletions src/ai/backend/manager/api/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,18 @@ type Queries {
endpoint_token(token: String!): EndpointToken
endpoint_token_list(limit: Int!, offset: Int!, filter: String, order: String, endpoint_id: UUID): EndpointTokenList
quota_scope(storage_host_name: String!, quota_scope_id: String!): QuotaScope
container_registry(hostname: String!): ContainerRegistry
container_registries: [ContainerRegistry]

"""Added in 24.09.0."""
container_registry(id: UUID!): ContainerRegistry

"""Added in 24.09.0."""
container_registries(registry_name: String!): [ContainerRegistry]

"""Added in 24.09.0."""
container_registry_node(id: String!): ContainerRegistry

"""Added in 24.09.0."""
container_registry_nodes(filter: String, order: String, offset: Int, before: String, after: String, first: Int, last: Int): ContainerRegistryConnection

"""Added in 24.03.0."""
model_card(id: String!): ModelCard
Expand Down Expand Up @@ -1018,20 +1028,57 @@ type QuotaDetails {
type ContainerRegistry implements Node {
"""The ID of the object"""
id: ID!
hostname: String
config: ContainerRegistryConfig
}

type ContainerRegistryConfig {
"""Added in 24.09.0."""
url: String!
type: String!
project: [String]

"""Added in 24.09.0."""
type: ContainerRegistryTypeField!

"""Added in 24.09.0."""
registry_name: String!

"""Added in 24.09.0."""
is_global: Boolean

"""Added in 24.09.0."""
project: String

"""Added in 24.09.0."""
username: String

"""Added in 24.09.0."""
password: String
ssl_verify: Boolean

"""Added in 24.09.0."""
is_global: Boolean
ssl_verify: Boolean
}

"""Added in 24.09.0."""
scalar ContainerRegistryTypeField

"""Added in 24.09.0."""
type ContainerRegistryConnection {
"""Pagination data for this connection."""
pageInfo: PageInfo!

"""Contains the nodes in this connection."""
edges: [ContainerRegistryEdge]!

"""Total count of the GQL nodes of the query."""
count: Int
}

"""A Relay edge containing a `ContainerRegistry` and its cursor."""
type ContainerRegistryEdge {
"""The item at the end of the edge"""
node: ContainerRegistry

"""A cursor for use in pagination"""
cursor: String!
}

type ModelCard implements Node {
Expand Down Expand Up @@ -1192,9 +1239,12 @@ type Mutations {
disassociate_all_scaling_groups_with_group(user_group: UUID!): DisassociateAllScalingGroupsWithGroup
set_quota_scope(props: QuotaScopeInput!, quota_scope_id: String!, storage_host_name: String!): SetQuotaScope
unset_quota_scope(quota_scope_id: String!, storage_host_name: String!): UnsetQuotaScope
create_container_registry(hostname: String!, props: CreateContainerRegistryInput!): CreateContainerRegistry
modify_container_registry(hostname: String!, props: ModifyContainerRegistryInput!): ModifyContainerRegistry
delete_container_registry(hostname: String!): DeleteContainerRegistry
create_container_registry(
"""Added in 24.09.0."""
props: CreateContainerRegistryInput!
): CreateContainerRegistry
modify_container_registry(props: ModifyContainerRegistryInput!): ModifyContainerRegistry
delete_container_registry(props: DeleteContainerRegistryInput!): DeleteContainerRegistry
modify_endpoint(endpoint_id: UUID!, props: ModifyEndpointInput!): ModifyEndpoint
}

Expand Down Expand Up @@ -1799,41 +1849,83 @@ type UnsetQuotaScope {
}

type CreateContainerRegistry {
id: UUID!
container_registry: ContainerRegistry
}

input CreateContainerRegistryInput {
"""Added in 24.09.0."""
url: String!
type: String!
project: [String]

"""
Registry type. One of ('docker', 'harbor', 'harbor2', 'local'). Added in 24.09.0.
"""
type: ContainerRegistryTypeField!

"""Added in 24.09.0."""
registry_name: String!

"""Added in 24.09.0."""
is_global: Boolean

"""Added in 24.09.0."""
project: String

"""Added in 24.09.0."""
username: String

"""Added in 24.09.0."""
password: String
ssl_verify: Boolean

"""Added in 24.09.0."""
is_global: Boolean
ssl_verify: Boolean
}

type ModifyContainerRegistry {
container_registry: ContainerRegistry
}

input ModifyContainerRegistryInput {
"""Object id. Can be either global id or object id. Added in 24.09.0."""
id: String!

"""Added in 24.09.0."""
url: String
type: String
project: [String]

"""
Registry type. One of ('docker', 'harbor', 'harbor2', 'local'). Added in 24.09.0.
"""
type: ContainerRegistryTypeField

"""Added in 24.09.0."""
registry_name: String

"""Added in 24.09.0."""
is_global: Boolean

"""Added in 24.09.0."""
project: String

"""Added in 24.09.0."""
username: String

"""Added in 24.09.0."""
password: String
ssl_verify: Boolean

"""Added in 24.09.0."""
is_global: Boolean
ssl_verify: Boolean
}

type DeleteContainerRegistry {
container_registry: ContainerRegistry
}

"""Added in 24.09.0."""
input DeleteContainerRegistryInput {
"""Object id. Can be either global id or object id. Added in 24.09.0."""
id: String!
}

type ModifyEndpoint {
ok: Boolean
msg: String
Expand Down
Loading

0 comments on commit 30a9958

Please sign in to comment.