mirror of
https://github.com/rancher/types.git
synced 2025-09-24 19:39:13 +00:00
Update generated code
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
type Client struct {
|
||||
clientbase.APIBaseClient
|
||||
|
||||
NodePool NodePoolOperations
|
||||
Node NodeOperations
|
||||
NodeDriver NodeDriverOperations
|
||||
NodeTemplate NodeTemplateOperations
|
||||
@@ -57,6 +58,7 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) {
|
||||
APIBaseClient: baseClient,
|
||||
}
|
||||
|
||||
client.NodePool = newNodePoolClient(client)
|
||||
client.Node = newNodeClient(client)
|
||||
client.NodeDriver = newNodeDriverClient(client)
|
||||
client.NodeTemplate = newNodeTemplateClient(client)
|
||||
|
@@ -27,7 +27,6 @@ const (
|
||||
ClusterFieldLabels = "labels"
|
||||
ClusterFieldLimits = "limits"
|
||||
ClusterFieldName = "name"
|
||||
ClusterFieldNodePools = "nodePools"
|
||||
ClusterFieldOwnerReferences = "ownerReferences"
|
||||
ClusterFieldRancherKubernetesEngineConfig = "rancherKubernetesEngineConfig"
|
||||
ClusterFieldRemoved = "removed"
|
||||
@@ -61,7 +60,6 @@ type Cluster struct {
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Limits map[string]string `json:"limits,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
NodePools []NodePool `json:"nodePools,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
RancherKubernetesEngineConfig *RancherKubernetesEngineConfig `json:"rancherKubernetesEngineConfig,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
|
@@ -11,6 +11,7 @@ const (
|
||||
ClusterRegistrationTokenFieldCommand = "command"
|
||||
ClusterRegistrationTokenFieldCreated = "created"
|
||||
ClusterRegistrationTokenFieldCreatorID = "creatorId"
|
||||
ClusterRegistrationTokenFieldInsecureCommand = "insecureCommand"
|
||||
ClusterRegistrationTokenFieldLabels = "labels"
|
||||
ClusterRegistrationTokenFieldManifestURL = "manifestUrl"
|
||||
ClusterRegistrationTokenFieldName = "name"
|
||||
@@ -32,6 +33,7 @@ type ClusterRegistrationToken struct {
|
||||
Command string `json:"command,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty"`
|
||||
InsecureCommand string `json:"insecureCommand,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
ManifestURL string `json:"manifestUrl,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
|
@@ -1,16 +1,18 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ClusterRegistrationTokenStatusType = "clusterRegistrationTokenStatus"
|
||||
ClusterRegistrationTokenStatusFieldCommand = "command"
|
||||
ClusterRegistrationTokenStatusFieldManifestURL = "manifestUrl"
|
||||
ClusterRegistrationTokenStatusFieldNodeCommand = "nodeCommand"
|
||||
ClusterRegistrationTokenStatusFieldToken = "token"
|
||||
ClusterRegistrationTokenStatusType = "clusterRegistrationTokenStatus"
|
||||
ClusterRegistrationTokenStatusFieldCommand = "command"
|
||||
ClusterRegistrationTokenStatusFieldInsecureCommand = "insecureCommand"
|
||||
ClusterRegistrationTokenStatusFieldManifestURL = "manifestUrl"
|
||||
ClusterRegistrationTokenStatusFieldNodeCommand = "nodeCommand"
|
||||
ClusterRegistrationTokenStatusFieldToken = "token"
|
||||
)
|
||||
|
||||
type ClusterRegistrationTokenStatus struct {
|
||||
Command string `json:"command,omitempty"`
|
||||
ManifestURL string `json:"manifestUrl,omitempty"`
|
||||
NodeCommand string `json:"nodeCommand,omitempty"`
|
||||
Token string `json:"token,omitempty"`
|
||||
Command string `json:"command,omitempty"`
|
||||
InsecureCommand string `json:"insecureCommand,omitempty"`
|
||||
ManifestURL string `json:"manifestUrl,omitempty"`
|
||||
NodeCommand string `json:"nodeCommand,omitempty"`
|
||||
Token string `json:"token,omitempty"`
|
||||
}
|
||||
|
@@ -10,7 +10,6 @@ const (
|
||||
ClusterSpecFieldGoogleKubernetesEngineConfig = "googleKubernetesEngineConfig"
|
||||
ClusterSpecFieldImportedConfig = "importedConfig"
|
||||
ClusterSpecFieldInternal = "internal"
|
||||
ClusterSpecFieldNodePools = "nodePools"
|
||||
ClusterSpecFieldRancherKubernetesEngineConfig = "rancherKubernetesEngineConfig"
|
||||
)
|
||||
|
||||
@@ -23,6 +22,5 @@ type ClusterSpec struct {
|
||||
GoogleKubernetesEngineConfig *GoogleKubernetesEngineConfig `json:"googleKubernetesEngineConfig,omitempty"`
|
||||
ImportedConfig *ImportedConfig `json:"importedConfig,omitempty"`
|
||||
Internal bool `json:"internal,omitempty"`
|
||||
NodePools []NodePool `json:"nodePools,omitempty"`
|
||||
RancherKubernetesEngineConfig *RancherKubernetesEngineConfig `json:"rancherKubernetesEngineConfig,omitempty"`
|
||||
}
|
||||
|
20
client/management/v3/zz_generated_condition.go
Normal file
20
client/management/v3/zz_generated_condition.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
ConditionType = "condition"
|
||||
ConditionFieldLastTransitionTime = "lastTransitionTime"
|
||||
ConditionFieldLastUpdateTime = "lastUpdateTime"
|
||||
ConditionFieldMessage = "message"
|
||||
ConditionFieldReason = "reason"
|
||||
ConditionFieldStatus = "status"
|
||||
ConditionFieldType = "type"
|
||||
)
|
||||
|
||||
type Condition struct {
|
||||
LastTransitionTime string `json:"lastTransitionTime,omitempty"`
|
||||
LastUpdateTime string `json:"lastUpdateTime,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
}
|
@@ -25,10 +25,8 @@ const (
|
||||
NodeFieldLimits = "limits"
|
||||
NodeFieldName = "name"
|
||||
NodeFieldNamespaceId = "namespaceId"
|
||||
NodeFieldNodeAnnotations = "nodeAnnotations"
|
||||
NodeFieldNodeLabels = "nodeLabels"
|
||||
NodeFieldNodeName = "nodeName"
|
||||
NodeFieldNodePoolUUID = "nodePoolUuid"
|
||||
NodeFieldNodePoolName = "nodePoolUuid"
|
||||
NodeFieldNodeTaints = "nodeTaints"
|
||||
NodeFieldNodeTemplateId = "nodeTemplateId"
|
||||
NodeFieldOwnerReferences = "ownerReferences"
|
||||
@@ -70,10 +68,8 @@ type Node struct {
|
||||
Limits map[string]string `json:"limits,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty"`
|
||||
NodeAnnotations map[string]string `json:"nodeAnnotations,omitempty"`
|
||||
NodeLabels map[string]string `json:"nodeLabels,omitempty"`
|
||||
NodeName string `json:"nodeName,omitempty"`
|
||||
NodePoolUUID string `json:"nodePoolUuid,omitempty"`
|
||||
NodePoolName string `json:"nodePoolUuid,omitempty"`
|
||||
NodeTaints []Taint `json:"nodeTaints,omitempty"`
|
||||
NodeTemplateId string `json:"nodeTemplateId,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
|
@@ -1,20 +0,0 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
NodeDriverConditionType = "nodeDriverCondition"
|
||||
NodeDriverConditionFieldLastTransitionTime = "lastTransitionTime"
|
||||
NodeDriverConditionFieldLastUpdateTime = "lastUpdateTime"
|
||||
NodeDriverConditionFieldMessage = "message"
|
||||
NodeDriverConditionFieldReason = "reason"
|
||||
NodeDriverConditionFieldStatus = "status"
|
||||
NodeDriverConditionFieldType = "type"
|
||||
)
|
||||
|
||||
type NodeDriverCondition struct {
|
||||
LastTransitionTime string `json:"lastTransitionTime,omitempty"`
|
||||
LastUpdateTime string `json:"lastUpdateTime,omitempty"`
|
||||
Message string `json:"message,omitempty"`
|
||||
Reason string `json:"reason,omitempty"`
|
||||
Status string `json:"status,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
}
|
@@ -6,5 +6,5 @@ const (
|
||||
)
|
||||
|
||||
type NodeDriverStatus struct {
|
||||
Conditions []NodeDriverCondition `json:"conditions,omitempty"`
|
||||
Conditions []Condition `json:"conditions,omitempty"`
|
||||
}
|
||||
|
@@ -1,26 +1,121 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/rancher/norman/types"
|
||||
)
|
||||
|
||||
const (
|
||||
NodePoolType = "nodePool"
|
||||
NodePoolFieldAnnotations = "annotations"
|
||||
NodePoolFieldControlPlane = "controlPlane"
|
||||
NodePoolFieldEtcd = "etcd"
|
||||
NodePoolFieldHostnamePrefix = "hostnamePrefix"
|
||||
NodePoolFieldLabels = "labels"
|
||||
NodePoolFieldNodeTemplateId = "nodeTemplateId"
|
||||
NodePoolFieldQuantity = "quantity"
|
||||
NodePoolFieldUUID = "uuid"
|
||||
NodePoolFieldWorker = "worker"
|
||||
NodePoolType = "nodePool"
|
||||
NodePoolFieldAnnotations = "annotations"
|
||||
NodePoolFieldClusterId = "clusterId"
|
||||
NodePoolFieldControlPlane = "controlPlane"
|
||||
NodePoolFieldCreated = "created"
|
||||
NodePoolFieldCreatorID = "creatorId"
|
||||
NodePoolFieldDisplayName = "displayName"
|
||||
NodePoolFieldEtcd = "etcd"
|
||||
NodePoolFieldHostnamePrefix = "hostnamePrefix"
|
||||
NodePoolFieldLabels = "labels"
|
||||
NodePoolFieldName = "name"
|
||||
NodePoolFieldNamespaceId = "namespaceId"
|
||||
NodePoolFieldNodeAnnotations = "nodeAnnotations"
|
||||
NodePoolFieldNodeLabels = "nodeLabels"
|
||||
NodePoolFieldNodeTemplateId = "nodeTemplateId"
|
||||
NodePoolFieldOwnerReferences = "ownerReferences"
|
||||
NodePoolFieldQuantity = "quantity"
|
||||
NodePoolFieldRemoved = "removed"
|
||||
NodePoolFieldState = "state"
|
||||
NodePoolFieldStatus = "status"
|
||||
NodePoolFieldTransitioning = "transitioning"
|
||||
NodePoolFieldTransitioningMessage = "transitioningMessage"
|
||||
NodePoolFieldUuid = "uuid"
|
||||
NodePoolFieldWorker = "worker"
|
||||
)
|
||||
|
||||
type NodePool struct {
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
ControlPlane bool `json:"controlPlane,omitempty"`
|
||||
Etcd bool `json:"etcd,omitempty"`
|
||||
HostnamePrefix string `json:"hostnamePrefix,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
NodeTemplateId string `json:"nodeTemplateId,omitempty"`
|
||||
Quantity *int64 `json:"quantity,omitempty"`
|
||||
UUID string `json:"uuid,omitempty"`
|
||||
Worker bool `json:"worker,omitempty"`
|
||||
types.Resource
|
||||
Annotations map[string]string `json:"annotations,omitempty"`
|
||||
ClusterId string `json:"clusterId,omitempty"`
|
||||
ControlPlane bool `json:"controlPlane,omitempty"`
|
||||
Created string `json:"created,omitempty"`
|
||||
CreatorID string `json:"creatorId,omitempty"`
|
||||
DisplayName string `json:"displayName,omitempty"`
|
||||
Etcd bool `json:"etcd,omitempty"`
|
||||
HostnamePrefix string `json:"hostnamePrefix,omitempty"`
|
||||
Labels map[string]string `json:"labels,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
NamespaceId string `json:"namespaceId,omitempty"`
|
||||
NodeAnnotations map[string]string `json:"nodeAnnotations,omitempty"`
|
||||
NodeLabels map[string]string `json:"nodeLabels,omitempty"`
|
||||
NodeTemplateId string `json:"nodeTemplateId,omitempty"`
|
||||
OwnerReferences []OwnerReference `json:"ownerReferences,omitempty"`
|
||||
Quantity *int64 `json:"quantity,omitempty"`
|
||||
Removed string `json:"removed,omitempty"`
|
||||
State string `json:"state,omitempty"`
|
||||
Status *NodePoolStatus `json:"status,omitempty"`
|
||||
Transitioning string `json:"transitioning,omitempty"`
|
||||
TransitioningMessage string `json:"transitioningMessage,omitempty"`
|
||||
Uuid string `json:"uuid,omitempty"`
|
||||
Worker bool `json:"worker,omitempty"`
|
||||
}
|
||||
type NodePoolCollection struct {
|
||||
types.Collection
|
||||
Data []NodePool `json:"data,omitempty"`
|
||||
client *NodePoolClient
|
||||
}
|
||||
|
||||
type NodePoolClient struct {
|
||||
apiClient *Client
|
||||
}
|
||||
|
||||
type NodePoolOperations interface {
|
||||
List(opts *types.ListOpts) (*NodePoolCollection, error)
|
||||
Create(opts *NodePool) (*NodePool, error)
|
||||
Update(existing *NodePool, updates interface{}) (*NodePool, error)
|
||||
ByID(id string) (*NodePool, error)
|
||||
Delete(container *NodePool) error
|
||||
}
|
||||
|
||||
func newNodePoolClient(apiClient *Client) *NodePoolClient {
|
||||
return &NodePoolClient{
|
||||
apiClient: apiClient,
|
||||
}
|
||||
}
|
||||
|
||||
func (c *NodePoolClient) Create(container *NodePool) (*NodePool, error) {
|
||||
resp := &NodePool{}
|
||||
err := c.apiClient.Ops.DoCreate(NodePoolType, container, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *NodePoolClient) Update(existing *NodePool, updates interface{}) (*NodePool, error) {
|
||||
resp := &NodePool{}
|
||||
err := c.apiClient.Ops.DoUpdate(NodePoolType, &existing.Resource, updates, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *NodePoolClient) List(opts *types.ListOpts) (*NodePoolCollection, error) {
|
||||
resp := &NodePoolCollection{}
|
||||
err := c.apiClient.Ops.DoList(NodePoolType, opts, resp)
|
||||
resp.client = c
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (cc *NodePoolCollection) Next() (*NodePoolCollection, error) {
|
||||
if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
|
||||
resp := &NodePoolCollection{}
|
||||
err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp)
|
||||
resp.client = cc.client
|
||||
return resp, err
|
||||
}
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *NodePoolClient) ByID(id string) (*NodePool, error) {
|
||||
resp := &NodePool{}
|
||||
err := c.apiClient.Ops.DoByID(NodePoolType, id, resp)
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func (c *NodePoolClient) Delete(container *NodePool) error {
|
||||
return c.apiClient.Ops.DoResourceDelete(NodePoolType, &container.Resource)
|
||||
}
|
||||
|
28
client/management/v3/zz_generated_node_pool_spec.go
Normal file
28
client/management/v3/zz_generated_node_pool_spec.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
NodePoolSpecType = "nodePoolSpec"
|
||||
NodePoolSpecFieldClusterId = "clusterId"
|
||||
NodePoolSpecFieldControlPlane = "controlPlane"
|
||||
NodePoolSpecFieldDisplayName = "displayName"
|
||||
NodePoolSpecFieldEtcd = "etcd"
|
||||
NodePoolSpecFieldHostnamePrefix = "hostnamePrefix"
|
||||
NodePoolSpecFieldNodeAnnotations = "nodeAnnotations"
|
||||
NodePoolSpecFieldNodeLabels = "nodeLabels"
|
||||
NodePoolSpecFieldNodeTemplateId = "nodeTemplateId"
|
||||
NodePoolSpecFieldQuantity = "quantity"
|
||||
NodePoolSpecFieldWorker = "worker"
|
||||
)
|
||||
|
||||
type NodePoolSpec struct {
|
||||
ClusterId string `json:"clusterId,omitempty"`
|
||||
ControlPlane bool `json:"controlPlane,omitempty"`
|
||||
DisplayName string `json:"displayName,omitempty"`
|
||||
Etcd bool `json:"etcd,omitempty"`
|
||||
HostnamePrefix string `json:"hostnamePrefix,omitempty"`
|
||||
NodeAnnotations map[string]string `json:"nodeAnnotations,omitempty"`
|
||||
NodeLabels map[string]string `json:"nodeLabels,omitempty"`
|
||||
NodeTemplateId string `json:"nodeTemplateId,omitempty"`
|
||||
Quantity *int64 `json:"quantity,omitempty"`
|
||||
Worker bool `json:"worker,omitempty"`
|
||||
}
|
10
client/management/v3/zz_generated_node_pool_status.go
Normal file
10
client/management/v3/zz_generated_node_pool_status.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package client
|
||||
|
||||
const (
|
||||
NodePoolStatusType = "nodePoolStatus"
|
||||
NodePoolStatusFieldConditions = "conditions"
|
||||
)
|
||||
|
||||
type NodePoolStatus struct {
|
||||
Conditions []Condition `json:"conditions,omitempty"`
|
||||
}
|
@@ -9,7 +9,7 @@ const (
|
||||
NodeSpecFieldDisplayName = "displayName"
|
||||
NodeSpecFieldEtcd = "etcd"
|
||||
NodeSpecFieldImported = "imported"
|
||||
NodeSpecFieldNodePoolUUID = "nodePoolUuid"
|
||||
NodeSpecFieldNodePoolName = "nodePoolUuid"
|
||||
NodeSpecFieldNodeTemplateId = "nodeTemplateId"
|
||||
NodeSpecFieldPodCidr = "podCidr"
|
||||
NodeSpecFieldProviderId = "providerId"
|
||||
@@ -27,7 +27,7 @@ type NodeSpec struct {
|
||||
DisplayName string `json:"displayName,omitempty"`
|
||||
Etcd bool `json:"etcd,omitempty"`
|
||||
Imported bool `json:"imported,omitempty"`
|
||||
NodePoolUUID string `json:"nodePoolUuid,omitempty"`
|
||||
NodePoolName string `json:"nodePoolUuid,omitempty"`
|
||||
NodeTemplateId string `json:"nodeTemplateId,omitempty"`
|
||||
PodCidr string `json:"podCidr,omitempty"`
|
||||
ProviderId string `json:"providerId,omitempty"`
|
||||
|
Reference in New Issue
Block a user