1
0
mirror of https://github.com/rancher/types.git synced 2025-08-31 04:40:56 +00:00

Update generated code

This commit is contained in:
Darren Shepherd 2018-01-16 12:57:30 -07:00
parent 45eab736a4
commit 11e8202616
3 changed files with 26 additions and 0 deletions

View File

@ -65,6 +65,10 @@ type MachineDriverOperations interface {
Update(existing *MachineDriver, updates interface{}) (*MachineDriver, error)
ByID(id string) (*MachineDriver, error)
Delete(container *MachineDriver) error
ActionActivate(*MachineDriver) (*MachineDriver, error)
ActionDeactivate(*MachineDriver) (*MachineDriver, error)
}
func newMachineDriverClient(apiClient *Client) *MachineDriverClient {
@ -111,3 +115,21 @@ func (c *MachineDriverClient) ByID(id string) (*MachineDriver, error) {
func (c *MachineDriverClient) Delete(container *MachineDriver) error {
return c.apiClient.Ops.DoResourceDelete(MachineDriverType, &container.Resource)
}
func (c *MachineDriverClient) ActionActivate(resource *MachineDriver) (*MachineDriver, error) {
resp := &MachineDriver{}
err := c.apiClient.Ops.DoAction(MachineDriverType, "activate", &resource.Resource, nil, resp)
return resp, err
}
func (c *MachineDriverClient) ActionDeactivate(resource *MachineDriver) (*MachineDriver, error) {
resp := &MachineDriver{}
err := c.apiClient.Ops.DoAction(MachineDriverType, "deactivate", &resource.Resource, nil, resp)
return resp, err
}

View File

@ -4,6 +4,7 @@ const (
MachineDriverConditionType = "machineDriverCondition"
MachineDriverConditionFieldLastTransitionTime = "lastTransitionTime"
MachineDriverConditionFieldLastUpdateTime = "lastUpdateTime"
MachineDriverConditionFieldMessage = "message"
MachineDriverConditionFieldReason = "reason"
MachineDriverConditionFieldStatus = "status"
MachineDriverConditionFieldType = "type"
@ -12,6 +13,7 @@ const (
type MachineDriverCondition 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"`

View File

@ -6,6 +6,7 @@ const (
MachineDriverSpecFieldBuiltin = "builtin"
MachineDriverSpecFieldChecksum = "checksum"
MachineDriverSpecFieldDescription = "description"
MachineDriverSpecFieldDisplayName = "displayName"
MachineDriverSpecFieldExternalID = "externalId"
MachineDriverSpecFieldUIURL = "uiUrl"
MachineDriverSpecFieldURL = "url"
@ -16,6 +17,7 @@ type MachineDriverSpec struct {
Builtin *bool `json:"builtin,omitempty"`
Checksum string `json:"checksum,omitempty"`
Description string `json:"description,omitempty"`
DisplayName string `json:"displayName,omitempty"`
ExternalID string `json:"externalId,omitempty"`
UIURL string `json:"uiUrl,omitempty"`
URL string `json:"url,omitempty"`