diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 00000000..9758b7ad
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/norman.iml b/.idea/norman.iml
new file mode 100644
index 00000000..c956989b
--- /dev/null
+++ b/.idea/norman.iml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 00000000..94a25f7f
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 00000000..89f58703
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,818 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ DEFINITION_ORDER
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Abstraction issuesJava
+
+
+ Assignment issuesJava
+
+
+ Bitwise operation issuesJava
+
+
+ Class metricsJava
+
+
+ Class structureJava
+
+
+ Cloning issuesJava
+
+
+ Code maturity issuesJava
+
+
+ Code style issuesJava
+
+
+ Compiler issuesJava
+
+
+ Concurrency annotation issuesJava
+
+
+ Control flow issuesJava
+
+
+ Data flow issuesJava
+
+
+ Declaration redundancyJava
+
+
+ Dependency issuesJava
+
+
+ Encapsulation issuesJava
+
+
+ Error handlingJava
+
+
+ Finalization issuesJava
+
+
+ GPath inspectionsGroovy
+
+
+ General
+
+
+ GeneralJava
+
+
+ Groovy
+
+
+ ImportsJava
+
+
+ Inheritance issuesJava
+
+
+ Initialization issuesJava
+
+
+ Internationalization issuesJava
+
+
+ J2ME issuesJava
+
+
+ JUnit issuesJava
+
+
+ Java
+
+
+ Java 5Java language level migration aidsJava
+
+
+ Java 7Java language level migration aidsJava
+
+
+ Java 8Java language level migration aidsJava
+
+
+ Java language level issuesJava
+
+
+ Java language level migration aidsJava
+
+
+ JavaBeans issuesJava
+
+
+ JavaFX
+
+
+ Javadoc issuesJava
+
+
+ Kotlin
+
+
+ Language Injection
+
+
+ Logging issuesJava
+
+
+ Manifest
+
+
+ Memory issuesJava
+
+
+ Method metricsJava
+
+
+ Modularization issuesJava
+
+
+ Naming ConventionsGroovy
+
+
+ Naming conventionsJava
+
+
+ Numeric issuesJava
+
+
+ Packaging issuesJava
+
+
+ Performance issuesJava
+
+
+ Portability issuesJava
+
+
+ Potentially confusing code constructsGroovy
+
+
+ Probable bugsGroovy
+
+
+ Probable bugsJava
+
+
+ Properties Files
+
+
+ Properties FilesJava
+
+
+ Resource management issuesJava
+
+
+ Security issuesJava
+
+
+ Serialization issuesJava
+
+
+ StyleGroovy
+
+
+ Threading issuesGroovy
+
+
+ Threading issuesJava
+
+
+ Verbose or redundant code constructsJava
+
+
+ Visibility issuesJava
+
+
+ toString() issuesJava
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/handler/browser.go b/handler/browser.go
new file mode 100644
index 00000000..8e9bb2ab
--- /dev/null
+++ b/handler/browser.go
@@ -0,0 +1,18 @@
+package handler
+
+import (
+ "net/http"
+ "strings"
+)
+
+func IsBrowser(req *http.Request, checkAccepts bool) bool {
+ accepts := strings.ToLower(req.Header.Get("Accept"))
+ userAgent := strings.ToLower(req.Header.Get("User-Agent"))
+
+ if accepts == "" || !checkAccepts {
+ accepts = "*/*"
+ }
+
+ // User agent has Mozilla and browser accepts */*
+ return strings.Contains(userAgent, "mozilla") && strings.Contains(accepts,"*/*")
+}
diff --git a/handler/csrf.go b/handler/csrf.go
new file mode 100644
index 00000000..f2b9d1be
--- /dev/null
+++ b/handler/csrf.go
@@ -0,0 +1,53 @@
+package handler
+
+import (
+ "crypto/rand"
+ "encoding/hex"
+ "net/http"
+
+ "github.com/rancher/norman/httperror"
+)
+
+const (
+ csrfCookie = "CSRF"
+ csrfHeader = "X-API-CSRF"
+)
+
+func CheckCSRF(rw http.ResponseWriter, req *http.Request) error {
+ if !IsBrowser(req, false) {
+ return nil
+ }
+
+ cookie, err := req.Cookie(csrfCookie)
+ if err != nil {
+ return httperror.NewAPIError(httperror.INVALID_CSRF_TOKEN, "Failed to parse cookies")
+ }
+
+ if cookie == nil {
+ bytes := make([]byte, 5)
+ _, err := rand.Read(bytes)
+ if err != nil {
+ return httperror.WrapAPIError(err, httperror.SERVER_ERROR, "Failed in CSRF processing")
+ }
+
+ cookie = &http.Cookie{
+ Name: csrfCookie,
+ Value: hex.EncodeToString(bytes),
+ }
+ } else if req.Method != http.MethodGet {
+ /*
+ * Very important to use request.getMethod() and not httpRequest.getMethod(). The client can override the HTTP method with _method
+ */
+ if cookie.Value == req.Header.Get(csrfHeader) {
+ // Good
+ } else if cookie.Value == req.URL.Query().Get(csrfCookie) {
+ // Good
+ } else {
+ return httperror.NewAPIError(httperror.INVALID_CSRF_TOKEN, "Invalid CSRF token")
+ }
+ }
+
+ cookie.Path = "/"
+ http.SetCookie(rw, cookie)
+ return nil
+}
diff --git a/handler/parse_collection.go b/handler/parse_collection.go
new file mode 100644
index 00000000..7dbe69eb
--- /dev/null
+++ b/handler/parse_collection.go
@@ -0,0 +1,130 @@
+package handler
+
+import (
+ "net/http"
+
+ "strconv"
+
+ "strings"
+
+ "github.com/rancher/go-rancher/v3"
+ "github.com/rancher/norman/query"
+)
+
+var (
+ ASC = SortOrder("asc")
+ DESC = SortOrder("desc")
+ defaultLimit = 100
+ maxLimit = 3000
+)
+
+type SortOrder string
+
+type Pagination struct {
+ Limit int
+ Marker string
+}
+
+type CollectionAttributes struct {
+ Sort string
+ Order SortOrder
+ Pagination *Pagination
+ Conditions []*query.Condition
+}
+
+func ParseCollectionAttributes(req *http.Request, schema client.Schema) *CollectionAttributes {
+ if req.Method != http.MethodGet {
+ return nil
+ }
+
+ result := &CollectionAttributes{}
+
+ result.Order = parseOrder(req)
+ result.Sort = parseSort(schema, req)
+ result.Pagination = parsePagination(req)
+ result.Conditions = parseFilters(schema, req)
+
+ return result
+}
+
+func parseOrder(req *http.Request) SortOrder {
+ order := req.URL.Query().Get("order")
+ if SortOrder(order) == DESC {
+ return DESC
+ }
+ return ASC
+}
+
+func parseSort(schema client.Schema, req *http.Request) string {
+ sort := req.URL.Query().Get("sort")
+ if _, ok := schema.CollectionFilters[sort]; ok {
+ return sort
+ }
+ return ""
+}
+
+func parsePagination(req *http.Request) *Pagination {
+ q := req.URL.Query()
+ limit := q.Get("limit")
+ marker := q.Get("marker")
+
+ result := &Pagination{
+ Limit: defaultLimit,
+ Marker: marker,
+ }
+
+ if limit != "" {
+ limitInt, err := strconv.Atoi(limit)
+ if err != nil {
+ return result
+ }
+
+ if limitInt > maxLimit {
+ result.Limit = maxLimit
+ } else if limitInt > 0 {
+ result.Limit = limitInt
+ }
+ }
+
+ return result
+}
+
+func parseNameAndOp(value string) (string, string) {
+ name := value
+ op := "eq"
+
+ idx := strings.LastIndex(value, "_")
+ if idx > 0 {
+ op = value[idx+1:]
+ name = value[0:idx]
+ }
+
+ return name, op
+}
+
+func parseFilters(schema client.Schema, req *http.Request) []*query.Condition {
+ conditions := []*query.Condition{}
+ q := req.URL.Query()
+ for key, values := range req.URL.Query() {
+ name, op := parseNameAndOp(key)
+ filter, ok := schema.CollectionFilters[name]
+ if !ok {
+ continue
+ }
+
+ for _, mod := range filter.Modifiers {
+ if op != mod || !query.ValidMod(op) {
+ continue
+ }
+
+ genericValues := []interface{}{}
+ for _, value := range values {
+ genericValues = append(genericValues, value)
+ }
+
+ conditions = append(conditions, query.NewCondition(query.ConditionType(mod), genericValues))
+ }
+ }
+
+ return conditions
+}
diff --git a/handler/read_input.go b/handler/read_input.go
new file mode 100644
index 00000000..379abe3c
--- /dev/null
+++ b/handler/read_input.go
@@ -0,0 +1,37 @@
+package handler
+
+import (
+ "net/http"
+ "io/ioutil"
+ "io"
+ "github.com/rancher/norman/httperror"
+ "fmt"
+ "encoding/json"
+)
+
+const reqMaxSize = (2 * 1<<20) + 1
+
+var bodyMethods = map[string]bool{
+ http.MethodPut: true,
+ http.MethodPost: true,
+}
+
+func ReadBody(rw http.ResponseWriter, req *http.Request) (map[string]interface{}, error) {
+ if !bodyMethods[req.Method] {
+ return nil, nil
+ }
+
+ content, err := ioutil.ReadAll(io.LimitReader(req.Body, reqMaxSize))
+ if err != nil {
+ return nil, httperror.NewAPIError(httperror.INVALID_BODY_CONTENT,
+ fmt.Sprintf("Body content longer than %d bytes", reqMaxSize-1))
+ }
+
+ data := map[string]interface{}{}
+ if err := json.Unmarshal(content, data); err != nil {
+ return nil, httperror.NewAPIError(httperror.INVALID_BODY_CONTENT,
+ fmt.Sprintf("Failed to parse body: %v", err))
+ }
+
+ return data, nil
+}
diff --git a/handler/validation.go b/handler/validation.go
new file mode 100644
index 00000000..dbd1152d
--- /dev/null
+++ b/handler/validation.go
@@ -0,0 +1,320 @@
+package handler
+
+import (
+ "fmt"
+ "strconv"
+ "strings"
+
+ "github.com/rancher/go-rancher/v3"
+ "github.com/rancher/norman/httperror"
+ "github.com/rancher/norman/registry"
+ "github.com/rancher/norman/store"
+)
+
+var (
+ Create = Operation("create")
+ Update = Operation("update")
+ Action = Operation("action")
+)
+
+type Operation string
+
+type Builder struct {
+ Registry registry.SchemaRegistry
+ RefValidator store.ReferenceValidator
+}
+
+func (b *Builder) Construct(schema *client.Schema, input map[string]interface{}, op Operation) (map[string]interface{}, error) {
+ return b.copyFields(schema, input, op)
+}
+
+func (b *Builder) copyInputs(schema *client.Schema, input map[string]interface{}, op Operation, result map[string]interface{}) error {
+ for fieldName, value := range input {
+ field, ok := schema.ResourceFields[fieldName]
+ if !ok {
+ continue
+ }
+
+ if !fieldMatchesOp(field, op) {
+ continue
+ }
+
+ wasNull := value == nil && (field.Nullable || field.Default == nil)
+ value, err := b.convert(field.Type, value, op)
+ if err != nil {
+ return httperror.WrapFieldAPIError(err, httperror.INVALID_FORMAT, fieldName, err.Error())
+ }
+
+ if value != nil || wasNull {
+ if slice, ok := value.([]interface{}); ok {
+ for _, sliceValue := range slice {
+ if sliceValue == nil {
+ return httperror.NewFieldAPIError(httperror.NOT_NULLABLE, fieldName, "Individual array values can not be null")
+ }
+ if err := checkFieldCriteria(fieldName, field, sliceValue); err != nil {
+ return err
+ }
+ }
+ } else {
+ if err := checkFieldCriteria(fieldName, field, value); err != nil {
+ return err
+ }
+ }
+ result[fieldName] = value
+ }
+ }
+
+ return nil
+}
+
+func (b *Builder) checkDefaultAndRequired(schema *client.Schema, input map[string]interface{}, op Operation, result map[string]interface{}) error {
+ for fieldName, field := range schema.ResourceFields {
+ _, hasKey := result[fieldName]
+ if op == Create && !hasKey && field.Default != nil {
+ result[fieldName] = field.Default
+ }
+
+ _, hasKey = result[fieldName]
+ if op == Create && fieldMatchesOp(field, Create) && field.Required {
+ if !hasKey {
+ return httperror.NewFieldAPIError(httperror.MISSING_REQUIRED, fieldName, "")
+ }
+
+ if isArrayType(field.Type) {
+ slice, err := b.convertArray(fieldName, result[fieldName], op)
+ if err != nil {
+ return err
+ }
+ if len(slice) == 0 {
+ return httperror.NewFieldAPIError(httperror.MISSING_REQUIRED, fieldName, "")
+ }
+ }
+ }
+ }
+
+ return nil
+}
+
+func (b *Builder) copyFields(schema *client.Schema, input map[string]interface{}, op Operation) (map[string]interface{}, error) {
+ result := map[string]interface{}{}
+
+ if err := b.copyInputs(schema, input, op, result); err != nil {
+ return nil, err
+ }
+
+ return result, b.checkDefaultAndRequired(schema, input, op, result)
+}
+
+func checkFieldCriteria(fieldName string, field client.Field, value interface{}) error {
+ numVal, isNum := value.(int64)
+ strVal := ""
+ hasStrVal := false
+
+ if value == nil && field.Default != nil {
+ value = field.Default
+ }
+
+ if value != nil {
+ hasStrVal = true
+ strVal = fmt.Sprint(value)
+ }
+
+ if value == nil && !field.Nullable {
+ return httperror.NewFieldAPIError(httperror.NOT_NULLABLE, fieldName, "")
+ }
+
+ if isNum {
+ if field.Min != nil && numVal < *field.Min {
+ return httperror.NewFieldAPIError(httperror.MIN_LIMIT_EXCEEDED, fieldName, "")
+ }
+ if field.Max != nil && numVal > *field.Max {
+ return httperror.NewFieldAPIError(httperror.MAX_LIMIT_EXCEEDED, fieldName, "")
+ }
+ }
+
+ if hasStrVal {
+ if field.MinLength != nil && len(strVal) < *field.MinLength {
+ return httperror.NewFieldAPIError(httperror.MIN_LENGTH_EXCEEDED, fieldName, "")
+ }
+ if field.MaxLength != nil && len(strVal) > *field.MaxLength {
+ return httperror.NewFieldAPIError(httperror.MAX_LENGTH_EXCEEDED, fieldName, "")
+ }
+ }
+
+ if len(field.Options) > 0 {
+ if hasStrVal || !field.Nullable {
+ found := false
+ for _, option := range field.Options {
+ if strVal == option {
+ found = true
+ break
+ }
+ }
+
+ if !found {
+ httperror.NewFieldAPIError(httperror.INVALID_OPTION, fieldName, "")
+ }
+ }
+ }
+
+ if len(field.ValidChars) > 0 && hasStrVal {
+ for _, c := range strVal {
+ if !strings.ContainsRune(field.ValidChars, c) {
+ httperror.NewFieldAPIError(httperror.INVALID_CHARACTERS, fieldName, "")
+ }
+
+ }
+ }
+
+ if len(field.InvalidChars) > 0 && hasStrVal {
+ if strings.ContainsAny(strVal, field.InvalidChars) {
+ httperror.NewFieldAPIError(httperror.INVALID_CHARACTERS, fieldName, "")
+ }
+ }
+
+ return nil
+}
+
+func (b *Builder) convert(fieldType string, value interface{}, op Operation) (interface{}, error) {
+ if value == nil {
+ return value, nil
+ }
+
+ switch {
+ case isMapType(fieldType):
+ return b.convertMap(fieldType, value, op), nil
+ case isArrayType(fieldType):
+ return b.convertArray(fieldType, value, op), nil
+ case isReferenceType(fieldType):
+ return b.convertReferenceType(fieldType, value)
+ }
+
+ switch fieldType {
+ case "json":
+ return value, nil
+ case "date":
+ return convertString(value), nil
+ case "boolean":
+ return convertBool(value), nil
+ case "enum":
+ return convertString(value), nil
+ case "int":
+ return convertNumber(value)
+ case "password":
+ return convertString(value), nil
+ case "string":
+ return convertString(value), nil
+ case "reference":
+ return convertString(value), nil
+ }
+
+ return b.convertType(fieldType, value, op)
+}
+
+func (b *Builder) convertType(fieldType string, value interface{}, op Operation) (interface{}, error) {
+ schema := b.Registry.GetSchema(fieldType)
+ if schema == nil {
+ return nil, httperror.NewAPIError(httperror.INVALID_TYPE, "Failed to find type "+fieldType)
+ }
+
+ mapValue, ok := value.(map[string]interface{})
+ if !ok {
+ return nil, httperror.NewAPIError(httperror.INVALID_FORMAT, fmt.Sprintf("Value can not be converted to type %s: %v", fieldType, value))
+ }
+
+ return b.Construct(schema, mapValue, op)
+}
+
+func convertNumber(value interface{}) (int64, error) {
+ i, ok := value.(int64)
+ if ok {
+ return i, nil
+ }
+ return strconv.ParseInt(convertString(value), 10, 64)
+}
+
+func convertBool(value interface{}) bool {
+ b, ok := value.(bool)
+ if ok {
+ return b
+ }
+
+ str := strings.ToLower(convertString(value))
+ return str == "true" || str == "t" || str == "yes" || str == "y"
+}
+
+func convertString(value interface{}) string {
+ return fmt.Sprint(value)
+}
+
+func (b *Builder) convertReferenceType(fieldType string, value interface{}) (string, error) {
+ subType := fieldType[len("array[") : len(fieldType)-1]
+ strVal := convertString(value)
+ if !b.RefValidator.Validate(subType, strVal) {
+ return "", httperror.NewAPIError(httperror.INVALID_REFERENCE, fmt.Sprintf("Not found type: %s id: %s", subType, strVal))
+ }
+ return strVal, nil
+}
+
+func (b *Builder) convertArray(fieldType string, value interface{}, op Operation) ([]interface{}, error) {
+ sliceValue, ok := value.([]interface{})
+ if !ok {
+ return nil, nil
+ }
+
+ result := []interface{}{}
+ subType := fieldType[len("array[") : len(fieldType)-1]
+
+ for _, value := range sliceValue {
+ val, err := b.convert(subType, value, op)
+ if err != nil {
+ return nil, err
+ }
+ result = append(result, val)
+ }
+
+ return result, nil
+}
+
+func (b *Builder) convertMap(fieldType string, value interface{}, op Operation) (map[string]interface{}, error) {
+ mapValue, ok := value.(map[string]interface{})
+ if !ok {
+ return nil, nil
+ }
+
+ result := map[string]interface{}{}
+ subType := fieldType[len("map[") : len(fieldType)-1]
+
+ for key, value := range mapValue {
+ val, err := b.convert(subType, value, op)
+ if err != nil {
+ return nil, httperror.WrapAPIError(err, httperror.INVALID_FORMAT, err.Error())
+ }
+ result[key] = val
+ }
+
+ return result, nil
+}
+
+func isMapType(fieldType string) bool {
+ return strings.HasPrefix(fieldType, "map[") && strings.HasSuffix(fieldType, "]")
+}
+
+func isArrayType(fieldType string) bool {
+ return strings.HasPrefix(fieldType, "array[") && strings.HasSuffix(fieldType, "]")
+}
+
+func isReferenceType(fieldType string) bool {
+ return strings.HasPrefix(fieldType, "reference[") && strings.HasSuffix(fieldType, "]")
+}
+
+func fieldMatchesOp(field client.Field, op Operation) bool {
+ switch op {
+ case Create:
+ return field.Create
+ case Update:
+ return field.Update
+ default:
+ return false
+ }
+}
diff --git a/httperror/error.go b/httperror/error.go
new file mode 100644
index 00000000..fc260180
--- /dev/null
+++ b/httperror/error.go
@@ -0,0 +1,72 @@
+package httperror
+
+import (
+ "fmt"
+)
+
+var (
+ INVALID_DATE_FORMAT = ErrorCode("InvalidDateFormat")
+ INVALID_FORMAT = ErrorCode("InvalidFormat")
+ INVALID_REFERENCE = ErrorCode("InvalidReference")
+ NOT_NULLABLE = ErrorCode("NotNullable")
+ NOT_UNIQUE = ErrorCode("NotUnique")
+ MIN_LIMIT_EXCEEDED = ErrorCode("MinLimitExceeded")
+ MAX_LIMIT_EXCEEDED = ErrorCode("MaxLimitExceeded")
+ MIN_LENGTH_EXCEEDED = ErrorCode("MinLengthExceeded")
+ MAX_LENGTH_EXCEEDED = ErrorCode("MaxLengthExceeded")
+ INVALID_OPTION = ErrorCode("InvalidOption")
+ INVALID_CHARACTERS = ErrorCode("InvalidCharacters")
+ MISSING_REQUIRED = ErrorCode("MissingRequired")
+ INVALID_CSRF_TOKEN = ErrorCode("InvalidCSRFToken")
+ INVALID_ACTION = ErrorCode("InvalidAction")
+ INVALID_BODY_CONTENT = ErrorCode("InvalidBodyContent")
+ INVALID_TYPE = ErrorCode("InvalidType")
+ ACTION_NOT_AVAILABLE = ErrorCode("ActionNotAvailable")
+ INVALID_STATE = ErrorCode("InvalidState")
+ SERVER_ERROR = ErrorCode("ServerError")
+)
+
+type ErrorCode string
+
+type APIError struct {
+ code ErrorCode
+ message string
+ Cause error
+ fieldName string
+}
+
+func NewAPIError(code ErrorCode, message string) error {
+ return &APIError{
+ code: code,
+ message: message,
+ }
+}
+
+func NewFieldAPIError(code ErrorCode, fieldName, message string) error {
+ return &APIError{
+ code: code,
+ message: message,
+ fieldName: fieldName,
+ }
+}
+
+func WrapFieldAPIError(err error, code ErrorCode, fieldName, message string) error {
+ return &APIError{
+ Cause: err,
+ code: code,
+ message: message,
+ fieldName: fieldName,
+ }
+}
+
+func WrapAPIError(err error, code ErrorCode, message string) error {
+ return &APIError{
+ code: code,
+ message: message,
+ Cause: err,
+ }
+}
+
+func (a *APIError) Error() string {
+ return fmt.Sprintf("%s: %s", a.code, a.message)
+}
diff --git a/query/condition.go b/query/condition.go
new file mode 100644
index 00000000..fa4ac6b0
--- /dev/null
+++ b/query/condition.go
@@ -0,0 +1,82 @@
+package query
+
+var (
+ COND_EQ = ConditionType("eq")
+ COND_NE = ConditionType("ne")
+ COND_NULL = ConditionType("null")
+ COND_NOTNULL = ConditionType("notnull")
+ COND_IN = ConditionType("in")
+ COND_NOTIN = ConditionType("notin")
+ COND_OR = ConditionType("or")
+ COND_AND = ConditionType("AND")
+
+ mods = map[ConditionType]bool{
+ COND_EQ: true,
+ COND_NE: true,
+ COND_NULL: true,
+ COND_NOTNULL: true,
+ COND_IN: true,
+ COND_NOTIN: true,
+ COND_OR: true,
+ COND_AND: true,
+ }
+)
+
+type ConditionType string
+
+type Condition struct {
+ values []interface{}
+ conditionType ConditionType
+ left, right *Condition
+}
+
+func ValidMod(mod string) bool {
+ return mods[ConditionType(mod)]
+}
+
+func NewCondition(conditionType ConditionType, values ...interface{}) *Condition {
+ return &Condition{
+ values: values,
+ conditionType: conditionType,
+ }
+}
+
+func NE(value interface{}) *Condition {
+ return NewCondition(COND_NE, value)
+}
+
+func EQ(value interface{}) *Condition {
+ return NewCondition(COND_EQ, value)
+}
+
+func NULL(value interface{}) *Condition {
+ return NewCondition(COND_NULL)
+}
+
+func NOTNULL(value interface{}) *Condition {
+ return NewCondition(COND_NOTNULL)
+}
+
+func IN(values ...interface{}) *Condition {
+ return NewCondition(COND_IN, values...)
+}
+
+func NOTIN(values ...interface{}) *Condition {
+ return NewCondition(COND_NOTIN, values...)
+}
+
+func (c *Condition) AND(right *Condition) *Condition {
+ return &Condition{
+ conditionType: COND_AND,
+ left: c,
+ right: right,
+ }
+}
+
+func (c *Condition) OR(right *Condition) *Condition {
+ return &Condition{
+ conditionType: COND_OR,
+ left: c,
+ right: right,
+ }
+}
diff --git a/registry/registry.go b/registry/registry.go
new file mode 100644
index 00000000..1ed21fe0
--- /dev/null
+++ b/registry/registry.go
@@ -0,0 +1,7 @@
+package registry
+
+import "github.com/rancher/go-rancher/v3"
+
+type SchemaRegistry interface {
+ GetSchema(name string) *client.Schema
+}
diff --git a/store/reference.go b/store/reference.go
new file mode 100644
index 00000000..12937f18
--- /dev/null
+++ b/store/reference.go
@@ -0,0 +1,7 @@
+package store
+
+type ReferenceValidator interface {
+
+ Validate(resourceType, resourceID string) bool
+
+}
\ No newline at end of file
diff --git a/vendor/github.com/rancher/go-rancher/.dockerignore b/vendor/github.com/rancher/go-rancher/.dockerignore
new file mode 100644
index 00000000..6e43c2a9
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/.dockerignore
@@ -0,0 +1,4 @@
+./bin
+./.dapper
+./dist
+./.trash-cache
diff --git a/vendor/github.com/rancher/go-rancher/.drone.yml b/vendor/github.com/rancher/go-rancher/.drone.yml
new file mode 100644
index 00000000..2d592c3e
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/.drone.yml
@@ -0,0 +1,7 @@
+pipeline:
+ build:
+ image: rancher/dapper:1.10.3
+ volumes:
+ - /var/run/docker.sock:/var/run/docker.sock
+ commands:
+ - dapper ci
diff --git a/vendor/github.com/rancher/go-rancher/.gitignore b/vendor/github.com/rancher/go-rancher/.gitignore
new file mode 100644
index 00000000..81d1b990
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/.gitignore
@@ -0,0 +1,5 @@
+/.dapper
+/bin
+/dist
+*.swp
+/.trash-cache
diff --git a/vendor/github.com/rancher/go-rancher/Dockerfile.dapper b/vendor/github.com/rancher/go-rancher/Dockerfile.dapper
new file mode 100644
index 00000000..d5bfad7a
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/Dockerfile.dapper
@@ -0,0 +1,30 @@
+FROM ubuntu:16.04
+# FROM arm=armhf/ubuntu:16.04
+
+ARG DAPPER_HOST_ARCH=amd64
+ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
+
+RUN apt-get update && \
+ apt-get install -y gcc ca-certificates git wget curl vim less file && \
+ rm -f /bin/sh && ln -s /bin/bash /bin/sh
+
+ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
+ GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash
+
+ENV DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 \
+ DOCKER_URL_arm=https://github.com/rancher/docker/releases/download/v1.10.3-ros1/docker-1.10.3_arm \
+ DOCKER_URL=DOCKER_URL_${ARCH}
+RUN wget -O - ${!DOCKER_URL} > /usr/bin/docker && chmod +x /usr/bin/docker
+
+RUN wget -O - https://storage.googleapis.com/golang/go1.7.1.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \
+ go get github.com/rancher/trash && go get github.com/golang/lint/golint
+
+ENV DAPPER_SOURCE /go/src/github.com/rancher/go-rancher/
+ENV DAPPER_OUTPUT ./bin
+ENV DAPPER_DOCKER_SOCKET true
+ENV TRASH_CACHE ${DAPPER_SOURCE}/.trash-cache
+ENV HOME ${DAPPER_SOURCE}
+WORKDIR ${DAPPER_SOURCE}
+
+ENTRYPOINT ["./scripts/entry"]
+CMD ["ci"]
diff --git a/vendor/github.com/rancher/go-rancher/LICENSE b/vendor/github.com/rancher/go-rancher/LICENSE
new file mode 100644
index 00000000..f433b1a5
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/LICENSE
@@ -0,0 +1,177 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
diff --git a/vendor/github.com/rancher/go-rancher/Makefile b/vendor/github.com/rancher/go-rancher/Makefile
new file mode 100644
index 00000000..d7d72a16
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/Makefile
@@ -0,0 +1,23 @@
+TARGETS := $(shell ls scripts)
+
+.dapper:
+ @echo Downloading dapper
+ @curl -sL https://releases.rancher.com/dapper/latest/dapper-`uname -s`-`uname -m` > .dapper.tmp
+ @@chmod +x .dapper.tmp
+ @./.dapper.tmp -v
+ @mv .dapper.tmp .dapper
+
+$(TARGETS): .dapper
+ ./.dapper $@
+
+trash: .dapper
+ ./.dapper -m bind trash
+
+trash-keep: .dapper
+ ./.dapper -m bind trash -k
+
+deps: trash
+
+.DEFAULT_GOAL := ci
+
+.PHONY: $(TARGETS)
diff --git a/vendor/github.com/rancher/go-rancher/README.md b/vendor/github.com/rancher/go-rancher/README.md
new file mode 100644
index 00000000..58e479a9
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/README.md
@@ -0,0 +1,55 @@
+# Go Bindings for Rancher API
+
+# Generating Code
+First, you must have a master version of Rancher running. The best way to do this is:
+```sh
+docker run -p 8080:8080 -d rancher/server:master
+```
+
+Once Rancher is running, you can run the gen-schema.sh script:
+```sh
+./scripts/gen-schema.sh http://:8080
+
+# The default url is http://localhost:8080, so if rancher/server is listening on localhost, you can omit the url:
+./scripts/gen-schema.sh
+```
+
+This will add, remove, and modify go files appropriately. Submit a PR that includes *all* these changes.
+
+## Important caveats
+1. If you are running on macOS, you must have gnu-sed installed as sed for this to work properly.
+2. If you are running against cattle that is running out of an IDE and you don't have go-machine-service running (you probably don't), you'll see a number of unexpected removed or modified files like `generated_host.go` `generated_machine.go` and `generated_*config.go`.
+
+# Building
+
+```sh
+godep go build ./client
+```
+
+# Tests
+
+```sh
+godep go test ./client
+```
+# Contact
+For bugs, questions, comments, corrections, suggestions, etc., open an issue in
+ [rancher/rancher](//github.com/rancher/rancher/issues) with a title starting with `[go-rancher] `.
+
+Or just [click here](//github.com/rancher/rancher/issues/new?title=%5Bgo-rancher%5D%20) to create a new issue.
+
+
+# License
+Copyright (c) 2014-2015 [Rancher Labs, Inc.](http://rancher.com)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
diff --git a/vendor/github.com/rancher/go-rancher/api/api.go b/vendor/github.com/rancher/go-rancher/api/api.go
new file mode 100644
index 00000000..267aee1a
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/api/api.go
@@ -0,0 +1,161 @@
+package api
+
+import (
+ "encoding/json"
+ "errors"
+ "reflect"
+
+ "github.com/rancher/go-rancher/client"
+ v2client "github.com/rancher/go-rancher/v2"
+)
+
+func toMap(obj interface{}) (map[string]interface{}, error) {
+ result := map[string]interface{}{}
+ bytes, err := json.Marshal(obj)
+ if err != nil {
+ return result, err
+ }
+
+ err = json.Unmarshal(bytes, &result)
+ return result, err
+}
+
+func getEmbedded(obj interface{}, checkType reflect.Type) interface{} {
+ val := reflect.ValueOf(obj)
+ for val.Kind() == reflect.Ptr || val.Kind() == reflect.Interface {
+ val = val.Elem()
+ }
+
+ if val.Kind() != reflect.Struct {
+ panic("Passed type is not a struct got: " + val.Kind().String())
+ }
+
+ t := val.Type()
+ for i := 0; i < val.NumField(); i++ {
+ if t.Field(i).Anonymous && t.Field(i).Type == checkType {
+ if !val.Field(i).CanAddr() {
+ panic("Field " + t.Field(i).Name + " is not addressable, pass pointer")
+ }
+ return val.Field(i).Addr().Interface()
+ }
+ }
+
+ return nil
+}
+
+func getCollection(obj interface{}) interface{} {
+ val := getEmbedded(obj, reflect.TypeOf(client.Collection{}))
+ if val == nil {
+ val = getEmbedded(obj, reflect.TypeOf(v2client.Collection{}))
+ if val == nil {
+ return nil
+ }
+ }
+ return val
+}
+
+func getResource(obj interface{}) (*client.Resource, *v2client.Resource) {
+ r, ok := obj.(*client.Resource)
+ if ok {
+ return r, nil
+ }
+ rObj, ok := obj.(client.Resource)
+ if ok {
+ return &rObj, nil
+ }
+ v2r, ok := obj.(*v2client.Resource)
+ if ok {
+ return nil, v2r
+ }
+ v2rObj, ok := obj.(v2client.Resource)
+ if ok {
+ return nil, &v2rObj
+ }
+ val := getEmbedded(obj, reflect.TypeOf(client.Resource{}))
+ if val == nil {
+ val = getEmbedded(obj, reflect.TypeOf(v2client.Resource{}))
+ if val == nil {
+ return nil, nil
+ }
+ }
+ v1Resource, ok := val.(*client.Resource)
+ if ok {
+ return v1Resource, nil
+ }
+ return nil, val.(*v2client.Resource)
+}
+
+func CollectionToMap(obj interface{}, schemas *client.Schemas) (map[string]interface{}, []map[string]interface{}, error) {
+ result := map[string]interface{}{}
+ data := []map[string]interface{}{}
+ if obj == nil {
+ return result, data, nil
+ }
+
+ c := getCollection(obj)
+ if c == nil {
+ return result, data, errors.New("value is not a Collection")
+ }
+
+ val := reflect.ValueOf(obj)
+ if val.Kind() == reflect.Ptr {
+ val = val.Elem()
+ }
+
+ val = val.FieldByName("Data")
+ for i := 0; i < val.Len(); i++ {
+ obj := val.Index(i)
+ if obj.Kind() != reflect.Ptr && obj.Kind() != reflect.Interface {
+ obj = obj.Addr()
+ }
+ dataObj, err := ResourceToMap(obj.Interface(), schemas)
+ if err != nil {
+ return result, data, err
+ }
+
+ data = append(data, dataObj)
+ }
+
+ collectionMap, err := toMap(obj)
+ if err != nil {
+ return result, data, err
+ }
+
+ collectionMap["data"] = data
+ return collectionMap, data, nil
+}
+
+func ResourceToMap(obj interface{}, schemas *client.Schemas) (map[string]interface{}, error) {
+ var resourceType string
+ result := map[string]interface{}{}
+ if obj == nil {
+ return result, nil
+ }
+
+ v1resource, v2resource := getResource(obj)
+ if v1resource == nil && v2resource == nil {
+ return result, errors.New("value is not a Resource")
+ }
+
+ if v1resource != nil {
+ resourceType = v1resource.Type
+ } else {
+ resourceType = v2resource.Type
+ }
+
+ objMap, err := toMap(obj)
+ if err != nil {
+ return result, err
+ }
+
+ schema := schemas.Schema(resourceType)
+ for k, v := range objMap {
+ _, ok := schema.CheckField(k)
+ if !ok {
+ continue
+ }
+ result[k] = v
+ }
+
+ return result, nil
+}
diff --git a/vendor/github.com/rancher/go-rancher/api/context.go b/vendor/github.com/rancher/go-rancher/api/context.go
new file mode 100644
index 00000000..01125009
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/api/context.go
@@ -0,0 +1,47 @@
+package api
+
+import (
+ "net/http"
+
+ "github.com/gorilla/context"
+ "github.com/rancher/go-rancher/client"
+)
+
+type key int
+
+const (
+ contextKey key = 0
+)
+
+type ApiContext struct {
+ r *http.Request
+ schemas *client.Schemas
+ UrlBuilder UrlBuilder
+ apiResponseWriter ApiResponseWriter
+ responseWriter http.ResponseWriter
+}
+
+func GetApiContext(r *http.Request) *ApiContext {
+ if rv := context.Get(r, contextKey); rv != nil {
+ return rv.(*ApiContext)
+ }
+ return nil
+}
+
+func CreateApiContext(rw http.ResponseWriter, r *http.Request, schemas *client.Schemas) error {
+ urlBuilder, err := NewUrlBuilder(r, schemas)
+ if err != nil {
+ return err
+ }
+
+ apiContext := &ApiContext{
+ r: r,
+ schemas: schemas,
+ UrlBuilder: urlBuilder,
+ apiResponseWriter: parseResponseType(r),
+ responseWriter: rw,
+ }
+
+ context.Set(r, contextKey, apiContext)
+ return nil
+}
diff --git a/vendor/github.com/rancher/go-rancher/api/handler.go b/vendor/github.com/rancher/go-rancher/api/handler.go
new file mode 100644
index 00000000..cc048ec2
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/api/handler.go
@@ -0,0 +1,109 @@
+package api
+
+import (
+ "net/http"
+
+ "github.com/Sirupsen/logrus"
+ "github.com/gorilla/context"
+ "github.com/gorilla/mux"
+ "github.com/rancher/go-rancher/client"
+)
+
+func ApiHandler(schemas *client.Schemas, f http.Handler) http.Handler {
+ return context.ClearHandler(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
+ if err := CreateApiContext(rw, r, schemas); err != nil {
+ logrus.WithField("err", err).Errorf("Failed to create API context")
+ rw.WriteHeader(500)
+ return
+ }
+
+ f.ServeHTTP(rw, r)
+ }))
+}
+
+func VersionsHandler(schemas *client.Schemas, versions ...string) http.Handler {
+ return ApiHandler(schemas, http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
+ apiContext := GetApiContext(r)
+
+ collection := client.GenericCollection{
+ Collection: client.Collection{
+ Links: map[string]string{},
+ },
+ Data: []interface{}{},
+ }
+
+ for i, version := range versions {
+ collection.Data = append(collection.Data, client.Resource{
+ Id: version,
+ Links: map[string]string{
+ SELF: apiContext.UrlBuilder.Version(version),
+ },
+ Type: "apiVersion",
+ })
+
+ if i == len(versions)-1 {
+ collection.Links[LATEST] = apiContext.UrlBuilder.Version(version)
+ }
+ }
+
+ apiContext.Write(&collection)
+ }))
+}
+
+func contains(list []string, item string) bool {
+ for _, i := range list {
+ if i == item {
+ return true
+ }
+ }
+ return false
+}
+
+func VersionHandler(schemas *client.Schemas, version string) http.Handler {
+ return ApiHandler(schemas, http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
+ apiContext := GetApiContext(r)
+
+ versionResource := client.Resource{
+ Id: version,
+ Type: "apiVersion",
+ Links: map[string]string{},
+ }
+
+ for _, schema := range schemas.Data {
+ if contains(schema.CollectionMethods, "GET") {
+ versionResource.Links[schema.PluralName] = apiContext.UrlBuilder.Collection(schema.Id)
+ }
+ }
+
+ apiContext.Write(&versionResource)
+ }))
+}
+
+func SchemasHandler(schemas *client.Schemas) http.Handler {
+ return ApiHandler(schemas, http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
+ apiContext := GetApiContext(r)
+ schemasCopy := *schemas
+ for i := range schemasCopy.Data {
+ populateSchema(apiContext, &schemasCopy.Data[i])
+ }
+ apiContext.Write(&schemasCopy)
+ }))
+}
+
+func populateSchema(apiContext *ApiContext, schema *client.Schema) {
+ if contains(schema.CollectionMethods, "GET") {
+ schema.Links["collection"] = apiContext.UrlBuilder.Collection(schema.Id)
+ }
+}
+
+func SchemaHandler(schemas *client.Schemas) http.Handler {
+ return ApiHandler(schemas, http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
+ apiContext := GetApiContext(r)
+
+ schema := schemas.Schema(mux.Vars(r)["id"])
+
+ populateSchema(apiContext, &schema)
+
+ apiContext.Write(&schema)
+ }))
+}
diff --git a/vendor/github.com/rancher/go-rancher/api/html_writer.go b/vendor/github.com/rancher/go-rancher/api/html_writer.go
new file mode 100644
index 00000000..8cb2d1b7
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/api/html_writer.go
@@ -0,0 +1,78 @@
+package api
+
+import (
+ "encoding/json"
+ "net/http"
+ "strings"
+)
+
+const (
+ before = `
+
+
+
+`)
+)
+
+type HtmlWriter struct {
+ CssUrl, JsUrl string
+ r *http.Request
+}
+
+func (j *HtmlWriter) Write(obj interface{}, rw http.ResponseWriter) error {
+ apiContext := GetApiContext(j.r)
+ rw.Header().Set("X-API-Schemas", apiContext.UrlBuilder.Collection("schema"))
+
+ if rw.Header().Get("Content-Type") == "" {
+ rw.Header().Set("Content-Type", "text/html; charset=utf-8")
+ }
+
+ if _, err := rw.Write([]byte(j.before())); err != nil {
+ return err
+ }
+
+ enc := json.NewEncoder(rw)
+ if err := enc.Encode(obj); err != nil {
+ return err
+ }
+
+ if _, err := rw.Write([]byte(after)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (j *HtmlWriter) before() string {
+ css := j.CssUrl
+ if css == "" {
+ css = defaultCssUrl
+ }
+
+ js := j.JsUrl
+ if js == "" {
+ js = defaultJsUrl
+ }
+
+ apiContext := GetApiContext(j.r)
+
+ content := strings.Replace(before, "%CSS%", css, -1)
+ content = strings.Replace(content, "%JS%", js, -1)
+ content = strings.Replace(content, "%SCHEMAS%", apiContext.UrlBuilder.Collection("schema"), -1)
+
+ return content
+}
diff --git a/vendor/github.com/rancher/go-rancher/api/json_writer.go b/vendor/github.com/rancher/go-rancher/api/json_writer.go
new file mode 100644
index 00000000..c2a018b1
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/api/json_writer.go
@@ -0,0 +1,23 @@
+package api
+
+import (
+ "encoding/json"
+ "net/http"
+)
+
+type JsonWriter struct {
+ r *http.Request
+}
+
+func (j *JsonWriter) Write(obj interface{}, rw http.ResponseWriter) error {
+ apiContext := GetApiContext(j.r)
+ rw.Header().Set("X-API-Schemas", apiContext.UrlBuilder.Collection("schema"))
+
+ if rw.Header().Get("Content-Type") == "" {
+ rw.Header().Set("Content-Type", "application/json")
+ }
+
+ enc := json.NewEncoder(rw)
+ enc.SetEscapeHTML(false)
+ return enc.Encode(obj)
+}
diff --git a/vendor/github.com/rancher/go-rancher/api/url.go b/vendor/github.com/rancher/go-rancher/api/url.go
new file mode 100644
index 00000000..0e43289e
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/api/url.go
@@ -0,0 +1,266 @@
+package api
+
+import (
+ "bytes"
+ "fmt"
+ "net/http"
+ "net/url"
+ "strings"
+
+ "github.com/rancher/go-rancher/client"
+)
+
+const (
+ DEFAULT_OVERRIDE_URL_HEADER = "X-API-request-url"
+ DEFAULT_OVERRIDE_CLIENT_IP_HEADER = "X-API-client-ip"
+ FORWARDED_FOR_HEADER = "X-Forwarded-For"
+ FORWARDED_HOST_HEADER = "X-Forwarded-Host"
+ FORWARDED_PROTO_HEADER = "X-Forwarded-Proto"
+ FORWARDED_PORT_HEADER = "X-Forwarded-Port"
+ SELF = "self"
+ COLLECTION = "collection"
+ LATEST = "latest"
+ HTML = "html"
+ JSON = "json"
+)
+
+var (
+ allowedFormats = map[string]bool{
+ HTML: true,
+ JSON: true,
+ }
+)
+
+type UrlBuilder interface {
+ //ActionLink(resource client.Resource, name string) string
+ Current() string
+ Collection(resourceType string) string
+ Link(resource client.Resource, name string) string
+ ReferenceLink(resource client.Resource) string
+ ReferenceByIdLink(resourceType string, id string) string
+ Version(version string) string
+}
+
+func NewUrlBuilder(r *http.Request, schemas *client.Schemas) (UrlBuilder, error) {
+ requestUrl := parseRequestUrl(r)
+ responseUrlBase, err := parseResponseUrlBase(requestUrl, r)
+ if err != nil {
+ return nil, err
+ }
+
+ builder := &urlBuilder{
+ schemas: schemas,
+ requestUrl: requestUrl,
+ responseUrlBase: responseUrlBase,
+ apiVersion: parseRequestVersion(r),
+ }
+
+ return builder, err
+}
+
+type urlBuilder struct {
+ schemas *client.Schemas
+ //r *http.Request
+ requestUrl string
+ responseUrlBase string
+ //query string
+ apiVersion string
+ subContext string
+}
+
+func (u *urlBuilder) Current() string {
+ return u.requestUrl
+}
+
+func (u *urlBuilder) Collection(resourceType string) string {
+ plural := u.getPluralName(resourceType)
+ return u.constructBasicUrl(plural)
+}
+
+func (u *urlBuilder) Link(resource client.Resource, name string) string {
+ if name == "" {
+ return ""
+ }
+
+ return u.constructBasicUrl(u.getPluralName(resource.Type), resource.Id, strings.ToLower(name))
+}
+
+func (u *urlBuilder) ReferenceLink(resource client.Resource) string {
+ return u.ReferenceByIdLink(resource.Type, resource.Id)
+}
+
+func (u *urlBuilder) ReferenceByIdLink(resourceType string, id string) string {
+ return u.constructBasicUrl(u.getPluralName(resourceType), id)
+}
+
+func (u *urlBuilder) Version(version string) string {
+ return fmt.Sprintf("%s/%s", u.responseUrlBase, version)
+}
+
+func (u *urlBuilder) constructBasicUrl(parts ...string) string {
+ buffer := bytes.Buffer{}
+
+ buffer.WriteString(u.responseUrlBase)
+ buffer.WriteString("/")
+ buffer.WriteString(u.apiVersion)
+ buffer.WriteString(u.subContext)
+
+ for _, part := range parts {
+ if part == "" {
+ return ""
+ }
+ buffer.WriteString("/")
+ buffer.WriteString(part)
+ }
+
+ return buffer.String()
+}
+
+func (u *urlBuilder) getPluralName(resourceType string) string {
+ schema := u.schemas.Schema(resourceType)
+ if schema.PluralName == "" {
+ return strings.ToLower(resourceType)
+ }
+ return strings.ToLower(schema.PluralName)
+}
+
+// Constructs the request URL based off of standard headers in the request, falling back to the HttpServletRequest.getRequestURL()
+// if the headers aren't available. Here is the ordered list of how we'll attempt to construct the URL:
+// - x-api-request-url
+// - x-forwarded-proto://x-forwarded-host:x-forwarded-port/HttpServletRequest.getRequestURI()
+// - x-forwarded-proto://x-forwarded-host/HttpServletRequest.getRequestURI()
+// - x-forwarded-proto://host:x-forwarded-port/HttpServletRequest.getRequestURI()
+// - x-forwarded-proto://host/HttpServletRequest.getRequestURI() request.getRequestURL()
+//
+// Additional notes:
+// - With x-api-request-url, the query string is passed, it will be dropped to match the other formats.
+// - If the x-forwarded-host/host header has a port and x-forwarded-port has been passed, x-forwarded-port will be used.
+func parseRequestUrl(r *http.Request) string {
+ // Get url from custom x-api-request-url header
+ requestUrl := getOverrideHeader(r, DEFAULT_OVERRIDE_URL_HEADER, "")
+ if requestUrl != "" {
+ return strings.SplitN(requestUrl, "?", 2)[0]
+ }
+
+ // Get url from standard headers
+ requestUrl = getUrlFromStandardHeaders(r)
+ if requestUrl != "" {
+ return requestUrl
+ }
+
+ // Use incoming url
+ return fmt.Sprintf("http://%s%s", r.Host, r.URL.Path)
+}
+
+func getUrlFromStandardHeaders(r *http.Request) string {
+ xForwardedProto := getOverrideHeader(r, FORWARDED_PROTO_HEADER, "")
+ if xForwardedProto == "" {
+ return ""
+ }
+
+ host := getOverrideHeader(r, FORWARDED_HOST_HEADER, "")
+ if host == "" {
+ host = r.Host
+ }
+
+ if host == "" {
+ return ""
+ }
+
+ port := getOverrideHeader(r, FORWARDED_PORT_HEADER, "")
+ if port == "443" || port == "80" {
+ port = "" // Don't include default ports in url
+ }
+
+ if port != "" && strings.Contains(host, ":") {
+ // Have to strip the port that is in the host. Handle IPv6, which has this format: [::1]:8080
+ if (strings.HasPrefix(host, "[") && strings.Contains(host, "]:")) || !strings.HasPrefix(host, "[") {
+ host = host[0:strings.LastIndex(host, ":")]
+ }
+ }
+
+ if port != "" {
+ port = ":" + port
+ }
+
+ return fmt.Sprintf("%s://%s%s%s", xForwardedProto, host, port, r.URL.Path)
+}
+
+func getOverrideHeader(r *http.Request, header string, defaultValue string) string {
+ // Need to handle comma separated hosts in X-Forwarded-For
+ value := r.Header.Get(header)
+ if value != "" {
+ return strings.TrimSpace(strings.Split(value, ",")[0])
+ }
+ return defaultValue
+}
+
+func parseResponseUrlBase(requestUrl string, r *http.Request) (string, error) {
+ path := r.URL.Path
+
+ index := strings.LastIndex(requestUrl, path)
+ if index == -1 {
+ // Fallback, if we can't find path in requestUrl, then we just assume the base is the root of the web request
+ u, err := url.Parse(requestUrl)
+ if err != nil {
+ return "", err
+ }
+
+ buffer := bytes.Buffer{}
+ buffer.WriteString(u.Scheme)
+ buffer.WriteString("://")
+ buffer.WriteString(u.Host)
+ return buffer.String(), nil
+ } else {
+ return requestUrl[0:index], nil
+ }
+}
+
+func parseRequestVersion(r *http.Request) string {
+ path := r.URL.Path
+
+ if !strings.HasPrefix(path, "/") || len(path) < 2 {
+ return ""
+ }
+
+ return strings.Split(path, "/")[1]
+}
+
+func parseResponseType(r *http.Request) ApiResponseWriter {
+ format := r.URL.Query().Get("_format")
+
+ if format != "" {
+ format = strings.ToLower(strings.TrimSpace(format))
+ }
+
+ /* Format specified */
+ if format != "" && allowedFormats[format] {
+ switch {
+ case format == HTML:
+ return &HtmlWriter{r: r}
+ case format == JSON:
+ return &JsonWriter{r: r}
+ }
+ }
+
+ // User agent has Mozilla and browser accepts */*
+ if IsBrowser(r, true) {
+ return &HtmlWriter{r: r}
+ } else {
+ return &JsonWriter{r: r}
+ }
+}
+
+func IsBrowser(r *http.Request, checkAccepts bool) bool {
+ accepts := r.Header.Get("Accept")
+ userAgent := r.Header.Get("User-Agent")
+
+ if accepts == "" || !checkAccepts {
+ accepts = "*/*"
+ }
+
+ accepts = strings.ToLower(accepts)
+
+ // User agent has Mozilla and browser accepts */*
+ return strings.Contains(strings.ToLower(userAgent), "mozilla") && strings.Contains(accepts, "*/*")
+}
diff --git a/vendor/github.com/rancher/go-rancher/api/writer.go b/vendor/github.com/rancher/go-rancher/api/writer.go
new file mode 100644
index 00000000..9f1f97cb
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/api/writer.go
@@ -0,0 +1,129 @@
+package api
+
+import (
+ "fmt"
+ "net/http"
+ "reflect"
+
+ "github.com/Sirupsen/logrus"
+)
+
+type ApiResponseWriter interface {
+ Write(obj interface{}, rw http.ResponseWriter) error
+}
+
+func (a *ApiContext) Write(obj interface{}) {
+ var err error
+ collection := getCollection(obj)
+ if collection != nil {
+ err = a.WriteCollection(obj)
+ } else {
+ err = a.WriteResource(obj)
+ }
+
+ if err != nil {
+ logrus.WithField("err", err).Errorf("Failed to write response")
+ a.responseWriter.WriteHeader(500)
+ }
+}
+
+func stringSetIfNot(data map[string]string, key, value string) map[string]string {
+ if v, ok := data[key]; !ok || v == "" {
+ data[key] = value
+ }
+
+ return data
+}
+
+func setIfNot(data map[string]interface{}, key string, value interface{}) map[string]interface{} {
+ if v, ok := data[key]; !ok || v == nil {
+ data[key] = value
+ }
+
+ return data
+}
+
+func (a *ApiContext) WriteCollection(obj interface{}) error {
+ collectionData, resourcesData, err := CollectionToMap(obj, a.schemas)
+ if err != nil {
+ return err
+ }
+
+ a.populateCollection(collectionData, resourcesData)
+ for _, resource := range resourcesData {
+ a.populateResource(resource)
+ }
+
+ return a.apiResponseWriter.Write(collectionData, a.responseWriter)
+}
+
+func (a *ApiContext) WriteResource(obj interface{}) error {
+ resourceData, err := ResourceToMap(obj, a.schemas)
+ if err != nil {
+ return err
+ }
+
+ a.populateResource(resourceData)
+ return a.apiResponseWriter.Write(resourceData, a.responseWriter)
+}
+
+func mapInterfaceToString(input interface{}) map[string]string {
+ result := map[string]string{}
+ if input == nil {
+ return result
+ }
+ switch i := input.(type) {
+ case map[string]string:
+ return i
+ case map[string]interface{}:
+ for k, v := range i {
+ result[k] = fmt.Sprintf("%s", v)
+ }
+ default:
+ logrus.Infof("Unknown type", reflect.TypeOf(input))
+ }
+ return result
+}
+
+func getString(data map[string]interface{}, key string) string {
+ if v, ok := data[key]; ok {
+ return fmt.Sprintf("%s", v)
+ } else {
+ return ""
+ }
+
+}
+
+func getStringMap(data map[string]interface{}, key string) map[string]string {
+ result := map[string]string{}
+ if v, ok := data[key]; ok {
+ result = mapInterfaceToString(v)
+ }
+ data[key] = result
+ return result
+}
+
+func (a *ApiContext) populateCollection(c map[string]interface{}, data []map[string]interface{}) {
+ stringSetIfNot(getStringMap(c, "links"), "self", a.UrlBuilder.Current())
+
+ if _, ok := c["type"]; !ok {
+ c["type"] = "collection"
+ }
+
+ if len(data) > 0 {
+ setIfNot(c, "resourceType", data[0]["type"])
+ }
+}
+
+func (a *ApiContext) populateResource(c map[string]interface{}) {
+ resourceType := getString(c, "type")
+ resourceId := getString(c, "id")
+
+ if resourceType != "" && resourceId != "" {
+ stringSetIfNot(getStringMap(c, "links"), "self", a.UrlBuilder.ReferenceByIdLink(resourceType, resourceId))
+ }
+
+ stringSetIfNot(getStringMap(c, "links"), "self", a.UrlBuilder.Current())
+ // This will create an empty map if not
+ getStringMap(c, "actions")
+}
diff --git a/vendor/github.com/rancher/go-rancher/catalog/client.go b/vendor/github.com/rancher/go-rancher/catalog/client.go
new file mode 100644
index 00000000..df4071e7
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/catalog/client.go
@@ -0,0 +1,41 @@
+package catalog
+
+import (
+ "net/http"
+
+ "github.com/gorilla/websocket"
+)
+
+type RancherBaseClientImpl struct {
+ Opts *ClientOpts
+ Schemas *Schemas
+ Types map[string]Schema
+ customHeaders map[string]string
+}
+
+type RancherBaseClient interface {
+ Websocket(string, map[string][]string) (*websocket.Conn, *http.Response, error)
+ List(string, *ListOpts, interface{}) error
+ Post(string, interface{}, interface{}) error
+ GetLink(Resource, string, interface{}) error
+ Create(string, interface{}, interface{}) error
+ Update(string, *Resource, interface{}, interface{}) error
+ ById(string, string, interface{}) error
+ Delete(*Resource) error
+ Reload(*Resource, interface{}) error
+ Action(string, string, *Resource, interface{}, interface{}) error
+ GetOpts() *ClientOpts
+ GetSchemas() *Schemas
+ GetTypes() map[string]Schema
+ SetCustomHeaders(headers map[string]string)
+
+ doGet(string, *ListOpts, interface{}) error
+ doList(string, *ListOpts, interface{}) error
+ doNext(string, interface{}) error
+ doModify(string, string, interface{}, interface{}) error
+ doCreate(string, interface{}, interface{}) error
+ doUpdate(string, *Resource, interface{}, interface{}) error
+ doById(string, string, interface{}) error
+ doResourceDelete(string, *Resource) error
+ doAction(string, string, *Resource, interface{}, interface{}) error
+}
diff --git a/vendor/github.com/rancher/go-rancher/catalog/common.go b/vendor/github.com/rancher/go-rancher/catalog/common.go
new file mode 100644
index 00000000..cc67972c
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/catalog/common.go
@@ -0,0 +1,631 @@
+package catalog
+
+import (
+ "bytes"
+ "encoding/base64"
+ "encoding/json"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "os"
+ "regexp"
+ "strings"
+ "time"
+
+ "github.com/gorilla/websocket"
+ "github.com/pkg/errors"
+)
+
+const (
+ SELF = "self"
+ COLLECTION = "collection"
+)
+
+var (
+ debug = false
+ dialer = &websocket.Dialer{}
+ privateFieldRegex = regexp.MustCompile("^[[:lower:]]")
+)
+
+type ClientOpts struct {
+ Url string
+ AccessKey string
+ SecretKey string
+ Timeout time.Duration
+}
+
+type ApiError struct {
+ StatusCode int
+ Url string
+ Msg string
+ Status string
+ Body string
+}
+
+func (e *ApiError) Error() string {
+ return e.Msg
+}
+
+func IsNotFound(err error) bool {
+ apiError, ok := err.(*ApiError)
+ if !ok {
+ return false
+ }
+
+ return apiError.StatusCode == http.StatusNotFound
+}
+
+func newApiError(resp *http.Response, url string) *ApiError {
+ contents, err := ioutil.ReadAll(resp.Body)
+ var body string
+ if err != nil {
+ body = "Unreadable body."
+ } else {
+ body = string(contents)
+ }
+
+ data := map[string]interface{}{}
+ if json.Unmarshal(contents, &data) == nil {
+ delete(data, "id")
+ delete(data, "links")
+ delete(data, "actions")
+ delete(data, "type")
+ delete(data, "status")
+ buf := &bytes.Buffer{}
+ for k, v := range data {
+ if v == nil {
+ continue
+ }
+ if buf.Len() > 0 {
+ buf.WriteString(", ")
+ }
+ fmt.Fprintf(buf, "%s=%v", k, v)
+ }
+ body = buf.String()
+ }
+ formattedMsg := fmt.Sprintf("Bad response statusCode [%d]. Status [%s]. Body: [%s] from [%s]",
+ resp.StatusCode, resp.Status, body, url)
+ return &ApiError{
+ Url: url,
+ Msg: formattedMsg,
+ StatusCode: resp.StatusCode,
+ Status: resp.Status,
+ Body: body,
+ }
+}
+
+func contains(array []string, item string) bool {
+ for _, check := range array {
+ if check == item {
+ return true
+ }
+ }
+
+ return false
+}
+
+func appendFilters(urlString string, filters map[string]interface{}) (string, error) {
+ if len(filters) == 0 {
+ return urlString, nil
+ }
+
+ u, err := url.Parse(urlString)
+ if err != nil {
+ return "", err
+ }
+
+ q := u.Query()
+ for k, v := range filters {
+ if l, ok := v.([]string); ok {
+ for _, v := range l {
+ q.Add(k, v)
+ }
+ } else {
+ q.Add(k, fmt.Sprintf("%v", v))
+ }
+ }
+
+ u.RawQuery = q.Encode()
+ return u.String(), nil
+}
+
+func NormalizeUrl(existingUrl string) (string, error) {
+ u, err := url.Parse(existingUrl)
+ if err != nil {
+ return "", err
+ }
+
+ if u.Path == "" || u.Path == "/" {
+ u.Path = "v1-catalog"
+ } else if u.Path == "/v1" || strings.HasPrefix(u.Path, "/v1/") {
+ u.Path = strings.Replace(u.Path, "/v1", "/v1-catalog", 1)
+ } else if u.Path == "/v2-beta" || strings.HasPrefix(u.Path, "/v2-beta/") {
+ u.Path = strings.Replace(u.Path, "/v2-beta", "/v1-catalog", 1)
+ } else if u.Path == "/v2" || strings.HasPrefix(u.Path, "/v2/") {
+ u.Path = strings.Replace(u.Path, "/v2", "/v1-catalog", 1)
+ }
+
+ return u.String(), nil
+}
+
+func setupRancherBaseClient(rancherClient *RancherBaseClientImpl, opts *ClientOpts) error {
+ var err error
+ opts.Url, err = NormalizeUrl(opts.Url)
+ if err != nil {
+ return err
+ }
+
+ if opts.Timeout == 0 {
+ opts.Timeout = time.Second * 10
+ }
+ client := &http.Client{Timeout: opts.Timeout}
+ req, err := http.NewRequest("GET", opts.Url, nil)
+ if err != nil {
+ return err
+ }
+
+ req.SetBasicAuth(opts.AccessKey, opts.SecretKey)
+
+ resp, err := client.Do(req)
+ if err != nil {
+ return err
+ }
+
+ defer resp.Body.Close()
+
+ if resp.StatusCode != 200 {
+ return newApiError(resp, opts.Url)
+ }
+
+ schemasUrls := resp.Header.Get("X-API-Schemas")
+ if len(schemasUrls) == 0 {
+ return errors.New("Failed to find schema at [" + opts.Url + "]")
+ }
+
+ if schemasUrls != opts.Url {
+ req, err = http.NewRequest("GET", schemasUrls, nil)
+ req.SetBasicAuth(opts.AccessKey, opts.SecretKey)
+ if err != nil {
+ return err
+ }
+
+ resp, err = client.Do(req)
+ if err != nil {
+ return err
+ }
+
+ defer resp.Body.Close()
+
+ if resp.StatusCode != 200 {
+ return newApiError(resp, opts.Url)
+ }
+ }
+
+ var schemas Schemas
+ bytes, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return err
+ }
+
+ err = json.Unmarshal(bytes, &schemas)
+ if err != nil {
+ return err
+ }
+
+ rancherClient.Opts = opts
+ rancherClient.Schemas = &schemas
+
+ for _, schema := range schemas.Data {
+ rancherClient.Types[schema.Id] = schema
+ }
+
+ return nil
+}
+
+func NewListOpts() *ListOpts {
+ return &ListOpts{
+ Filters: map[string]interface{}{},
+ }
+}
+
+func (rancherClient *RancherBaseClientImpl) SetCustomHeaders(headers map[string]string) {
+ rancherClient.customHeaders = headers
+}
+
+func (rancherClient *RancherBaseClientImpl) setupRequest(req *http.Request) {
+ req.SetBasicAuth(rancherClient.Opts.AccessKey, rancherClient.Opts.SecretKey)
+ for k, v := range rancherClient.customHeaders {
+ req.Header.Set(k, v)
+ }
+}
+
+func (rancherClient *RancherBaseClientImpl) newHttpClient() *http.Client {
+ if rancherClient.Opts.Timeout == 0 {
+ rancherClient.Opts.Timeout = time.Second * 10
+ }
+ return &http.Client{Timeout: rancherClient.Opts.Timeout}
+}
+
+func (rancherClient *RancherBaseClientImpl) doDelete(url string) error {
+ client := rancherClient.newHttpClient()
+ req, err := http.NewRequest("DELETE", url, nil)
+ if err != nil {
+ return err
+ }
+
+ rancherClient.setupRequest(req)
+
+ resp, err := client.Do(req)
+ if err != nil {
+ return err
+ }
+ defer resp.Body.Close()
+
+ io.Copy(ioutil.Discard, resp.Body)
+
+ if resp.StatusCode >= 300 {
+ return newApiError(resp, url)
+ }
+
+ return nil
+}
+
+func (rancherClient *RancherBaseClientImpl) Websocket(url string, headers map[string][]string) (*websocket.Conn, *http.Response, error) {
+ httpHeaders := http.Header{}
+ for k, v := range httpHeaders {
+ httpHeaders[k] = v
+ }
+
+ if rancherClient.Opts != nil {
+ s := rancherClient.Opts.AccessKey + ":" + rancherClient.Opts.SecretKey
+ httpHeaders.Add("Authorization", "Basic "+base64.StdEncoding.EncodeToString([]byte(s)))
+ }
+
+ return dialer.Dial(url, http.Header(httpHeaders))
+}
+
+func (rancherClient *RancherBaseClientImpl) doGet(url string, opts *ListOpts, respObject interface{}) error {
+ if opts == nil {
+ opts = NewListOpts()
+ }
+ url, err := appendFilters(url, opts.Filters)
+ if err != nil {
+ return err
+ }
+
+ if debug {
+ fmt.Println("GET " + url)
+ }
+
+ client := rancherClient.newHttpClient()
+ req, err := http.NewRequest("GET", url, nil)
+ if err != nil {
+ return err
+ }
+
+ rancherClient.setupRequest(req)
+
+ resp, err := client.Do(req)
+ if err != nil {
+ return err
+ }
+
+ defer resp.Body.Close()
+
+ if resp.StatusCode != 200 {
+ return newApiError(resp, url)
+ }
+
+ byteContent, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return err
+ }
+
+ if debug {
+ fmt.Println("Response <= " + string(byteContent))
+ }
+
+ if err := json.Unmarshal(byteContent, respObject); err != nil {
+ return errors.Wrap(err, fmt.Sprintf("Failed to parse: %s", byteContent))
+ }
+
+ return nil
+}
+
+func (rancherClient *RancherBaseClientImpl) List(schemaType string, opts *ListOpts, respObject interface{}) error {
+ return rancherClient.doList(schemaType, opts, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) doList(schemaType string, opts *ListOpts, respObject interface{}) error {
+ schema, ok := rancherClient.Types[schemaType]
+ if !ok {
+ return errors.New("Unknown schema type [" + schemaType + "]")
+ }
+
+ if !contains(schema.CollectionMethods, "GET") {
+ return errors.New("Resource type [" + schemaType + "] is not listable")
+ }
+
+ collectionUrl, ok := schema.Links[COLLECTION]
+ if !ok {
+ return errors.New("Failed to find collection URL for [" + schemaType + "]")
+ }
+
+ return rancherClient.doGet(collectionUrl, opts, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) doNext(nextUrl string, respObject interface{}) error {
+ return rancherClient.doGet(nextUrl, nil, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) Post(url string, createObj interface{}, respObject interface{}) error {
+ return rancherClient.doModify("POST", url, createObj, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) GetLink(resource Resource, link string, respObject interface{}) error {
+ url := resource.Links[link]
+ if url == "" {
+ return fmt.Errorf("Failed to find link: %s", link)
+ }
+
+ return rancherClient.doGet(url, &ListOpts{}, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) doModify(method string, url string, createObj interface{}, respObject interface{}) error {
+ bodyContent, err := json.Marshal(createObj)
+ if err != nil {
+ return err
+ }
+
+ if debug {
+ fmt.Println(method + " " + url)
+ fmt.Println("Request => " + string(bodyContent))
+ }
+
+ client := rancherClient.newHttpClient()
+ req, err := http.NewRequest(method, url, bytes.NewBuffer(bodyContent))
+ if err != nil {
+ return err
+ }
+
+ rancherClient.setupRequest(req)
+ req.Header.Set("Content-Type", "application/json")
+
+ resp, err := client.Do(req)
+ if err != nil {
+ return err
+ }
+
+ defer resp.Body.Close()
+
+ if resp.StatusCode >= 300 {
+ return newApiError(resp, url)
+ }
+
+ byteContent, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return err
+ }
+
+ if len(byteContent) > 0 {
+ if debug {
+ fmt.Println("Response <= " + string(byteContent))
+ }
+ return json.Unmarshal(byteContent, respObject)
+ }
+
+ return nil
+}
+
+func (rancherClient *RancherBaseClientImpl) Create(schemaType string, createObj interface{}, respObject interface{}) error {
+ return rancherClient.doCreate(schemaType, createObj, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) doCreate(schemaType string, createObj interface{}, respObject interface{}) error {
+ if createObj == nil {
+ createObj = map[string]string{}
+ }
+ if respObject == nil {
+ respObject = &map[string]interface{}{}
+ }
+ schema, ok := rancherClient.Types[schemaType]
+ if !ok {
+ return errors.New("Unknown schema type [" + schemaType + "]")
+ }
+
+ if !contains(schema.CollectionMethods, "POST") {
+ return errors.New("Resource type [" + schemaType + "] is not creatable")
+ }
+
+ var collectionUrl string
+ collectionUrl, ok = schema.Links[COLLECTION]
+ if !ok {
+ // return errors.New("Failed to find collection URL for [" + schemaType + "]")
+ // This is a hack to address https://github.com/rancher/cattle/issues/254
+ re := regexp.MustCompile("schemas.*")
+ collectionUrl = re.ReplaceAllString(schema.Links[SELF], schema.PluralName)
+ }
+
+ return rancherClient.doModify("POST", collectionUrl, createObj, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) Update(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error {
+ return rancherClient.doUpdate(schemaType, existing, updates, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) doUpdate(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error {
+ if existing == nil {
+ return errors.New("Existing object is nil")
+ }
+
+ selfUrl, ok := existing.Links[SELF]
+ if !ok {
+ return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing))
+ }
+
+ if updates == nil {
+ updates = map[string]string{}
+ }
+
+ if respObject == nil {
+ respObject = &map[string]interface{}{}
+ }
+
+ schema, ok := rancherClient.Types[schemaType]
+ if !ok {
+ return errors.New("Unknown schema type [" + schemaType + "]")
+ }
+
+ if !contains(schema.ResourceMethods, "PUT") {
+ return errors.New("Resource type [" + schemaType + "] is not updatable")
+ }
+
+ return rancherClient.doModify("PUT", selfUrl, updates, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) ById(schemaType string, id string, respObject interface{}) error {
+ return rancherClient.doById(schemaType, id, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) doById(schemaType string, id string, respObject interface{}) error {
+ schema, ok := rancherClient.Types[schemaType]
+ if !ok {
+ return errors.New("Unknown schema type [" + schemaType + "]")
+ }
+
+ if !contains(schema.ResourceMethods, "GET") {
+ return errors.New("Resource type [" + schemaType + "] can not be looked up by ID")
+ }
+
+ collectionUrl, ok := schema.Links[COLLECTION]
+ if !ok {
+ return errors.New("Failed to find collection URL for [" + schemaType + "]")
+ }
+
+ err := rancherClient.doGet(collectionUrl+"/"+id, nil, respObject)
+ //TODO check for 404 and return nil, nil
+ return err
+}
+
+func (rancherClient *RancherBaseClientImpl) Delete(existing *Resource) error {
+ if existing == nil {
+ return nil
+ }
+ return rancherClient.doResourceDelete(existing.Type, existing)
+}
+
+func (rancherClient *RancherBaseClientImpl) doResourceDelete(schemaType string, existing *Resource) error {
+ schema, ok := rancherClient.Types[schemaType]
+ if !ok {
+ return errors.New("Unknown schema type [" + schemaType + "]")
+ }
+
+ if !contains(schema.ResourceMethods, "DELETE") {
+ return errors.New("Resource type [" + schemaType + "] can not be deleted")
+ }
+
+ selfUrl, ok := existing.Links[SELF]
+ if !ok {
+ return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing))
+ }
+
+ return rancherClient.doDelete(selfUrl)
+}
+
+func (rancherClient *RancherBaseClientImpl) Reload(existing *Resource, output interface{}) error {
+ selfUrl, ok := existing.Links[SELF]
+ if !ok {
+ return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing))
+ }
+
+ return rancherClient.doGet(selfUrl, NewListOpts(), output)
+}
+
+func (rancherClient *RancherBaseClientImpl) Action(schemaType string, action string,
+ existing *Resource, inputObject, respObject interface{}) error {
+ return rancherClient.doAction(schemaType, action, existing, inputObject, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) doAction(schemaType string, action string,
+ existing *Resource, inputObject, respObject interface{}) error {
+
+ if existing == nil {
+ return errors.New("Existing object is nil")
+ }
+
+ actionUrl, ok := existing.Actions[action]
+ if !ok {
+ return errors.New(fmt.Sprintf("Action [%v] not available on [%v]", action, existing))
+ }
+
+ _, ok = rancherClient.Types[schemaType]
+ if !ok {
+ return errors.New("Unknown schema type [" + schemaType + "]")
+ }
+
+ var input io.Reader
+
+ if inputObject != nil {
+ bodyContent, err := json.Marshal(inputObject)
+ if err != nil {
+ return err
+ }
+ if debug {
+ fmt.Println("Request => " + string(bodyContent))
+ }
+ input = bytes.NewBuffer(bodyContent)
+ }
+
+ client := rancherClient.newHttpClient()
+ req, err := http.NewRequest("POST", actionUrl, input)
+ if err != nil {
+ return err
+ }
+
+ rancherClient.setupRequest(req)
+ req.Header.Set("Content-Type", "application/json")
+ req.Header.Set("Content-Length", "0")
+
+ resp, err := client.Do(req)
+ if err != nil {
+ return err
+ }
+
+ defer resp.Body.Close()
+
+ if resp.StatusCode >= 300 {
+ return newApiError(resp, actionUrl)
+ }
+
+ byteContent, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return err
+ }
+
+ if debug {
+ fmt.Println("Response <= " + string(byteContent))
+ }
+
+ return json.Unmarshal(byteContent, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) GetOpts() *ClientOpts {
+ return rancherClient.Opts
+}
+
+func (rancherClient *RancherBaseClientImpl) GetSchemas() *Schemas {
+ return rancherClient.Schemas
+}
+
+func (rancherClient *RancherBaseClientImpl) GetTypes() map[string]Schema {
+ return rancherClient.Types
+}
+
+func init() {
+ debug = os.Getenv("RANCHER_CLIENT_DEBUG") == "true"
+ if debug {
+ fmt.Println("Rancher client debug on")
+ }
+}
diff --git a/vendor/github.com/rancher/go-rancher/catalog/generated_api_version.go b/vendor/github.com/rancher/go-rancher/catalog/generated_api_version.go
new file mode 100644
index 00000000..766c6b03
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/catalog/generated_api_version.go
@@ -0,0 +1,83 @@
+package catalog
+
+const (
+ API_VERSION_TYPE = "apiVersion"
+)
+
+type ApiVersion struct {
+ Resource `yaml:"-"`
+
+ Actions map[string]string `json:"actions,omitempty" yaml:"actions,omitempty"`
+
+ Links map[string]string `json:"links,omitempty" yaml:"links,omitempty"`
+
+ Type string `json:"type,omitempty" yaml:"type,omitempty"`
+}
+
+type ApiVersionCollection struct {
+ Collection
+ Data []ApiVersion `json:"data,omitempty"`
+ client *ApiVersionClient
+}
+
+type ApiVersionClient struct {
+ rancherClient *RancherClient
+}
+
+type ApiVersionOperations interface {
+ List(opts *ListOpts) (*ApiVersionCollection, error)
+ Create(opts *ApiVersion) (*ApiVersion, error)
+ Update(existing *ApiVersion, updates interface{}) (*ApiVersion, error)
+ ById(id string) (*ApiVersion, error)
+ Delete(container *ApiVersion) error
+}
+
+func newApiVersionClient(rancherClient *RancherClient) *ApiVersionClient {
+ return &ApiVersionClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ApiVersionClient) Create(container *ApiVersion) (*ApiVersion, error) {
+ resp := &ApiVersion{}
+ err := c.rancherClient.doCreate(API_VERSION_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ApiVersionClient) Update(existing *ApiVersion, updates interface{}) (*ApiVersion, error) {
+ resp := &ApiVersion{}
+ err := c.rancherClient.doUpdate(API_VERSION_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ApiVersionClient) List(opts *ListOpts) (*ApiVersionCollection, error) {
+ resp := &ApiVersionCollection{}
+ err := c.rancherClient.doList(API_VERSION_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ApiVersionCollection) Next() (*ApiVersionCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ApiVersionCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ApiVersionClient) ById(id string) (*ApiVersion, error) {
+ resp := &ApiVersion{}
+ err := c.rancherClient.doById(API_VERSION_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ApiVersionClient) Delete(container *ApiVersion) error {
+ return c.rancherClient.doResourceDelete(API_VERSION_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/catalog/generated_catalog.go b/vendor/github.com/rancher/go-rancher/catalog/generated_catalog.go
new file mode 100644
index 00000000..e5731d9b
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/catalog/generated_catalog.go
@@ -0,0 +1,95 @@
+package catalog
+
+const (
+ CATALOG_TYPE = "catalog"
+)
+
+type Catalog struct {
+ Resource `yaml:"-"`
+
+ Actions map[string]string `json:"actions,omitempty" yaml:"actions,omitempty"`
+
+ Branch string `json:"branch,omitempty" yaml:"branch,omitempty"`
+
+ Commit string `json:"commit,omitempty" yaml:"commit,omitempty"`
+
+ EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Links map[string]string `json:"links,omitempty" yaml:"links,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Type string `json:"type,omitempty" yaml:"type,omitempty"`
+
+ Url string `json:"url,omitempty" yaml:"url,omitempty"`
+}
+
+type CatalogCollection struct {
+ Collection
+ Data []Catalog `json:"data,omitempty"`
+ client *CatalogClient
+}
+
+type CatalogClient struct {
+ rancherClient *RancherClient
+}
+
+type CatalogOperations interface {
+ List(opts *ListOpts) (*CatalogCollection, error)
+ Create(opts *Catalog) (*Catalog, error)
+ Update(existing *Catalog, updates interface{}) (*Catalog, error)
+ ById(id string) (*Catalog, error)
+ Delete(container *Catalog) error
+}
+
+func newCatalogClient(rancherClient *RancherClient) *CatalogClient {
+ return &CatalogClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *CatalogClient) Create(container *Catalog) (*Catalog, error) {
+ resp := &Catalog{}
+ err := c.rancherClient.doCreate(CATALOG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *CatalogClient) Update(existing *Catalog, updates interface{}) (*Catalog, error) {
+ resp := &Catalog{}
+ err := c.rancherClient.doUpdate(CATALOG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *CatalogClient) List(opts *ListOpts) (*CatalogCollection, error) {
+ resp := &CatalogCollection{}
+ err := c.rancherClient.doList(CATALOG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *CatalogCollection) Next() (*CatalogCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &CatalogCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *CatalogClient) ById(id string) (*Catalog, error) {
+ resp := &Catalog{}
+ err := c.rancherClient.doById(CATALOG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *CatalogClient) Delete(container *Catalog) error {
+ return c.rancherClient.doResourceDelete(CATALOG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/catalog/generated_client.go b/vendor/github.com/rancher/go-rancher/catalog/generated_client.go
new file mode 100644
index 00000000..b53b84a0
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/catalog/generated_client.go
@@ -0,0 +1,41 @@
+package catalog
+
+type RancherClient struct {
+ RancherBaseClient
+
+ ApiVersion ApiVersionOperations
+ Catalog CatalogOperations
+ Template TemplateOperations
+ Question QuestionOperations
+ TemplateVersion TemplateVersionOperations
+ Error ErrorOperations
+}
+
+func constructClient(rancherBaseClient *RancherBaseClientImpl) *RancherClient {
+ client := &RancherClient{
+ RancherBaseClient: rancherBaseClient,
+ }
+
+ client.ApiVersion = newApiVersionClient(client)
+ client.Catalog = newCatalogClient(client)
+ client.Template = newTemplateClient(client)
+ client.Question = newQuestionClient(client)
+ client.TemplateVersion = newTemplateVersionClient(client)
+ client.Error = newErrorClient(client)
+
+ return client
+}
+
+func NewRancherClient(opts *ClientOpts) (*RancherClient, error) {
+ rancherBaseClient := &RancherBaseClientImpl{
+ Types: map[string]Schema{},
+ }
+ client := constructClient(rancherBaseClient)
+
+ err := setupRancherBaseClient(rancherBaseClient, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return client, nil
+}
diff --git a/vendor/github.com/rancher/go-rancher/catalog/generated_error.go b/vendor/github.com/rancher/go-rancher/catalog/generated_error.go
new file mode 100644
index 00000000..57231216
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/catalog/generated_error.go
@@ -0,0 +1,87 @@
+package catalog
+
+const (
+ ERROR_TYPE = "error"
+)
+
+type Error struct {
+ Resource `yaml:"-"`
+
+ Actions map[string]string `json:"actions,omitempty" yaml:"actions,omitempty"`
+
+ Links map[string]string `json:"links,omitempty" yaml:"links,omitempty"`
+
+ Message string `json:"message,omitempty" yaml:"message,omitempty"`
+
+ Status string `json:"status,omitempty" yaml:"status,omitempty"`
+
+ Type string `json:"type,omitempty" yaml:"type,omitempty"`
+}
+
+type ErrorCollection struct {
+ Collection
+ Data []Error `json:"data,omitempty"`
+ client *ErrorClient
+}
+
+type ErrorClient struct {
+ rancherClient *RancherClient
+}
+
+type ErrorOperations interface {
+ List(opts *ListOpts) (*ErrorCollection, error)
+ Create(opts *Error) (*Error, error)
+ Update(existing *Error, updates interface{}) (*Error, error)
+ ById(id string) (*Error, error)
+ Delete(container *Error) error
+}
+
+func newErrorClient(rancherClient *RancherClient) *ErrorClient {
+ return &ErrorClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ErrorClient) Create(container *Error) (*Error, error) {
+ resp := &Error{}
+ err := c.rancherClient.doCreate(ERROR_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ErrorClient) Update(existing *Error, updates interface{}) (*Error, error) {
+ resp := &Error{}
+ err := c.rancherClient.doUpdate(ERROR_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ErrorClient) List(opts *ListOpts) (*ErrorCollection, error) {
+ resp := &ErrorCollection{}
+ err := c.rancherClient.doList(ERROR_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ErrorCollection) Next() (*ErrorCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ErrorCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ErrorClient) ById(id string) (*Error, error) {
+ resp := &Error{}
+ err := c.rancherClient.doById(ERROR_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ErrorClient) Delete(container *Error) error {
+ return c.rancherClient.doResourceDelete(ERROR_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/catalog/generated_question.go b/vendor/github.com/rancher/go-rancher/catalog/generated_question.go
new file mode 100644
index 00000000..1a7cb2bf
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/catalog/generated_question.go
@@ -0,0 +1,105 @@
+package catalog
+
+const (
+ QUESTION_TYPE = "question"
+)
+
+type Question struct {
+ Resource `yaml:"-"`
+
+ Default string `json:"default,omitempty" yaml:"default,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Group string `json:"group,omitempty" yaml:"group,omitempty"`
+
+ InvalidChars string `json:"invalidChars,omitempty" yaml:"invalid_chars,omitempty"`
+
+ Label string `json:"label,omitempty" yaml:"label,omitempty"`
+
+ Max int64 `json:"max,omitempty" yaml:"max,omitempty"`
+
+ MaxLength int64 `json:"maxLength,omitempty" yaml:"max_length,omitempty"`
+
+ Min int64 `json:"min,omitempty" yaml:"min,omitempty"`
+
+ MinLength int64 `json:"minLength,omitempty" yaml:"min_length,omitempty"`
+
+ Options []string `json:"options,omitempty" yaml:"options,omitempty"`
+
+ Required bool `json:"required,omitempty" yaml:"required,omitempty"`
+
+ Type string `json:"type,omitempty" yaml:"type,omitempty"`
+
+ ValidChars string `json:"validChars,omitempty" yaml:"valid_chars,omitempty"`
+
+ Variable string `json:"variable,omitempty" yaml:"variable,omitempty"`
+}
+
+type QuestionCollection struct {
+ Collection
+ Data []Question `json:"data,omitempty"`
+ client *QuestionClient
+}
+
+type QuestionClient struct {
+ rancherClient *RancherClient
+}
+
+type QuestionOperations interface {
+ List(opts *ListOpts) (*QuestionCollection, error)
+ Create(opts *Question) (*Question, error)
+ Update(existing *Question, updates interface{}) (*Question, error)
+ ById(id string) (*Question, error)
+ Delete(container *Question) error
+}
+
+func newQuestionClient(rancherClient *RancherClient) *QuestionClient {
+ return &QuestionClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *QuestionClient) Create(container *Question) (*Question, error) {
+ resp := &Question{}
+ err := c.rancherClient.doCreate(QUESTION_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *QuestionClient) Update(existing *Question, updates interface{}) (*Question, error) {
+ resp := &Question{}
+ err := c.rancherClient.doUpdate(QUESTION_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *QuestionClient) List(opts *ListOpts) (*QuestionCollection, error) {
+ resp := &QuestionCollection{}
+ err := c.rancherClient.doList(QUESTION_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *QuestionCollection) Next() (*QuestionCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &QuestionCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *QuestionClient) ById(id string) (*Question, error) {
+ resp := &Question{}
+ err := c.rancherClient.doById(QUESTION_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *QuestionClient) Delete(container *Question) error {
+ return c.rancherClient.doResourceDelete(QUESTION_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/catalog/generated_template.go b/vendor/github.com/rancher/go-rancher/catalog/generated_template.go
new file mode 100644
index 00000000..81bf669a
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/catalog/generated_template.go
@@ -0,0 +1,121 @@
+package catalog
+
+const (
+ TEMPLATE_TYPE = "template"
+)
+
+type Template struct {
+ Resource `yaml:"-"`
+
+ Actions map[string]string `json:"actions,omitempty" yaml:"actions,omitempty"`
+
+ CatalogId string `json:"catalogId,omitempty" yaml:"catalog_id,omitempty"`
+
+ Categories []string `json:"categories,omitempty" yaml:"categories,omitempty"`
+
+ Category string `json:"category,omitempty" yaml:"category,omitempty"`
+
+ DefaultTemplateVersionId string `json:"defaultTemplateVersionId,omitempty" yaml:"default_template_version_id,omitempty"`
+
+ DefaultVersion string `json:"defaultVersion,omitempty" yaml:"default_version,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"`
+
+ FolderName string `json:"folderName,omitempty" yaml:"folder_name,omitempty"`
+
+ IconFilename string `json:"iconFilename,omitempty" yaml:"icon_filename,omitempty"`
+
+ IsSystem string `json:"isSystem,omitempty" yaml:"is_system,omitempty"`
+
+ Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
+
+ License string `json:"license,omitempty" yaml:"license,omitempty"`
+
+ Links map[string]string `json:"links,omitempty" yaml:"links,omitempty"`
+
+ Maintainer string `json:"maintainer,omitempty" yaml:"maintainer,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Path string `json:"path,omitempty" yaml:"path,omitempty"`
+
+ TemplateBase string `json:"templateBase,omitempty" yaml:"template_base,omitempty"`
+
+ Type string `json:"type,omitempty" yaml:"type,omitempty"`
+
+ UpgradeFrom string `json:"upgradeFrom,omitempty" yaml:"upgrade_from,omitempty"`
+
+ VersionLinks map[string]string `json:"versionLinks,omitempty" yaml:"version_links,omitempty"`
+
+ Versions []string `json:"versions,omitempty" yaml:"versions,omitempty"`
+}
+
+type TemplateCollection struct {
+ Collection
+ Data []Template `json:"data,omitempty"`
+ client *TemplateClient
+}
+
+type TemplateClient struct {
+ rancherClient *RancherClient
+}
+
+type TemplateOperations interface {
+ List(opts *ListOpts) (*TemplateCollection, error)
+ Create(opts *Template) (*Template, error)
+ Update(existing *Template, updates interface{}) (*Template, error)
+ ById(id string) (*Template, error)
+ Delete(container *Template) error
+}
+
+func newTemplateClient(rancherClient *RancherClient) *TemplateClient {
+ return &TemplateClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *TemplateClient) Create(container *Template) (*Template, error) {
+ resp := &Template{}
+ err := c.rancherClient.doCreate(TEMPLATE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *TemplateClient) Update(existing *Template, updates interface{}) (*Template, error) {
+ resp := &Template{}
+ err := c.rancherClient.doUpdate(TEMPLATE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *TemplateClient) List(opts *ListOpts) (*TemplateCollection, error) {
+ resp := &TemplateCollection{}
+ err := c.rancherClient.doList(TEMPLATE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *TemplateCollection) Next() (*TemplateCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &TemplateCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *TemplateClient) ById(id string) (*Template, error) {
+ resp := &Template{}
+ err := c.rancherClient.doById(TEMPLATE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *TemplateClient) Delete(container *Template) error {
+ return c.rancherClient.doResourceDelete(TEMPLATE_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/catalog/generated_template_version.go b/vendor/github.com/rancher/go-rancher/catalog/generated_template_version.go
new file mode 100644
index 00000000..722414f8
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/catalog/generated_template_version.go
@@ -0,0 +1,103 @@
+package catalog
+
+const (
+ TEMPLATE_VERSION_TYPE = "templateVersion"
+)
+
+type TemplateVersion struct {
+ Resource `yaml:"-"`
+
+ Actions map[string]string `json:"actions,omitempty" yaml:"actions,omitempty"`
+
+ Bindings map[string]string `json:"bindings,omitempty" yaml:"bindings,omitempty"`
+
+ Files map[string]string `json:"files,omitempty" yaml:"files,omitempty"`
+
+ Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
+
+ Links map[string]string `json:"links,omitempty" yaml:"links,omitempty"`
+
+ MaximumRancherVersion string `json:"maximumRancherVersion,omitempty" yaml:"maximum_rancher_version,omitempty"`
+
+ MinimumRancherVersion string `json:"minimumRancherVersion,omitempty" yaml:"minimum_rancher_version,omitempty"`
+
+ Questions []Question `json:"questions,omitempty" yaml:"questions,omitempty"`
+
+ TemplateId string `json:"templateId,omitempty" yaml:"template_id,omitempty"`
+
+ Type string `json:"type,omitempty" yaml:"type,omitempty"`
+
+ UpgradeFrom string `json:"upgradeFrom,omitempty" yaml:"upgrade_from,omitempty"`
+
+ UpgradeVersionLinks map[string]string `json:"upgradeVersionLinks,omitempty" yaml:"upgrade_version_links,omitempty"`
+
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+}
+
+type TemplateVersionCollection struct {
+ Collection
+ Data []TemplateVersion `json:"data,omitempty"`
+ client *TemplateVersionClient
+}
+
+type TemplateVersionClient struct {
+ rancherClient *RancherClient
+}
+
+type TemplateVersionOperations interface {
+ List(opts *ListOpts) (*TemplateVersionCollection, error)
+ Create(opts *TemplateVersion) (*TemplateVersion, error)
+ Update(existing *TemplateVersion, updates interface{}) (*TemplateVersion, error)
+ ById(id string) (*TemplateVersion, error)
+ Delete(container *TemplateVersion) error
+}
+
+func newTemplateVersionClient(rancherClient *RancherClient) *TemplateVersionClient {
+ return &TemplateVersionClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *TemplateVersionClient) Create(container *TemplateVersion) (*TemplateVersion, error) {
+ resp := &TemplateVersion{}
+ err := c.rancherClient.doCreate(TEMPLATE_VERSION_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *TemplateVersionClient) Update(existing *TemplateVersion, updates interface{}) (*TemplateVersion, error) {
+ resp := &TemplateVersion{}
+ err := c.rancherClient.doUpdate(TEMPLATE_VERSION_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *TemplateVersionClient) List(opts *ListOpts) (*TemplateVersionCollection, error) {
+ resp := &TemplateVersionCollection{}
+ err := c.rancherClient.doList(TEMPLATE_VERSION_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *TemplateVersionCollection) Next() (*TemplateVersionCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &TemplateVersionCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *TemplateVersionClient) ById(id string) (*TemplateVersion, error) {
+ resp := &TemplateVersion{}
+ err := c.rancherClient.doById(TEMPLATE_VERSION_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *TemplateVersionClient) Delete(container *TemplateVersion) error {
+ return c.rancherClient.doResourceDelete(TEMPLATE_VERSION_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/catalog/schemas.go b/vendor/github.com/rancher/go-rancher/catalog/schemas.go
new file mode 100644
index 00000000..24c125b5
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/catalog/schemas.go
@@ -0,0 +1,131 @@
+package catalog
+
+import (
+ "reflect"
+ "strings"
+)
+
+type Schemas struct {
+ Collection
+ Data []Schema `json:"data,omitempty"`
+ schemasByName map[string]*Schema
+}
+
+func (s *Schema) CheckField(name string) (Field, bool) {
+ for fieldName := range s.ResourceFields {
+ if fieldName == name {
+ v, ok := s.ResourceFields[fieldName]
+ return v, ok
+ }
+ }
+ return Field{}, false
+}
+
+func (s *Schema) Field(name string) Field {
+ f, _ := s.CheckField(name)
+ return f
+}
+
+func (s *Schemas) CheckSchema(name string) (Schema, bool) {
+ for i := range s.Data {
+ if s.Data[i].Id == name {
+ return s.Data[i], true
+ }
+ }
+ return Schema{}, false
+}
+
+func (s *Schemas) Schema(name string) Schema {
+ r, _ := s.CheckSchema(name)
+ return r
+}
+
+func typeToFields(t reflect.Type) map[string]Field {
+ result := map[string]Field{}
+
+ for i := 0; i < t.NumField(); i++ {
+ schemaField := Field{}
+
+ typeField := t.Field(i)
+ if typeField.Anonymous && typeField.Type.Kind() == reflect.Struct {
+ parentFields := typeToFields(typeField.Type)
+ for k, v := range result {
+ parentFields[k] = v
+ }
+ result = parentFields
+ continue
+ } else if typeField.Anonymous {
+ continue
+ } else if privateFieldRegex.FindStringIndex(typeField.Name) != nil {
+ continue
+ }
+
+ fieldString := strings.ToLower(typeField.Type.Kind().String())
+
+ switch {
+ case strings.HasPrefix(fieldString, "int") || strings.HasPrefix(fieldString, "uint"):
+ schemaField.Type = "int"
+ case fieldString == "bool":
+ schemaField.Type = fieldString
+ case fieldString == "float32" || fieldString == "float64":
+ schemaField.Type = "float"
+ case fieldString == "string":
+ schemaField.Type = "string"
+ case fieldString == "map":
+ // HACK
+ schemaField.Type = "map[string]"
+ case fieldString == "slice":
+ // HACK
+ schemaField.Type = "array[string]"
+ }
+
+ name := strings.Split(typeField.Tag.Get("json"), ",")[0]
+ if name == "" && len(typeField.Name) > 1 {
+ name = strings.ToLower(typeField.Name[0:1]) + typeField.Name[1:]
+ } else if name == "" {
+ name = typeField.Name
+ }
+
+ if schemaField.Type != "" {
+ result[name] = schemaField
+ }
+ }
+
+ return result
+}
+
+func (s *Schemas) AddType(schemaName string, obj interface{}) *Schema {
+ t := reflect.TypeOf(obj)
+ schema := Schema{
+ Resource: Resource{
+ Id: schemaName,
+ Type: "schema",
+ Links: map[string]string{},
+ },
+ PluralName: guessPluralName(schemaName),
+ ResourceFields: typeToFields(t),
+ CollectionMethods: []string{"GET"},
+ ResourceMethods: []string{"GET"},
+ }
+
+ if s.Data == nil {
+ s.Data = []Schema{}
+ }
+
+ s.Data = append(s.Data, schema)
+
+ return &s.Data[len(s.Data)-1]
+}
+
+func guessPluralName(name string) string {
+ if name == "" {
+ return ""
+ }
+
+ if strings.HasSuffix(name, "s") ||
+ strings.HasSuffix(name, "ch") ||
+ strings.HasSuffix(name, "x") {
+ return name + "es"
+ }
+ return name + "s"
+}
diff --git a/vendor/github.com/rancher/go-rancher/catalog/types.go b/vendor/github.com/rancher/go-rancher/catalog/types.go
new file mode 100644
index 00000000..dce7bdaa
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/catalog/types.go
@@ -0,0 +1,95 @@
+package catalog
+
+type Collection struct {
+ Type string `json:"type,omitempty"`
+ ResourceType string `json:"resourceType,omitempty"`
+ Links map[string]string `json:"links,omitempty"`
+ CreateTypes map[string]string `json:"createTypes,omitempty"`
+ Actions map[string]string `json:"actions,omitempty"`
+ SortLinks map[string]string `json:"sortLinks,omitempty"`
+ Pagination *Pagination `json:"pagination,omitempty"`
+ Sort *Sort `json:"sort,omitempty"`
+ Filters map[string][]Condition `json:"filters,omitempty"`
+}
+
+type GenericCollection struct {
+ Collection
+ Data []interface{} `json:"data,omitempty"`
+}
+
+type ResourceCollection struct {
+ Collection
+ Data []Resource `json:"data,omitempty"`
+}
+
+type Sort struct {
+ Name string `json:"name,omitempty"`
+ Order string `json:"order,omitempty"`
+ Reverse string `json:"reverse,omitempty"`
+}
+
+type Condition struct {
+ Modifier string `json:"modifier,omitempty"`
+ Value interface{} `json:"value,omitempty"`
+}
+
+type Pagination struct {
+ Marker string `json:"marker,omitempty"`
+ First string `json:"first,omitempty"`
+ Previous string `json:"previous,omitempty"`
+ Next string `json:"next,omitempty"`
+ Limit *int64 `json:"limit,omitempty"`
+ Total *int64 `json:"total,omitempty"`
+ Partial bool `json:"partial,omitempty"`
+}
+
+type Resource struct {
+ Id string `json:"id,omitempty"`
+ Type string `json:"type,omitempty"`
+ Links map[string]string `json:"links"`
+ Actions map[string]string `json:"actions"`
+}
+
+type Schema struct {
+ Resource
+ PluralName string `json:"pluralName,omitempty"`
+ ResourceMethods []string `json:"resourceMethods,omitempty"`
+ ResourceFields map[string]Field `json:"resourceFields,omitempty"`
+ ResourceActions map[string]Action `json:"resourceActions,omitempty"`
+ CollectionMethods []string `json:"collectionMethods,omitempty"`
+ CollectionFields map[string]Field `json:"collectionFields,omitempty"`
+ CollectionActions map[string]Action `json:"collectionActions,omitempty"`
+ CollectionFilters map[string]Filter `json:"collectionFilters,omitempty"`
+ IncludeableLinks []string `json:"includeableLinks,omitempty"`
+}
+
+type Field struct {
+ Type string `json:"type,omitempty"`
+ Default interface{} `json:"default,omitempty"`
+ Unique bool `json:"unique,omitempty"`
+ Nullable bool `json:"nullable,omitempty"`
+ Create bool `json:"create,omitempty"`
+ Required bool `json:"required,omitempty"`
+ Update bool `json:"update,omitempty"`
+ MinLength *int64 `json:"minLength,omitempty"`
+ MaxLength *int64 `json:"maxLength,omitempty"`
+ Min *int64 `json:"min,omitempty"`
+ Max *int64 `json:"max,omitempty"`
+ Options []string `json:"options,omitempty"`
+ ValidChars string `json:"validChars,omitempty"`
+ InvalidChars string `json:"invalidChars,omitempty"`
+ Description string `json:"description,omitempty"`
+}
+
+type Action struct {
+ Input string `json:"input,omitempty"`
+ Output string `json:"output,omitempty"`
+}
+
+type Filter struct {
+ Modifiers []string `json:"modifiers,omitempty"`
+}
+
+type ListOpts struct {
+ Filters map[string]interface{}
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/client.go b/vendor/github.com/rancher/go-rancher/client/client.go
new file mode 100644
index 00000000..6d943ce0
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/client.go
@@ -0,0 +1,36 @@
+package client
+
+import (
+ "net/http"
+
+ "github.com/gorilla/websocket"
+)
+
+type RancherBaseClientImpl struct {
+ Opts *ClientOpts
+ Schemas *Schemas
+ Types map[string]Schema
+}
+
+type RancherBaseClient interface {
+ Websocket(string, map[string][]string) (*websocket.Conn, *http.Response, error)
+ List(string, *ListOpts, interface{}) error
+ Post(string, interface{}, interface{}) error
+ GetLink(Resource, string, interface{}) error
+ Create(string, interface{}, interface{}) error
+ Update(string, *Resource, interface{}, interface{}) error
+ ById(string, string, interface{}) error
+ Delete(*Resource) error
+ Reload(*Resource, interface{}) error
+ Action(string, string, *Resource, interface{}, interface{}) error
+
+ doGet(string, *ListOpts, interface{}) error
+ doList(string, *ListOpts, interface{}) error
+ doNext(string, interface{}) error
+ doModify(string, string, interface{}, interface{}) error
+ doCreate(string, interface{}, interface{}) error
+ doUpdate(string, *Resource, interface{}, interface{}) error
+ doById(string, string, interface{}) error
+ doResourceDelete(string, *Resource) error
+ doAction(string, string, *Resource, interface{}, interface{}) error
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/common.go b/vendor/github.com/rancher/go-rancher/client/common.go
new file mode 100644
index 00000000..98be33aa
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/common.go
@@ -0,0 +1,575 @@
+package client
+
+import (
+ "bytes"
+ "encoding/json"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "os"
+ "regexp"
+ "time"
+
+ "github.com/gorilla/websocket"
+ "github.com/pkg/errors"
+)
+
+const (
+ SELF = "self"
+ COLLECTION = "collection"
+)
+
+var (
+ debug = false
+ dialer = &websocket.Dialer{}
+ privateFieldRegex = regexp.MustCompile("^[[:lower:]]")
+)
+
+type ClientOpts struct {
+ Url string
+ AccessKey string
+ SecretKey string
+ Timeout time.Duration
+}
+
+type ApiError struct {
+ StatusCode int
+ Url string
+ Msg string
+ Status string
+ Body string
+}
+
+func (e *ApiError) Error() string {
+ return e.Msg
+}
+
+func IsNotFound(err error) bool {
+ apiError, ok := err.(*ApiError)
+ if !ok {
+ return false
+ }
+
+ return apiError.StatusCode == http.StatusNotFound
+}
+
+func newApiError(resp *http.Response, url string) *ApiError {
+ contents, err := ioutil.ReadAll(resp.Body)
+ var body string
+ if err != nil {
+ body = "Unreadable body."
+ } else {
+ body = string(contents)
+ }
+
+ data := map[string]interface{}{}
+ if json.Unmarshal(contents, &data) == nil {
+ delete(data, "id")
+ delete(data, "links")
+ delete(data, "actions")
+ delete(data, "type")
+ delete(data, "status")
+ buf := &bytes.Buffer{}
+ for k, v := range data {
+ if v == nil {
+ continue
+ }
+ if buf.Len() > 0 {
+ buf.WriteString(", ")
+ }
+ fmt.Fprintf(buf, "%s=%v", k, v)
+ }
+ body = buf.String()
+ }
+ formattedMsg := fmt.Sprintf("Bad response statusCode [%d]. Status [%s]. Body: [%s] from [%s]",
+ resp.StatusCode, resp.Status, body, url)
+ return &ApiError{
+ Url: url,
+ Msg: formattedMsg,
+ StatusCode: resp.StatusCode,
+ Status: resp.Status,
+ Body: body,
+ }
+}
+
+func contains(array []string, item string) bool {
+ for _, check := range array {
+ if check == item {
+ return true
+ }
+ }
+
+ return false
+}
+
+func appendFilters(urlString string, filters map[string]interface{}) (string, error) {
+ if len(filters) == 0 {
+ return urlString, nil
+ }
+
+ u, err := url.Parse(urlString)
+ if err != nil {
+ return "", err
+ }
+
+ q := u.Query()
+ for k, v := range filters {
+ if l, ok := v.([]string); ok {
+ for _, v := range l {
+ q.Add(k, v)
+ }
+ } else {
+ q.Add(k, fmt.Sprintf("%v", v))
+ }
+ }
+
+ u.RawQuery = q.Encode()
+ return u.String(), nil
+}
+
+func setupRancherBaseClient(rancherClient *RancherBaseClientImpl, opts *ClientOpts) error {
+ if opts.Timeout == 0 {
+ opts.Timeout = time.Second * 10
+ }
+ client := &http.Client{Timeout: opts.Timeout}
+ req, err := http.NewRequest("GET", opts.Url, nil)
+ if err != nil {
+ return err
+ }
+
+ req.SetBasicAuth(opts.AccessKey, opts.SecretKey)
+
+ resp, err := client.Do(req)
+ if err != nil {
+ return err
+ }
+
+ defer resp.Body.Close()
+
+ if resp.StatusCode != 200 {
+ return newApiError(resp, opts.Url)
+ }
+
+ schemasUrls := resp.Header.Get("X-API-Schemas")
+ if len(schemasUrls) == 0 {
+ return errors.New("Failed to find schema at [" + opts.Url + "]")
+ }
+
+ if schemasUrls != opts.Url {
+ req, err = http.NewRequest("GET", schemasUrls, nil)
+ req.SetBasicAuth(opts.AccessKey, opts.SecretKey)
+ if err != nil {
+ return err
+ }
+
+ resp, err = client.Do(req)
+ if err != nil {
+ return err
+ }
+
+ defer resp.Body.Close()
+
+ if resp.StatusCode != 200 {
+ return newApiError(resp, opts.Url)
+ }
+ }
+
+ var schemas Schemas
+ bytes, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return err
+ }
+
+ err = json.Unmarshal(bytes, &schemas)
+ if err != nil {
+ return err
+ }
+
+ rancherClient.Opts = opts
+ rancherClient.Schemas = &schemas
+
+ for _, schema := range schemas.Data {
+ rancherClient.Types[schema.Id] = schema
+ }
+
+ return nil
+}
+
+func NewListOpts() *ListOpts {
+ return &ListOpts{
+ Filters: map[string]interface{}{},
+ }
+}
+
+func (rancherClient *RancherBaseClientImpl) setupRequest(req *http.Request) {
+ req.SetBasicAuth(rancherClient.Opts.AccessKey, rancherClient.Opts.SecretKey)
+}
+
+func (rancherClient *RancherBaseClientImpl) newHttpClient() *http.Client {
+ if rancherClient.Opts.Timeout == 0 {
+ rancherClient.Opts.Timeout = time.Second * 10
+ }
+ return &http.Client{Timeout: rancherClient.Opts.Timeout}
+}
+
+func (rancherClient *RancherBaseClientImpl) doDelete(url string) error {
+ client := rancherClient.newHttpClient()
+ req, err := http.NewRequest("DELETE", url, nil)
+ if err != nil {
+ return err
+ }
+
+ rancherClient.setupRequest(req)
+
+ resp, err := client.Do(req)
+ if err != nil {
+ return err
+ }
+ defer resp.Body.Close()
+
+ io.Copy(ioutil.Discard, resp.Body)
+
+ if resp.StatusCode >= 300 {
+ return newApiError(resp, url)
+ }
+
+ return nil
+}
+
+func (rancherClient *RancherBaseClientImpl) Websocket(url string, headers map[string][]string) (*websocket.Conn, *http.Response, error) {
+ return dialer.Dial(url, http.Header(headers))
+}
+
+func (rancherClient *RancherBaseClientImpl) doGet(url string, opts *ListOpts, respObject interface{}) error {
+ if opts == nil {
+ opts = NewListOpts()
+ }
+ url, err := appendFilters(url, opts.Filters)
+ if err != nil {
+ return err
+ }
+
+ if debug {
+ fmt.Println("GET " + url)
+ }
+
+ client := rancherClient.newHttpClient()
+ req, err := http.NewRequest("GET", url, nil)
+ if err != nil {
+ return err
+ }
+
+ rancherClient.setupRequest(req)
+
+ resp, err := client.Do(req)
+ if err != nil {
+ return err
+ }
+
+ defer resp.Body.Close()
+
+ if resp.StatusCode != 200 {
+ return newApiError(resp, url)
+ }
+
+ byteContent, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return err
+ }
+
+ if debug {
+ fmt.Println("Response <= " + string(byteContent))
+ }
+
+ if err := json.Unmarshal(byteContent, respObject); err != nil {
+ return errors.Wrap(err, fmt.Sprintf("Failed to parse: %s", byteContent))
+ }
+
+ return nil
+}
+
+func (rancherClient *RancherBaseClientImpl) List(schemaType string, opts *ListOpts, respObject interface{}) error {
+ return rancherClient.doList(schemaType, opts, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) doList(schemaType string, opts *ListOpts, respObject interface{}) error {
+ schema, ok := rancherClient.Types[schemaType]
+ if !ok {
+ return errors.New("Unknown schema type [" + schemaType + "]")
+ }
+
+ if !contains(schema.CollectionMethods, "GET") {
+ return errors.New("Resource type [" + schemaType + "] is not listable")
+ }
+
+ collectionUrl, ok := schema.Links[COLLECTION]
+ if !ok {
+ return errors.New("Failed to find collection URL for [" + schemaType + "]")
+ }
+
+ return rancherClient.doGet(collectionUrl, opts, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) doNext(nextUrl string, respObject interface{}) error {
+ return rancherClient.doGet(nextUrl, nil, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) Post(url string, createObj interface{}, respObject interface{}) error {
+ return rancherClient.doModify("POST", url, createObj, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) GetLink(resource Resource, link string, respObject interface{}) error {
+ url := resource.Links[link]
+ if url == "" {
+ return fmt.Errorf("Failed to find link: %s", link)
+ }
+
+ return rancherClient.doGet(url, &ListOpts{}, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) doModify(method string, url string, createObj interface{}, respObject interface{}) error {
+ bodyContent, err := json.Marshal(createObj)
+ if err != nil {
+ return err
+ }
+
+ if debug {
+ fmt.Println(method + " " + url)
+ fmt.Println("Request => " + string(bodyContent))
+ }
+
+ client := rancherClient.newHttpClient()
+ req, err := http.NewRequest(method, url, bytes.NewBuffer(bodyContent))
+ if err != nil {
+ return err
+ }
+
+ rancherClient.setupRequest(req)
+ req.Header.Set("Content-Type", "application/json")
+
+ resp, err := client.Do(req)
+ if err != nil {
+ return err
+ }
+
+ defer resp.Body.Close()
+
+ if resp.StatusCode >= 300 {
+ return newApiError(resp, url)
+ }
+
+ byteContent, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return err
+ }
+
+ if len(byteContent) > 0 {
+ if debug {
+ fmt.Println("Response <= " + string(byteContent))
+ }
+ return json.Unmarshal(byteContent, respObject)
+ }
+
+ return nil
+}
+
+func (rancherClient *RancherBaseClientImpl) Create(schemaType string, createObj interface{}, respObject interface{}) error {
+ return rancherClient.doCreate(schemaType, createObj, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) doCreate(schemaType string, createObj interface{}, respObject interface{}) error {
+ if createObj == nil {
+ createObj = map[string]string{}
+ }
+ if respObject == nil {
+ respObject = &map[string]interface{}{}
+ }
+ schema, ok := rancherClient.Types[schemaType]
+ if !ok {
+ return errors.New("Unknown schema type [" + schemaType + "]")
+ }
+
+ if !contains(schema.CollectionMethods, "POST") {
+ return errors.New("Resource type [" + schemaType + "] is not creatable")
+ }
+
+ var collectionUrl string
+ collectionUrl, ok = schema.Links[COLLECTION]
+ if !ok {
+ // return errors.New("Failed to find collection URL for [" + schemaType + "]")
+ // This is a hack to address https://github.com/rancher/cattle/issues/254
+ re := regexp.MustCompile("schemas.*")
+ collectionUrl = re.ReplaceAllString(schema.Links[SELF], schema.PluralName)
+ }
+
+ return rancherClient.doModify("POST", collectionUrl, createObj, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) Update(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error {
+ return rancherClient.doUpdate(schemaType, existing, updates, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) doUpdate(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error {
+ if existing == nil {
+ return errors.New("Existing object is nil")
+ }
+
+ selfUrl, ok := existing.Links[SELF]
+ if !ok {
+ return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing))
+ }
+
+ if updates == nil {
+ updates = map[string]string{}
+ }
+
+ if respObject == nil {
+ respObject = &map[string]interface{}{}
+ }
+
+ schema, ok := rancherClient.Types[schemaType]
+ if !ok {
+ return errors.New("Unknown schema type [" + schemaType + "]")
+ }
+
+ if !contains(schema.ResourceMethods, "PUT") {
+ return errors.New("Resource type [" + schemaType + "] is not updatable")
+ }
+
+ return rancherClient.doModify("PUT", selfUrl, updates, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) ById(schemaType string, id string, respObject interface{}) error {
+ return rancherClient.doById(schemaType, id, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) doById(schemaType string, id string, respObject interface{}) error {
+ schema, ok := rancherClient.Types[schemaType]
+ if !ok {
+ return errors.New("Unknown schema type [" + schemaType + "]")
+ }
+
+ if !contains(schema.ResourceMethods, "GET") {
+ return errors.New("Resource type [" + schemaType + "] can not be looked up by ID")
+ }
+
+ collectionUrl, ok := schema.Links[COLLECTION]
+ if !ok {
+ return errors.New("Failed to find collection URL for [" + schemaType + "]")
+ }
+
+ err := rancherClient.doGet(collectionUrl+"/"+id, nil, respObject)
+ //TODO check for 404 and return nil, nil
+ return err
+}
+
+func (rancherClient *RancherBaseClientImpl) Delete(existing *Resource) error {
+ if existing == nil {
+ return nil
+ }
+ return rancherClient.doResourceDelete(existing.Type, existing)
+}
+
+func (rancherClient *RancherBaseClientImpl) doResourceDelete(schemaType string, existing *Resource) error {
+ schema, ok := rancherClient.Types[schemaType]
+ if !ok {
+ return errors.New("Unknown schema type [" + schemaType + "]")
+ }
+
+ if !contains(schema.ResourceMethods, "DELETE") {
+ return errors.New("Resource type [" + schemaType + "] can not be deleted")
+ }
+
+ selfUrl, ok := existing.Links[SELF]
+ if !ok {
+ return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing))
+ }
+
+ return rancherClient.doDelete(selfUrl)
+}
+
+func (rancherClient *RancherBaseClientImpl) Reload(existing *Resource, output interface{}) error {
+ selfUrl, ok := existing.Links[SELF]
+ if !ok {
+ return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing))
+ }
+
+ return rancherClient.doGet(selfUrl, NewListOpts(), output)
+}
+
+func (rancherClient *RancherBaseClientImpl) Action(schemaType string, action string,
+ existing *Resource, inputObject, respObject interface{}) error {
+ return rancherClient.doAction(schemaType, action, existing, inputObject, respObject)
+}
+
+func (rancherClient *RancherBaseClientImpl) doAction(schemaType string, action string,
+ existing *Resource, inputObject, respObject interface{}) error {
+
+ if existing == nil {
+ return errors.New("Existing object is nil")
+ }
+
+ actionUrl, ok := existing.Actions[action]
+ if !ok {
+ return errors.New(fmt.Sprintf("Action [%v] not available on [%v]", action, existing))
+ }
+
+ _, ok = rancherClient.Types[schemaType]
+ if !ok {
+ return errors.New("Unknown schema type [" + schemaType + "]")
+ }
+
+ var input io.Reader
+
+ if inputObject != nil {
+ bodyContent, err := json.Marshal(inputObject)
+ if err != nil {
+ return err
+ }
+ if debug {
+ fmt.Println("Request => " + string(bodyContent))
+ }
+ input = bytes.NewBuffer(bodyContent)
+ }
+
+ client := rancherClient.newHttpClient()
+ req, err := http.NewRequest("POST", actionUrl, input)
+ if err != nil {
+ return err
+ }
+
+ rancherClient.setupRequest(req)
+ req.Header.Set("Content-Type", "application/json")
+ req.Header.Set("Content-Length", "0")
+
+ resp, err := client.Do(req)
+ if err != nil {
+ return err
+ }
+
+ defer resp.Body.Close()
+
+ if resp.StatusCode >= 300 {
+ return newApiError(resp, actionUrl)
+ }
+
+ byteContent, err := ioutil.ReadAll(resp.Body)
+ if err != nil {
+ return err
+ }
+
+ if debug {
+ fmt.Println("Response <= " + string(byteContent))
+ }
+
+ return json.Unmarshal(byteContent, respObject)
+}
+
+func init() {
+ debug = os.Getenv("RANCHER_CLIENT_DEBUG") == "true"
+ if debug {
+ fmt.Println("Rancher client debug on")
+ }
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_account.go b/vendor/github.com/rancher/go-rancher/client/generated_account.go
new file mode 100644
index 00000000..1697ae0d
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_account.go
@@ -0,0 +1,184 @@
+package client
+
+const (
+ ACCOUNT_TYPE = "account"
+)
+
+type Account struct {
+ Resource
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ ExternalIdType string `json:"externalIdType,omitempty" yaml:"external_id_type,omitempty"`
+
+ Identity string `json:"identity,omitempty" yaml:"identity,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type AccountCollection struct {
+ Collection
+ Data []Account `json:"data,omitempty"`
+ client *AccountClient
+}
+
+type AccountClient struct {
+ rancherClient *RancherClient
+}
+
+type AccountOperations interface {
+ List(opts *ListOpts) (*AccountCollection, error)
+ Create(opts *Account) (*Account, error)
+ Update(existing *Account, updates interface{}) (*Account, error)
+ ById(id string) (*Account, error)
+ Delete(container *Account) error
+
+ ActionActivate(*Account) (*Account, error)
+
+ ActionCreate(*Account) (*Account, error)
+
+ ActionDeactivate(*Account) (*Account, error)
+
+ ActionPurge(*Account) (*Account, error)
+
+ ActionRemove(*Account) (*Account, error)
+
+ ActionRestore(*Account) (*Account, error)
+
+ ActionUpdate(*Account) (*Account, error)
+}
+
+func newAccountClient(rancherClient *RancherClient) *AccountClient {
+ return &AccountClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *AccountClient) Create(container *Account) (*Account, error) {
+ resp := &Account{}
+ err := c.rancherClient.doCreate(ACCOUNT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *AccountClient) Update(existing *Account, updates interface{}) (*Account, error) {
+ resp := &Account{}
+ err := c.rancherClient.doUpdate(ACCOUNT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *AccountClient) List(opts *ListOpts) (*AccountCollection, error) {
+ resp := &AccountCollection{}
+ err := c.rancherClient.doList(ACCOUNT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *AccountCollection) Next() (*AccountCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &AccountCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *AccountClient) ById(id string) (*Account, error) {
+ resp := &Account{}
+ err := c.rancherClient.doById(ACCOUNT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *AccountClient) Delete(container *Account) error {
+ return c.rancherClient.doResourceDelete(ACCOUNT_TYPE, &container.Resource)
+}
+
+func (c *AccountClient) ActionActivate(resource *Account) (*Account, error) {
+
+ resp := &Account{}
+
+ err := c.rancherClient.doAction(ACCOUNT_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *AccountClient) ActionCreate(resource *Account) (*Account, error) {
+
+ resp := &Account{}
+
+ err := c.rancherClient.doAction(ACCOUNT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *AccountClient) ActionDeactivate(resource *Account) (*Account, error) {
+
+ resp := &Account{}
+
+ err := c.rancherClient.doAction(ACCOUNT_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *AccountClient) ActionPurge(resource *Account) (*Account, error) {
+
+ resp := &Account{}
+
+ err := c.rancherClient.doAction(ACCOUNT_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *AccountClient) ActionRemove(resource *Account) (*Account, error) {
+
+ resp := &Account{}
+
+ err := c.rancherClient.doAction(ACCOUNT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *AccountClient) ActionRestore(resource *Account) (*Account, error) {
+
+ resp := &Account{}
+
+ err := c.rancherClient.doAction(ACCOUNT_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *AccountClient) ActionUpdate(resource *Account) (*Account, error) {
+
+ resp := &Account{}
+
+ err := c.rancherClient.doAction(ACCOUNT_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_active_setting.go b/vendor/github.com/rancher/go-rancher/client/generated_active_setting.go
new file mode 100644
index 00000000..b1799a31
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_active_setting.go
@@ -0,0 +1,87 @@
+package client
+
+const (
+ ACTIVE_SETTING_TYPE = "activeSetting"
+)
+
+type ActiveSetting struct {
+ Resource
+
+ ActiveValue interface{} `json:"activeValue,omitempty" yaml:"active_value,omitempty"`
+
+ InDb bool `json:"inDb,omitempty" yaml:"in_db,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Source string `json:"source,omitempty" yaml:"source,omitempty"`
+
+ Value string `json:"value,omitempty" yaml:"value,omitempty"`
+}
+
+type ActiveSettingCollection struct {
+ Collection
+ Data []ActiveSetting `json:"data,omitempty"`
+ client *ActiveSettingClient
+}
+
+type ActiveSettingClient struct {
+ rancherClient *RancherClient
+}
+
+type ActiveSettingOperations interface {
+ List(opts *ListOpts) (*ActiveSettingCollection, error)
+ Create(opts *ActiveSetting) (*ActiveSetting, error)
+ Update(existing *ActiveSetting, updates interface{}) (*ActiveSetting, error)
+ ById(id string) (*ActiveSetting, error)
+ Delete(container *ActiveSetting) error
+}
+
+func newActiveSettingClient(rancherClient *RancherClient) *ActiveSettingClient {
+ return &ActiveSettingClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ActiveSettingClient) Create(container *ActiveSetting) (*ActiveSetting, error) {
+ resp := &ActiveSetting{}
+ err := c.rancherClient.doCreate(ACTIVE_SETTING_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ActiveSettingClient) Update(existing *ActiveSetting, updates interface{}) (*ActiveSetting, error) {
+ resp := &ActiveSetting{}
+ err := c.rancherClient.doUpdate(ACTIVE_SETTING_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ActiveSettingClient) List(opts *ListOpts) (*ActiveSettingCollection, error) {
+ resp := &ActiveSettingCollection{}
+ err := c.rancherClient.doList(ACTIVE_SETTING_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ActiveSettingCollection) Next() (*ActiveSettingCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ActiveSettingCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ActiveSettingClient) ById(id string) (*ActiveSetting, error) {
+ resp := &ActiveSetting{}
+ err := c.rancherClient.doById(ACTIVE_SETTING_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ActiveSettingClient) Delete(container *ActiveSetting) error {
+ return c.rancherClient.doResourceDelete(ACTIVE_SETTING_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_add_outputs_input.go b/vendor/github.com/rancher/go-rancher/client/generated_add_outputs_input.go
new file mode 100644
index 00000000..88bf4a7e
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_add_outputs_input.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ ADD_OUTPUTS_INPUT_TYPE = "addOutputsInput"
+)
+
+type AddOutputsInput struct {
+ Resource
+
+ Outputs map[string]interface{} `json:"outputs,omitempty" yaml:"outputs,omitempty"`
+}
+
+type AddOutputsInputCollection struct {
+ Collection
+ Data []AddOutputsInput `json:"data,omitempty"`
+ client *AddOutputsInputClient
+}
+
+type AddOutputsInputClient struct {
+ rancherClient *RancherClient
+}
+
+type AddOutputsInputOperations interface {
+ List(opts *ListOpts) (*AddOutputsInputCollection, error)
+ Create(opts *AddOutputsInput) (*AddOutputsInput, error)
+ Update(existing *AddOutputsInput, updates interface{}) (*AddOutputsInput, error)
+ ById(id string) (*AddOutputsInput, error)
+ Delete(container *AddOutputsInput) error
+}
+
+func newAddOutputsInputClient(rancherClient *RancherClient) *AddOutputsInputClient {
+ return &AddOutputsInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *AddOutputsInputClient) Create(container *AddOutputsInput) (*AddOutputsInput, error) {
+ resp := &AddOutputsInput{}
+ err := c.rancherClient.doCreate(ADD_OUTPUTS_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *AddOutputsInputClient) Update(existing *AddOutputsInput, updates interface{}) (*AddOutputsInput, error) {
+ resp := &AddOutputsInput{}
+ err := c.rancherClient.doUpdate(ADD_OUTPUTS_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *AddOutputsInputClient) List(opts *ListOpts) (*AddOutputsInputCollection, error) {
+ resp := &AddOutputsInputCollection{}
+ err := c.rancherClient.doList(ADD_OUTPUTS_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *AddOutputsInputCollection) Next() (*AddOutputsInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &AddOutputsInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *AddOutputsInputClient) ById(id string) (*AddOutputsInput, error) {
+ resp := &AddOutputsInput{}
+ err := c.rancherClient.doById(ADD_OUTPUTS_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *AddOutputsInputClient) Delete(container *AddOutputsInput) error {
+ return c.rancherClient.doResourceDelete(ADD_OUTPUTS_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_service_link_input.go b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_service_link_input.go
new file mode 100644
index 00000000..bcffcd35
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_service_link_input.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE = "addRemoveLoadBalancerServiceLinkInput"
+)
+
+type AddRemoveLoadBalancerServiceLinkInput struct {
+ Resource
+
+ ServiceLink LoadBalancerServiceLink `json:"serviceLink,omitempty" yaml:"service_link,omitempty"`
+}
+
+type AddRemoveLoadBalancerServiceLinkInputCollection struct {
+ Collection
+ Data []AddRemoveLoadBalancerServiceLinkInput `json:"data,omitempty"`
+ client *AddRemoveLoadBalancerServiceLinkInputClient
+}
+
+type AddRemoveLoadBalancerServiceLinkInputClient struct {
+ rancherClient *RancherClient
+}
+
+type AddRemoveLoadBalancerServiceLinkInputOperations interface {
+ List(opts *ListOpts) (*AddRemoveLoadBalancerServiceLinkInputCollection, error)
+ Create(opts *AddRemoveLoadBalancerServiceLinkInput) (*AddRemoveLoadBalancerServiceLinkInput, error)
+ Update(existing *AddRemoveLoadBalancerServiceLinkInput, updates interface{}) (*AddRemoveLoadBalancerServiceLinkInput, error)
+ ById(id string) (*AddRemoveLoadBalancerServiceLinkInput, error)
+ Delete(container *AddRemoveLoadBalancerServiceLinkInput) error
+}
+
+func newAddRemoveLoadBalancerServiceLinkInputClient(rancherClient *RancherClient) *AddRemoveLoadBalancerServiceLinkInputClient {
+ return &AddRemoveLoadBalancerServiceLinkInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *AddRemoveLoadBalancerServiceLinkInputClient) Create(container *AddRemoveLoadBalancerServiceLinkInput) (*AddRemoveLoadBalancerServiceLinkInput, error) {
+ resp := &AddRemoveLoadBalancerServiceLinkInput{}
+ err := c.rancherClient.doCreate(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *AddRemoveLoadBalancerServiceLinkInputClient) Update(existing *AddRemoveLoadBalancerServiceLinkInput, updates interface{}) (*AddRemoveLoadBalancerServiceLinkInput, error) {
+ resp := &AddRemoveLoadBalancerServiceLinkInput{}
+ err := c.rancherClient.doUpdate(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *AddRemoveLoadBalancerServiceLinkInputClient) List(opts *ListOpts) (*AddRemoveLoadBalancerServiceLinkInputCollection, error) {
+ resp := &AddRemoveLoadBalancerServiceLinkInputCollection{}
+ err := c.rancherClient.doList(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *AddRemoveLoadBalancerServiceLinkInputCollection) Next() (*AddRemoveLoadBalancerServiceLinkInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &AddRemoveLoadBalancerServiceLinkInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *AddRemoveLoadBalancerServiceLinkInputClient) ById(id string) (*AddRemoveLoadBalancerServiceLinkInput, error) {
+ resp := &AddRemoveLoadBalancerServiceLinkInput{}
+ err := c.rancherClient.doById(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *AddRemoveLoadBalancerServiceLinkInputClient) Delete(container *AddRemoveLoadBalancerServiceLinkInput) error {
+ return c.rancherClient.doResourceDelete(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_add_remove_service_link_input.go b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_service_link_input.go
new file mode 100644
index 00000000..5366b484
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_service_link_input.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ ADD_REMOVE_SERVICE_LINK_INPUT_TYPE = "addRemoveServiceLinkInput"
+)
+
+type AddRemoveServiceLinkInput struct {
+ Resource
+
+ ServiceLink ServiceLink `json:"serviceLink,omitempty" yaml:"service_link,omitempty"`
+}
+
+type AddRemoveServiceLinkInputCollection struct {
+ Collection
+ Data []AddRemoveServiceLinkInput `json:"data,omitempty"`
+ client *AddRemoveServiceLinkInputClient
+}
+
+type AddRemoveServiceLinkInputClient struct {
+ rancherClient *RancherClient
+}
+
+type AddRemoveServiceLinkInputOperations interface {
+ List(opts *ListOpts) (*AddRemoveServiceLinkInputCollection, error)
+ Create(opts *AddRemoveServiceLinkInput) (*AddRemoveServiceLinkInput, error)
+ Update(existing *AddRemoveServiceLinkInput, updates interface{}) (*AddRemoveServiceLinkInput, error)
+ ById(id string) (*AddRemoveServiceLinkInput, error)
+ Delete(container *AddRemoveServiceLinkInput) error
+}
+
+func newAddRemoveServiceLinkInputClient(rancherClient *RancherClient) *AddRemoveServiceLinkInputClient {
+ return &AddRemoveServiceLinkInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *AddRemoveServiceLinkInputClient) Create(container *AddRemoveServiceLinkInput) (*AddRemoveServiceLinkInput, error) {
+ resp := &AddRemoveServiceLinkInput{}
+ err := c.rancherClient.doCreate(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *AddRemoveServiceLinkInputClient) Update(existing *AddRemoveServiceLinkInput, updates interface{}) (*AddRemoveServiceLinkInput, error) {
+ resp := &AddRemoveServiceLinkInput{}
+ err := c.rancherClient.doUpdate(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *AddRemoveServiceLinkInputClient) List(opts *ListOpts) (*AddRemoveServiceLinkInputCollection, error) {
+ resp := &AddRemoveServiceLinkInputCollection{}
+ err := c.rancherClient.doList(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *AddRemoveServiceLinkInputCollection) Next() (*AddRemoveServiceLinkInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &AddRemoveServiceLinkInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *AddRemoveServiceLinkInputClient) ById(id string) (*AddRemoveServiceLinkInput, error) {
+ resp := &AddRemoveServiceLinkInput{}
+ err := c.rancherClient.doById(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *AddRemoveServiceLinkInputClient) Delete(container *AddRemoveServiceLinkInput) error {
+ return c.rancherClient.doResourceDelete(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_agent.go b/vendor/github.com/rancher/go-rancher/client/generated_agent.go
new file mode 100644
index 00000000..3a1f423e
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_agent.go
@@ -0,0 +1,206 @@
+package client
+
+const (
+ AGENT_TYPE = "agent"
+)
+
+type Agent struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ ManagedConfig bool `json:"managedConfig,omitempty" yaml:"managed_config,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uri string `json:"uri,omitempty" yaml:"uri,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type AgentCollection struct {
+ Collection
+ Data []Agent `json:"data,omitempty"`
+ client *AgentClient
+}
+
+type AgentClient struct {
+ rancherClient *RancherClient
+}
+
+type AgentOperations interface {
+ List(opts *ListOpts) (*AgentCollection, error)
+ Create(opts *Agent) (*Agent, error)
+ Update(existing *Agent, updates interface{}) (*Agent, error)
+ ById(id string) (*Agent, error)
+ Delete(container *Agent) error
+
+ ActionActivate(*Agent) (*Agent, error)
+
+ ActionCreate(*Agent) (*Agent, error)
+
+ ActionDeactivate(*Agent) (*Agent, error)
+
+ ActionDisconnect(*Agent) (*Agent, error)
+
+ ActionPurge(*Agent) (*Agent, error)
+
+ ActionReconnect(*Agent) (*Agent, error)
+
+ ActionRemove(*Agent) (*Agent, error)
+
+ ActionRestore(*Agent) (*Agent, error)
+
+ ActionUpdate(*Agent) (*Agent, error)
+}
+
+func newAgentClient(rancherClient *RancherClient) *AgentClient {
+ return &AgentClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *AgentClient) Create(container *Agent) (*Agent, error) {
+ resp := &Agent{}
+ err := c.rancherClient.doCreate(AGENT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *AgentClient) Update(existing *Agent, updates interface{}) (*Agent, error) {
+ resp := &Agent{}
+ err := c.rancherClient.doUpdate(AGENT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *AgentClient) List(opts *ListOpts) (*AgentCollection, error) {
+ resp := &AgentCollection{}
+ err := c.rancherClient.doList(AGENT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *AgentCollection) Next() (*AgentCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &AgentCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *AgentClient) ById(id string) (*Agent, error) {
+ resp := &Agent{}
+ err := c.rancherClient.doById(AGENT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *AgentClient) Delete(container *Agent) error {
+ return c.rancherClient.doResourceDelete(AGENT_TYPE, &container.Resource)
+}
+
+func (c *AgentClient) ActionActivate(resource *Agent) (*Agent, error) {
+
+ resp := &Agent{}
+
+ err := c.rancherClient.doAction(AGENT_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *AgentClient) ActionCreate(resource *Agent) (*Agent, error) {
+
+ resp := &Agent{}
+
+ err := c.rancherClient.doAction(AGENT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *AgentClient) ActionDeactivate(resource *Agent) (*Agent, error) {
+
+ resp := &Agent{}
+
+ err := c.rancherClient.doAction(AGENT_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *AgentClient) ActionDisconnect(resource *Agent) (*Agent, error) {
+
+ resp := &Agent{}
+
+ err := c.rancherClient.doAction(AGENT_TYPE, "disconnect", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *AgentClient) ActionPurge(resource *Agent) (*Agent, error) {
+
+ resp := &Agent{}
+
+ err := c.rancherClient.doAction(AGENT_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *AgentClient) ActionReconnect(resource *Agent) (*Agent, error) {
+
+ resp := &Agent{}
+
+ err := c.rancherClient.doAction(AGENT_TYPE, "reconnect", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *AgentClient) ActionRemove(resource *Agent) (*Agent, error) {
+
+ resp := &Agent{}
+
+ err := c.rancherClient.doAction(AGENT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *AgentClient) ActionRestore(resource *Agent) (*Agent, error) {
+
+ resp := &Agent{}
+
+ err := c.rancherClient.doAction(AGENT_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *AgentClient) ActionUpdate(resource *Agent) (*Agent, error) {
+
+ resp := &Agent{}
+
+ err := c.rancherClient.doAction(AGENT_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_amazonec2config.go b/vendor/github.com/rancher/go-rancher/client/generated_amazonec2config.go
new file mode 100644
index 00000000..2a88ca4e
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_amazonec2config.go
@@ -0,0 +1,127 @@
+package client
+
+const (
+ AMAZONEC2CONFIG_TYPE = "amazonec2Config"
+)
+
+type Amazonec2Config struct {
+ Resource
+
+ AccessKey string `json:"accessKey,omitempty" yaml:"access_key,omitempty"`
+
+ Ami string `json:"ami,omitempty" yaml:"ami,omitempty"`
+
+ DeviceName string `json:"deviceName,omitempty" yaml:"device_name,omitempty"`
+
+ IamInstanceProfile string `json:"iamInstanceProfile,omitempty" yaml:"iam_instance_profile,omitempty"`
+
+ InstanceType string `json:"instanceType,omitempty" yaml:"instance_type,omitempty"`
+
+ KeypairName string `json:"keypairName,omitempty" yaml:"keypair_name,omitempty"`
+
+ Monitoring bool `json:"monitoring,omitempty" yaml:"monitoring,omitempty"`
+
+ PrivateAddressOnly bool `json:"privateAddressOnly,omitempty" yaml:"private_address_only,omitempty"`
+
+ Region string `json:"region,omitempty" yaml:"region,omitempty"`
+
+ RequestSpotInstance bool `json:"requestSpotInstance,omitempty" yaml:"request_spot_instance,omitempty"`
+
+ Retries string `json:"retries,omitempty" yaml:"retries,omitempty"`
+
+ RootSize string `json:"rootSize,omitempty" yaml:"root_size,omitempty"`
+
+ SecretKey string `json:"secretKey,omitempty" yaml:"secret_key,omitempty"`
+
+ SecurityGroup []string `json:"securityGroup,omitempty" yaml:"security_group,omitempty"`
+
+ SessionToken string `json:"sessionToken,omitempty" yaml:"session_token,omitempty"`
+
+ SpotPrice string `json:"spotPrice,omitempty" yaml:"spot_price,omitempty"`
+
+ SshKeypath string `json:"sshKeypath,omitempty" yaml:"ssh_keypath,omitempty"`
+
+ SshUser string `json:"sshUser,omitempty" yaml:"ssh_user,omitempty"`
+
+ SubnetId string `json:"subnetId,omitempty" yaml:"subnet_id,omitempty"`
+
+ Tags string `json:"tags,omitempty" yaml:"tags,omitempty"`
+
+ UseEbsOptimizedInstance bool `json:"useEbsOptimizedInstance,omitempty" yaml:"use_ebs_optimized_instance,omitempty"`
+
+ UsePrivateAddress bool `json:"usePrivateAddress,omitempty" yaml:"use_private_address,omitempty"`
+
+ VolumeType string `json:"volumeType,omitempty" yaml:"volume_type,omitempty"`
+
+ VpcId string `json:"vpcId,omitempty" yaml:"vpc_id,omitempty"`
+
+ Zone string `json:"zone,omitempty" yaml:"zone,omitempty"`
+}
+
+type Amazonec2ConfigCollection struct {
+ Collection
+ Data []Amazonec2Config `json:"data,omitempty"`
+ client *Amazonec2ConfigClient
+}
+
+type Amazonec2ConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type Amazonec2ConfigOperations interface {
+ List(opts *ListOpts) (*Amazonec2ConfigCollection, error)
+ Create(opts *Amazonec2Config) (*Amazonec2Config, error)
+ Update(existing *Amazonec2Config, updates interface{}) (*Amazonec2Config, error)
+ ById(id string) (*Amazonec2Config, error)
+ Delete(container *Amazonec2Config) error
+}
+
+func newAmazonec2ConfigClient(rancherClient *RancherClient) *Amazonec2ConfigClient {
+ return &Amazonec2ConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *Amazonec2ConfigClient) Create(container *Amazonec2Config) (*Amazonec2Config, error) {
+ resp := &Amazonec2Config{}
+ err := c.rancherClient.doCreate(AMAZONEC2CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *Amazonec2ConfigClient) Update(existing *Amazonec2Config, updates interface{}) (*Amazonec2Config, error) {
+ resp := &Amazonec2Config{}
+ err := c.rancherClient.doUpdate(AMAZONEC2CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *Amazonec2ConfigClient) List(opts *ListOpts) (*Amazonec2ConfigCollection, error) {
+ resp := &Amazonec2ConfigCollection{}
+ err := c.rancherClient.doList(AMAZONEC2CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *Amazonec2ConfigCollection) Next() (*Amazonec2ConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &Amazonec2ConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *Amazonec2ConfigClient) ById(id string) (*Amazonec2Config, error) {
+ resp := &Amazonec2Config{}
+ err := c.rancherClient.doById(AMAZONEC2CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *Amazonec2ConfigClient) Delete(container *Amazonec2Config) error {
+ return c.rancherClient.doResourceDelete(AMAZONEC2CONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_api_key.go b/vendor/github.com/rancher/go-rancher/client/generated_api_key.go
new file mode 100644
index 00000000..91dc09dc
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_api_key.go
@@ -0,0 +1,173 @@
+package client
+
+const (
+ API_KEY_TYPE = "apiKey"
+)
+
+type ApiKey struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ PublicValue string `json:"publicValue,omitempty" yaml:"public_value,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ SecretValue string `json:"secretValue,omitempty" yaml:"secret_value,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ApiKeyCollection struct {
+ Collection
+ Data []ApiKey `json:"data,omitempty"`
+ client *ApiKeyClient
+}
+
+type ApiKeyClient struct {
+ rancherClient *RancherClient
+}
+
+type ApiKeyOperations interface {
+ List(opts *ListOpts) (*ApiKeyCollection, error)
+ Create(opts *ApiKey) (*ApiKey, error)
+ Update(existing *ApiKey, updates interface{}) (*ApiKey, error)
+ ById(id string) (*ApiKey, error)
+ Delete(container *ApiKey) error
+
+ ActionActivate(*ApiKey) (*Credential, error)
+
+ ActionCreate(*ApiKey) (*Credential, error)
+
+ ActionDeactivate(*ApiKey) (*Credential, error)
+
+ ActionPurge(*ApiKey) (*Credential, error)
+
+ ActionRemove(*ApiKey) (*Credential, error)
+
+ ActionUpdate(*ApiKey) (*Credential, error)
+}
+
+func newApiKeyClient(rancherClient *RancherClient) *ApiKeyClient {
+ return &ApiKeyClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ApiKeyClient) Create(container *ApiKey) (*ApiKey, error) {
+ resp := &ApiKey{}
+ err := c.rancherClient.doCreate(API_KEY_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ApiKeyClient) Update(existing *ApiKey, updates interface{}) (*ApiKey, error) {
+ resp := &ApiKey{}
+ err := c.rancherClient.doUpdate(API_KEY_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ApiKeyClient) List(opts *ListOpts) (*ApiKeyCollection, error) {
+ resp := &ApiKeyCollection{}
+ err := c.rancherClient.doList(API_KEY_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ApiKeyCollection) Next() (*ApiKeyCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ApiKeyCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ApiKeyClient) ById(id string) (*ApiKey, error) {
+ resp := &ApiKey{}
+ err := c.rancherClient.doById(API_KEY_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ApiKeyClient) Delete(container *ApiKey) error {
+ return c.rancherClient.doResourceDelete(API_KEY_TYPE, &container.Resource)
+}
+
+func (c *ApiKeyClient) ActionActivate(resource *ApiKey) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(API_KEY_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ApiKeyClient) ActionCreate(resource *ApiKey) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(API_KEY_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ApiKeyClient) ActionDeactivate(resource *ApiKey) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(API_KEY_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ApiKeyClient) ActionPurge(resource *ApiKey) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(API_KEY_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ApiKeyClient) ActionRemove(resource *ApiKey) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(API_KEY_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ApiKeyClient) ActionUpdate(resource *ApiKey) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(API_KEY_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_audit_log.go b/vendor/github.com/rancher/go-rancher/client/generated_audit_log.go
new file mode 100644
index 00000000..1c9d4ae0
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_audit_log.go
@@ -0,0 +1,105 @@
+package client
+
+const (
+ AUDIT_LOG_TYPE = "auditLog"
+)
+
+type AuditLog struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ AuthType string `json:"authType,omitempty" yaml:"auth_type,omitempty"`
+
+ AuthenticatedAsAccountId string `json:"authenticatedAsAccountId,omitempty" yaml:"authenticated_as_account_id,omitempty"`
+
+ AuthenticatedAsIdentityId string `json:"authenticatedAsIdentityId,omitempty" yaml:"authenticated_as_identity_id,omitempty"`
+
+ ClientIp string `json:"clientIp,omitempty" yaml:"client_ip,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ RequestObject string `json:"requestObject,omitempty" yaml:"request_object,omitempty"`
+
+ ResourceId int64 `json:"resourceId,omitempty" yaml:"resource_id,omitempty"`
+
+ ResourceType string `json:"resourceType,omitempty" yaml:"resource_type,omitempty"`
+
+ ResponseCode string `json:"responseCode,omitempty" yaml:"response_code,omitempty"`
+
+ ResponseObject string `json:"responseObject,omitempty" yaml:"response_object,omitempty"`
+}
+
+type AuditLogCollection struct {
+ Collection
+ Data []AuditLog `json:"data,omitempty"`
+ client *AuditLogClient
+}
+
+type AuditLogClient struct {
+ rancherClient *RancherClient
+}
+
+type AuditLogOperations interface {
+ List(opts *ListOpts) (*AuditLogCollection, error)
+ Create(opts *AuditLog) (*AuditLog, error)
+ Update(existing *AuditLog, updates interface{}) (*AuditLog, error)
+ ById(id string) (*AuditLog, error)
+ Delete(container *AuditLog) error
+}
+
+func newAuditLogClient(rancherClient *RancherClient) *AuditLogClient {
+ return &AuditLogClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *AuditLogClient) Create(container *AuditLog) (*AuditLog, error) {
+ resp := &AuditLog{}
+ err := c.rancherClient.doCreate(AUDIT_LOG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *AuditLogClient) Update(existing *AuditLog, updates interface{}) (*AuditLog, error) {
+ resp := &AuditLog{}
+ err := c.rancherClient.doUpdate(AUDIT_LOG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *AuditLogClient) List(opts *ListOpts) (*AuditLogCollection, error) {
+ resp := &AuditLogCollection{}
+ err := c.rancherClient.doList(AUDIT_LOG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *AuditLogCollection) Next() (*AuditLogCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &AuditLogCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *AuditLogClient) ById(id string) (*AuditLog, error) {
+ resp := &AuditLog{}
+ err := c.rancherClient.doById(AUDIT_LOG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *AuditLogClient) Delete(container *AuditLog) error {
+ return c.rancherClient.doResourceDelete(AUDIT_LOG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_azure_config.go b/vendor/github.com/rancher/go-rancher/client/generated_azure_config.go
new file mode 100644
index 00000000..14868d7e
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_azure_config.go
@@ -0,0 +1,119 @@
+package client
+
+const (
+ AZURE_CONFIG_TYPE = "azureConfig"
+)
+
+type AzureConfig struct {
+ Resource
+
+ AvailabilitySet string `json:"availabilitySet,omitempty" yaml:"availability_set,omitempty"`
+
+ ClientId string `json:"clientId,omitempty" yaml:"client_id,omitempty"`
+
+ ClientSecret string `json:"clientSecret,omitempty" yaml:"client_secret,omitempty"`
+
+ CustomData string `json:"customData,omitempty" yaml:"custom_data,omitempty"`
+
+ DockerPort string `json:"dockerPort,omitempty" yaml:"docker_port,omitempty"`
+
+ Environment string `json:"environment,omitempty" yaml:"environment,omitempty"`
+
+ Image string `json:"image,omitempty" yaml:"image,omitempty"`
+
+ Location string `json:"location,omitempty" yaml:"location,omitempty"`
+
+ NoPublicIp bool `json:"noPublicIp,omitempty" yaml:"no_public_ip,omitempty"`
+
+ OpenPort []string `json:"openPort,omitempty" yaml:"open_port,omitempty"`
+
+ PrivateIpAddress string `json:"privateIpAddress,omitempty" yaml:"private_ip_address,omitempty"`
+
+ ResourceGroup string `json:"resourceGroup,omitempty" yaml:"resource_group,omitempty"`
+
+ Size string `json:"size,omitempty" yaml:"size,omitempty"`
+
+ SshUser string `json:"sshUser,omitempty" yaml:"ssh_user,omitempty"`
+
+ StaticPublicIp bool `json:"staticPublicIp,omitempty" yaml:"static_public_ip,omitempty"`
+
+ StorageType string `json:"storageType,omitempty" yaml:"storage_type,omitempty"`
+
+ Subnet string `json:"subnet,omitempty" yaml:"subnet,omitempty"`
+
+ SubnetPrefix string `json:"subnetPrefix,omitempty" yaml:"subnet_prefix,omitempty"`
+
+ SubscriptionId string `json:"subscriptionId,omitempty" yaml:"subscription_id,omitempty"`
+
+ UsePrivateIp bool `json:"usePrivateIp,omitempty" yaml:"use_private_ip,omitempty"`
+
+ Vnet string `json:"vnet,omitempty" yaml:"vnet,omitempty"`
+}
+
+type AzureConfigCollection struct {
+ Collection
+ Data []AzureConfig `json:"data,omitempty"`
+ client *AzureConfigClient
+}
+
+type AzureConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type AzureConfigOperations interface {
+ List(opts *ListOpts) (*AzureConfigCollection, error)
+ Create(opts *AzureConfig) (*AzureConfig, error)
+ Update(existing *AzureConfig, updates interface{}) (*AzureConfig, error)
+ ById(id string) (*AzureConfig, error)
+ Delete(container *AzureConfig) error
+}
+
+func newAzureConfigClient(rancherClient *RancherClient) *AzureConfigClient {
+ return &AzureConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *AzureConfigClient) Create(container *AzureConfig) (*AzureConfig, error) {
+ resp := &AzureConfig{}
+ err := c.rancherClient.doCreate(AZURE_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *AzureConfigClient) Update(existing *AzureConfig, updates interface{}) (*AzureConfig, error) {
+ resp := &AzureConfig{}
+ err := c.rancherClient.doUpdate(AZURE_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *AzureConfigClient) List(opts *ListOpts) (*AzureConfigCollection, error) {
+ resp := &AzureConfigCollection{}
+ err := c.rancherClient.doList(AZURE_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *AzureConfigCollection) Next() (*AzureConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &AzureConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *AzureConfigClient) ById(id string) (*AzureConfig, error) {
+ resp := &AzureConfig{}
+ err := c.rancherClient.doById(AZURE_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *AzureConfigClient) Delete(container *AzureConfig) error {
+ return c.rancherClient.doResourceDelete(AZURE_CONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_azureadconfig.go b/vendor/github.com/rancher/go-rancher/client/generated_azureadconfig.go
new file mode 100644
index 00000000..5b3117fc
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_azureadconfig.go
@@ -0,0 +1,93 @@
+package client
+
+const (
+ AZUREADCONFIG_TYPE = "azureadconfig"
+)
+
+type Azureadconfig struct {
+ Resource
+
+ AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"`
+
+ AdminAccountPassword string `json:"adminAccountPassword,omitempty" yaml:"admin_account_password,omitempty"`
+
+ AdminAccountUsername string `json:"adminAccountUsername,omitempty" yaml:"admin_account_username,omitempty"`
+
+ ClientId string `json:"clientId,omitempty" yaml:"client_id,omitempty"`
+
+ Domain string `json:"domain,omitempty" yaml:"domain,omitempty"`
+
+ Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ TenantId string `json:"tenantId,omitempty" yaml:"tenant_id,omitempty"`
+}
+
+type AzureadconfigCollection struct {
+ Collection
+ Data []Azureadconfig `json:"data,omitempty"`
+ client *AzureadconfigClient
+}
+
+type AzureadconfigClient struct {
+ rancherClient *RancherClient
+}
+
+type AzureadconfigOperations interface {
+ List(opts *ListOpts) (*AzureadconfigCollection, error)
+ Create(opts *Azureadconfig) (*Azureadconfig, error)
+ Update(existing *Azureadconfig, updates interface{}) (*Azureadconfig, error)
+ ById(id string) (*Azureadconfig, error)
+ Delete(container *Azureadconfig) error
+}
+
+func newAzureadconfigClient(rancherClient *RancherClient) *AzureadconfigClient {
+ return &AzureadconfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *AzureadconfigClient) Create(container *Azureadconfig) (*Azureadconfig, error) {
+ resp := &Azureadconfig{}
+ err := c.rancherClient.doCreate(AZUREADCONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *AzureadconfigClient) Update(existing *Azureadconfig, updates interface{}) (*Azureadconfig, error) {
+ resp := &Azureadconfig{}
+ err := c.rancherClient.doUpdate(AZUREADCONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *AzureadconfigClient) List(opts *ListOpts) (*AzureadconfigCollection, error) {
+ resp := &AzureadconfigCollection{}
+ err := c.rancherClient.doList(AZUREADCONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *AzureadconfigCollection) Next() (*AzureadconfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &AzureadconfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *AzureadconfigClient) ById(id string) (*Azureadconfig, error) {
+ resp := &Azureadconfig{}
+ err := c.rancherClient.doById(AZUREADCONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *AzureadconfigClient) Delete(container *Azureadconfig) error {
+ return c.rancherClient.doResourceDelete(AZUREADCONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_backup.go b/vendor/github.com/rancher/go-rancher/client/generated_backup.go
new file mode 100644
index 00000000..755605eb
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_backup.go
@@ -0,0 +1,133 @@
+package client
+
+const (
+ BACKUP_TYPE = "backup"
+)
+
+type Backup struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ BackupTargetId string `json:"backupTargetId,omitempty" yaml:"backup_target_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ SnapshotId string `json:"snapshotId,omitempty" yaml:"snapshot_id,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uri string `json:"uri,omitempty" yaml:"uri,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ VolumeId string `json:"volumeId,omitempty" yaml:"volume_id,omitempty"`
+}
+
+type BackupCollection struct {
+ Collection
+ Data []Backup `json:"data,omitempty"`
+ client *BackupClient
+}
+
+type BackupClient struct {
+ rancherClient *RancherClient
+}
+
+type BackupOperations interface {
+ List(opts *ListOpts) (*BackupCollection, error)
+ Create(opts *Backup) (*Backup, error)
+ Update(existing *Backup, updates interface{}) (*Backup, error)
+ ById(id string) (*Backup, error)
+ Delete(container *Backup) error
+
+ ActionCreate(*Backup) (*Backup, error)
+
+ ActionRemove(*Backup) (*Backup, error)
+}
+
+func newBackupClient(rancherClient *RancherClient) *BackupClient {
+ return &BackupClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *BackupClient) Create(container *Backup) (*Backup, error) {
+ resp := &Backup{}
+ err := c.rancherClient.doCreate(BACKUP_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *BackupClient) Update(existing *Backup, updates interface{}) (*Backup, error) {
+ resp := &Backup{}
+ err := c.rancherClient.doUpdate(BACKUP_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *BackupClient) List(opts *ListOpts) (*BackupCollection, error) {
+ resp := &BackupCollection{}
+ err := c.rancherClient.doList(BACKUP_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *BackupCollection) Next() (*BackupCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &BackupCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *BackupClient) ById(id string) (*Backup, error) {
+ resp := &Backup{}
+ err := c.rancherClient.doById(BACKUP_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *BackupClient) Delete(container *Backup) error {
+ return c.rancherClient.doResourceDelete(BACKUP_TYPE, &container.Resource)
+}
+
+func (c *BackupClient) ActionCreate(resource *Backup) (*Backup, error) {
+
+ resp := &Backup{}
+
+ err := c.rancherClient.doAction(BACKUP_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *BackupClient) ActionRemove(resource *Backup) (*Backup, error) {
+
+ resp := &Backup{}
+
+ err := c.rancherClient.doAction(BACKUP_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_backup_target.go b/vendor/github.com/rancher/go-rancher/client/generated_backup_target.go
new file mode 100644
index 00000000..a00f2bc8
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_backup_target.go
@@ -0,0 +1,127 @@
+package client
+
+const (
+ BACKUP_TARGET_TYPE = "backupTarget"
+)
+
+type BackupTarget struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ NfsConfig *NfsConfig `json:"nfsConfig,omitempty" yaml:"nfs_config,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type BackupTargetCollection struct {
+ Collection
+ Data []BackupTarget `json:"data,omitempty"`
+ client *BackupTargetClient
+}
+
+type BackupTargetClient struct {
+ rancherClient *RancherClient
+}
+
+type BackupTargetOperations interface {
+ List(opts *ListOpts) (*BackupTargetCollection, error)
+ Create(opts *BackupTarget) (*BackupTarget, error)
+ Update(existing *BackupTarget, updates interface{}) (*BackupTarget, error)
+ ById(id string) (*BackupTarget, error)
+ Delete(container *BackupTarget) error
+
+ ActionCreate(*BackupTarget) (*BackupTarget, error)
+
+ ActionRemove(*BackupTarget) (*BackupTarget, error)
+}
+
+func newBackupTargetClient(rancherClient *RancherClient) *BackupTargetClient {
+ return &BackupTargetClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *BackupTargetClient) Create(container *BackupTarget) (*BackupTarget, error) {
+ resp := &BackupTarget{}
+ err := c.rancherClient.doCreate(BACKUP_TARGET_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *BackupTargetClient) Update(existing *BackupTarget, updates interface{}) (*BackupTarget, error) {
+ resp := &BackupTarget{}
+ err := c.rancherClient.doUpdate(BACKUP_TARGET_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *BackupTargetClient) List(opts *ListOpts) (*BackupTargetCollection, error) {
+ resp := &BackupTargetCollection{}
+ err := c.rancherClient.doList(BACKUP_TARGET_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *BackupTargetCollection) Next() (*BackupTargetCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &BackupTargetCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *BackupTargetClient) ById(id string) (*BackupTarget, error) {
+ resp := &BackupTarget{}
+ err := c.rancherClient.doById(BACKUP_TARGET_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *BackupTargetClient) Delete(container *BackupTarget) error {
+ return c.rancherClient.doResourceDelete(BACKUP_TARGET_TYPE, &container.Resource)
+}
+
+func (c *BackupTargetClient) ActionCreate(resource *BackupTarget) (*BackupTarget, error) {
+
+ resp := &BackupTarget{}
+
+ err := c.rancherClient.doAction(BACKUP_TARGET_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *BackupTargetClient) ActionRemove(resource *BackupTarget) (*BackupTarget, error) {
+
+ resp := &BackupTarget{}
+
+ err := c.rancherClient.doAction(BACKUP_TARGET_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_base_machine_config.go b/vendor/github.com/rancher/go-rancher/client/generated_base_machine_config.go
new file mode 100644
index 00000000..0c0112de
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_base_machine_config.go
@@ -0,0 +1,77 @@
+package client
+
+const (
+ BASE_MACHINE_CONFIG_TYPE = "baseMachineConfig"
+)
+
+type BaseMachineConfig struct {
+ Resource
+}
+
+type BaseMachineConfigCollection struct {
+ Collection
+ Data []BaseMachineConfig `json:"data,omitempty"`
+ client *BaseMachineConfigClient
+}
+
+type BaseMachineConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type BaseMachineConfigOperations interface {
+ List(opts *ListOpts) (*BaseMachineConfigCollection, error)
+ Create(opts *BaseMachineConfig) (*BaseMachineConfig, error)
+ Update(existing *BaseMachineConfig, updates interface{}) (*BaseMachineConfig, error)
+ ById(id string) (*BaseMachineConfig, error)
+ Delete(container *BaseMachineConfig) error
+}
+
+func newBaseMachineConfigClient(rancherClient *RancherClient) *BaseMachineConfigClient {
+ return &BaseMachineConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *BaseMachineConfigClient) Create(container *BaseMachineConfig) (*BaseMachineConfig, error) {
+ resp := &BaseMachineConfig{}
+ err := c.rancherClient.doCreate(BASE_MACHINE_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *BaseMachineConfigClient) Update(existing *BaseMachineConfig, updates interface{}) (*BaseMachineConfig, error) {
+ resp := &BaseMachineConfig{}
+ err := c.rancherClient.doUpdate(BASE_MACHINE_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *BaseMachineConfigClient) List(opts *ListOpts) (*BaseMachineConfigCollection, error) {
+ resp := &BaseMachineConfigCollection{}
+ err := c.rancherClient.doList(BASE_MACHINE_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *BaseMachineConfigCollection) Next() (*BaseMachineConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &BaseMachineConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *BaseMachineConfigClient) ById(id string) (*BaseMachineConfig, error) {
+ resp := &BaseMachineConfig{}
+ err := c.rancherClient.doById(BASE_MACHINE_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *BaseMachineConfigClient) Delete(container *BaseMachineConfig) error {
+ return c.rancherClient.doResourceDelete(BASE_MACHINE_CONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_blkio_device_option.go b/vendor/github.com/rancher/go-rancher/client/generated_blkio_device_option.go
new file mode 100644
index 00000000..bc33c7c1
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_blkio_device_option.go
@@ -0,0 +1,87 @@
+package client
+
+const (
+ BLKIO_DEVICE_OPTION_TYPE = "blkioDeviceOption"
+)
+
+type BlkioDeviceOption struct {
+ Resource
+
+ ReadBps int64 `json:"readBps,omitempty" yaml:"read_bps,omitempty"`
+
+ ReadIops int64 `json:"readIops,omitempty" yaml:"read_iops,omitempty"`
+
+ Weight int64 `json:"weight,omitempty" yaml:"weight,omitempty"`
+
+ WriteBps int64 `json:"writeBps,omitempty" yaml:"write_bps,omitempty"`
+
+ WriteIops int64 `json:"writeIops,omitempty" yaml:"write_iops,omitempty"`
+}
+
+type BlkioDeviceOptionCollection struct {
+ Collection
+ Data []BlkioDeviceOption `json:"data,omitempty"`
+ client *BlkioDeviceOptionClient
+}
+
+type BlkioDeviceOptionClient struct {
+ rancherClient *RancherClient
+}
+
+type BlkioDeviceOptionOperations interface {
+ List(opts *ListOpts) (*BlkioDeviceOptionCollection, error)
+ Create(opts *BlkioDeviceOption) (*BlkioDeviceOption, error)
+ Update(existing *BlkioDeviceOption, updates interface{}) (*BlkioDeviceOption, error)
+ ById(id string) (*BlkioDeviceOption, error)
+ Delete(container *BlkioDeviceOption) error
+}
+
+func newBlkioDeviceOptionClient(rancherClient *RancherClient) *BlkioDeviceOptionClient {
+ return &BlkioDeviceOptionClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *BlkioDeviceOptionClient) Create(container *BlkioDeviceOption) (*BlkioDeviceOption, error) {
+ resp := &BlkioDeviceOption{}
+ err := c.rancherClient.doCreate(BLKIO_DEVICE_OPTION_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *BlkioDeviceOptionClient) Update(existing *BlkioDeviceOption, updates interface{}) (*BlkioDeviceOption, error) {
+ resp := &BlkioDeviceOption{}
+ err := c.rancherClient.doUpdate(BLKIO_DEVICE_OPTION_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *BlkioDeviceOptionClient) List(opts *ListOpts) (*BlkioDeviceOptionCollection, error) {
+ resp := &BlkioDeviceOptionCollection{}
+ err := c.rancherClient.doList(BLKIO_DEVICE_OPTION_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *BlkioDeviceOptionCollection) Next() (*BlkioDeviceOptionCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &BlkioDeviceOptionCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *BlkioDeviceOptionClient) ById(id string) (*BlkioDeviceOption, error) {
+ resp := &BlkioDeviceOption{}
+ err := c.rancherClient.doById(BLKIO_DEVICE_OPTION_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *BlkioDeviceOptionClient) Delete(container *BlkioDeviceOption) error {
+ return c.rancherClient.doResourceDelete(BLKIO_DEVICE_OPTION_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_certificate.go b/vendor/github.com/rancher/go-rancher/client/generated_certificate.go
new file mode 100644
index 00000000..fc407e8a
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_certificate.go
@@ -0,0 +1,162 @@
+package client
+
+const (
+ CERTIFICATE_TYPE = "certificate"
+)
+
+type Certificate struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Algorithm string `json:"algorithm,omitempty" yaml:"algorithm,omitempty"`
+
+ CN string `json:"cN,omitempty" yaml:"cn,omitempty"`
+
+ Cert string `json:"cert,omitempty" yaml:"cert,omitempty"`
+
+ CertChain string `json:"certChain,omitempty" yaml:"cert_chain,omitempty"`
+
+ CertFingerprint string `json:"certFingerprint,omitempty" yaml:"cert_fingerprint,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ ExpiresAt string `json:"expiresAt,omitempty" yaml:"expires_at,omitempty"`
+
+ IssuedAt string `json:"issuedAt,omitempty" yaml:"issued_at,omitempty"`
+
+ Issuer string `json:"issuer,omitempty" yaml:"issuer,omitempty"`
+
+ Key string `json:"key,omitempty" yaml:"key,omitempty"`
+
+ KeySize int64 `json:"keySize,omitempty" yaml:"key_size,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ SerialNumber string `json:"serialNumber,omitempty" yaml:"serial_number,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ SubjectAlternativeNames []string `json:"subjectAlternativeNames,omitempty" yaml:"subject_alternative_names,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+}
+
+type CertificateCollection struct {
+ Collection
+ Data []Certificate `json:"data,omitempty"`
+ client *CertificateClient
+}
+
+type CertificateClient struct {
+ rancherClient *RancherClient
+}
+
+type CertificateOperations interface {
+ List(opts *ListOpts) (*CertificateCollection, error)
+ Create(opts *Certificate) (*Certificate, error)
+ Update(existing *Certificate, updates interface{}) (*Certificate, error)
+ ById(id string) (*Certificate, error)
+ Delete(container *Certificate) error
+
+ ActionCreate(*Certificate) (*Certificate, error)
+
+ ActionRemove(*Certificate) (*Certificate, error)
+
+ ActionUpdate(*Certificate) (*Certificate, error)
+}
+
+func newCertificateClient(rancherClient *RancherClient) *CertificateClient {
+ return &CertificateClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *CertificateClient) Create(container *Certificate) (*Certificate, error) {
+ resp := &Certificate{}
+ err := c.rancherClient.doCreate(CERTIFICATE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *CertificateClient) Update(existing *Certificate, updates interface{}) (*Certificate, error) {
+ resp := &Certificate{}
+ err := c.rancherClient.doUpdate(CERTIFICATE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *CertificateClient) List(opts *ListOpts) (*CertificateCollection, error) {
+ resp := &CertificateCollection{}
+ err := c.rancherClient.doList(CERTIFICATE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *CertificateCollection) Next() (*CertificateCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &CertificateCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *CertificateClient) ById(id string) (*Certificate, error) {
+ resp := &Certificate{}
+ err := c.rancherClient.doById(CERTIFICATE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *CertificateClient) Delete(container *Certificate) error {
+ return c.rancherClient.doResourceDelete(CERTIFICATE_TYPE, &container.Resource)
+}
+
+func (c *CertificateClient) ActionCreate(resource *Certificate) (*Certificate, error) {
+
+ resp := &Certificate{}
+
+ err := c.rancherClient.doAction(CERTIFICATE_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *CertificateClient) ActionRemove(resource *Certificate) (*Certificate, error) {
+
+ resp := &Certificate{}
+
+ err := c.rancherClient.doAction(CERTIFICATE_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *CertificateClient) ActionUpdate(resource *Certificate) (*Certificate, error) {
+
+ resp := &Certificate{}
+
+ err := c.rancherClient.doAction(CERTIFICATE_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_change_secret_input.go b/vendor/github.com/rancher/go-rancher/client/generated_change_secret_input.go
new file mode 100644
index 00000000..3f866812
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_change_secret_input.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ CHANGE_SECRET_INPUT_TYPE = "changeSecretInput"
+)
+
+type ChangeSecretInput struct {
+ Resource
+
+ NewSecret string `json:"newSecret,omitempty" yaml:"new_secret,omitempty"`
+
+ OldSecret string `json:"oldSecret,omitempty" yaml:"old_secret,omitempty"`
+}
+
+type ChangeSecretInputCollection struct {
+ Collection
+ Data []ChangeSecretInput `json:"data,omitempty"`
+ client *ChangeSecretInputClient
+}
+
+type ChangeSecretInputClient struct {
+ rancherClient *RancherClient
+}
+
+type ChangeSecretInputOperations interface {
+ List(opts *ListOpts) (*ChangeSecretInputCollection, error)
+ Create(opts *ChangeSecretInput) (*ChangeSecretInput, error)
+ Update(existing *ChangeSecretInput, updates interface{}) (*ChangeSecretInput, error)
+ ById(id string) (*ChangeSecretInput, error)
+ Delete(container *ChangeSecretInput) error
+}
+
+func newChangeSecretInputClient(rancherClient *RancherClient) *ChangeSecretInputClient {
+ return &ChangeSecretInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ChangeSecretInputClient) Create(container *ChangeSecretInput) (*ChangeSecretInput, error) {
+ resp := &ChangeSecretInput{}
+ err := c.rancherClient.doCreate(CHANGE_SECRET_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ChangeSecretInputClient) Update(existing *ChangeSecretInput, updates interface{}) (*ChangeSecretInput, error) {
+ resp := &ChangeSecretInput{}
+ err := c.rancherClient.doUpdate(CHANGE_SECRET_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ChangeSecretInputClient) List(opts *ListOpts) (*ChangeSecretInputCollection, error) {
+ resp := &ChangeSecretInputCollection{}
+ err := c.rancherClient.doList(CHANGE_SECRET_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ChangeSecretInputCollection) Next() (*ChangeSecretInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ChangeSecretInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ChangeSecretInputClient) ById(id string) (*ChangeSecretInput, error) {
+ resp := &ChangeSecretInput{}
+ err := c.rancherClient.doById(CHANGE_SECRET_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ChangeSecretInputClient) Delete(container *ChangeSecretInput) error {
+ return c.rancherClient.doResourceDelete(CHANGE_SECRET_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_client.go b/vendor/github.com/rancher/go-rancher/client/generated_client.go
new file mode 100644
index 00000000..4ce5a496
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_client.go
@@ -0,0 +1,313 @@
+package client
+
+type RancherClient struct {
+ RancherBaseClient
+
+ Account AccountOperations
+ ActiveSetting ActiveSettingOperations
+ AddOutputsInput AddOutputsInputOperations
+ AddRemoveLoadBalancerServiceLinkInput AddRemoveLoadBalancerServiceLinkInputOperations
+ AddRemoveServiceLinkInput AddRemoveServiceLinkInputOperations
+ Agent AgentOperations
+ Amazonec2Config Amazonec2ConfigOperations
+ ApiKey ApiKeyOperations
+ AuditLog AuditLogOperations
+ AzureConfig AzureConfigOperations
+ Azureadconfig AzureadconfigOperations
+ Backup BackupOperations
+ BackupTarget BackupTargetOperations
+ BaseMachineConfig BaseMachineConfigOperations
+ BlkioDeviceOption BlkioDeviceOptionOperations
+ Certificate CertificateOperations
+ ChangeSecretInput ChangeSecretInputOperations
+ ComposeConfig ComposeConfigOperations
+ ComposeConfigInput ComposeConfigInputOperations
+ ComposeProject ComposeProjectOperations
+ ComposeService ComposeServiceOperations
+ ConfigItem ConfigItemOperations
+ ConfigItemStatus ConfigItemStatusOperations
+ Container ContainerOperations
+ ContainerEvent ContainerEventOperations
+ ContainerExec ContainerExecOperations
+ ContainerLogs ContainerLogsOperations
+ ContainerProxy ContainerProxyOperations
+ Credential CredentialOperations
+ Databasechangelog DatabasechangelogOperations
+ Databasechangeloglock DatabasechangeloglockOperations
+ DigitaloceanConfig DigitaloceanConfigOperations
+ DnsService DnsServiceOperations
+ DockerBuild DockerBuildOperations
+ DynamicSchema DynamicSchemaOperations
+ Environment EnvironmentOperations
+ EnvironmentUpgrade EnvironmentUpgradeOperations
+ ExtensionImplementation ExtensionImplementationOperations
+ ExtensionPoint ExtensionPointOperations
+ ExternalDnsEvent ExternalDnsEventOperations
+ ExternalEvent ExternalEventOperations
+ ExternalHandler ExternalHandlerOperations
+ ExternalHandlerExternalHandlerProcessMap ExternalHandlerExternalHandlerProcessMapOperations
+ ExternalHandlerProcess ExternalHandlerProcessOperations
+ ExternalHandlerProcessConfig ExternalHandlerProcessConfigOperations
+ ExternalHostEvent ExternalHostEventOperations
+ ExternalService ExternalServiceOperations
+ ExternalServiceEvent ExternalServiceEventOperations
+ ExternalStoragePoolEvent ExternalStoragePoolEventOperations
+ ExternalVolumeEvent ExternalVolumeEventOperations
+ FieldDocumentation FieldDocumentationOperations
+ Githubconfig GithubconfigOperations
+ HaConfig HaConfigOperations
+ HaConfigInput HaConfigInputOperations
+ HaproxyConfig HaproxyConfigOperations
+ HealthcheckInstanceHostMap HealthcheckInstanceHostMapOperations
+ Host HostOperations
+ HostAccess HostAccessOperations
+ HostApiProxyToken HostApiProxyTokenOperations
+ Identity IdentityOperations
+ Image ImageOperations
+ InServiceUpgradeStrategy InServiceUpgradeStrategyOperations
+ Instance InstanceOperations
+ InstanceConsole InstanceConsoleOperations
+ InstanceConsoleInput InstanceConsoleInputOperations
+ InstanceHealthCheck InstanceHealthCheckOperations
+ InstanceLink InstanceLinkOperations
+ InstanceStop InstanceStopOperations
+ IpAddress IpAddressOperations
+ IpAddressAssociateInput IpAddressAssociateInputOperations
+ KubernetesService KubernetesServiceOperations
+ KubernetesStack KubernetesStackOperations
+ KubernetesStackUpgrade KubernetesStackUpgradeOperations
+ Label LabelOperations
+ LaunchConfig LaunchConfigOperations
+ Ldapconfig LdapconfigOperations
+ LoadBalancerAppCookieStickinessPolicy LoadBalancerAppCookieStickinessPolicyOperations
+ LoadBalancerConfig LoadBalancerConfigOperations
+ LoadBalancerCookieStickinessPolicy LoadBalancerCookieStickinessPolicyOperations
+ LoadBalancerService LoadBalancerServiceOperations
+ LoadBalancerServiceLink LoadBalancerServiceLinkOperations
+ LocalAuthConfig LocalAuthConfigOperations
+ LogConfig LogConfigOperations
+ Machine MachineOperations
+ MachineDriver MachineDriverOperations
+ Mount MountOperations
+ Network NetworkOperations
+ NfsConfig NfsConfigOperations
+ Openldapconfig OpenldapconfigOperations
+ PacketConfig PacketConfigOperations
+ Password PasswordOperations
+ PhysicalHost PhysicalHostOperations
+ Port PortOperations
+ ProcessDefinition ProcessDefinitionOperations
+ ProcessExecution ProcessExecutionOperations
+ ProcessInstance ProcessInstanceOperations
+ Project ProjectOperations
+ ProjectMember ProjectMemberOperations
+ PublicEndpoint PublicEndpointOperations
+ Publish PublishOperations
+ PullTask PullTaskOperations
+ RecreateOnQuorumStrategyConfig RecreateOnQuorumStrategyConfigOperations
+ Register RegisterOperations
+ RegistrationToken RegistrationTokenOperations
+ Registry RegistryOperations
+ RegistryCredential RegistryCredentialOperations
+ ResourceDefinition ResourceDefinitionOperations
+ RestartPolicy RestartPolicyOperations
+ RestoreFromBackupInput RestoreFromBackupInputOperations
+ RevertToSnapshotInput RevertToSnapshotInputOperations
+ RollingRestartStrategy RollingRestartStrategyOperations
+ ScalePolicy ScalePolicyOperations
+ SecondaryLaunchConfig SecondaryLaunchConfigOperations
+ Service ServiceOperations
+ ServiceConsumeMap ServiceConsumeMapOperations
+ ServiceEvent ServiceEventOperations
+ ServiceExposeMap ServiceExposeMapOperations
+ ServiceLink ServiceLinkOperations
+ ServiceProxy ServiceProxyOperations
+ ServiceRestart ServiceRestartOperations
+ ServiceUpgrade ServiceUpgradeOperations
+ ServiceUpgradeStrategy ServiceUpgradeStrategyOperations
+ ServicesPortRange ServicesPortRangeOperations
+ SetLabelsInput SetLabelsInputOperations
+ SetLoadBalancerServiceLinksInput SetLoadBalancerServiceLinksInputOperations
+ SetProjectMembersInput SetProjectMembersInputOperations
+ SetServiceLinksInput SetServiceLinksInputOperations
+ Setting SettingOperations
+ Snapshot SnapshotOperations
+ SnapshotBackupInput SnapshotBackupInputOperations
+ StateTransition StateTransitionOperations
+ StatsAccess StatsAccessOperations
+ StoragePool StoragePoolOperations
+ Subscribe SubscribeOperations
+ Task TaskOperations
+ TaskInstance TaskInstanceOperations
+ ToServiceUpgradeStrategy ToServiceUpgradeStrategyOperations
+ TypeDocumentation TypeDocumentationOperations
+ VirtualMachine VirtualMachineOperations
+ VirtualMachineDisk VirtualMachineDiskOperations
+ Volume VolumeOperations
+ VolumeSnapshotInput VolumeSnapshotInputOperations
+}
+
+func constructClient(rancherBaseClient *RancherBaseClientImpl) *RancherClient {
+ client := &RancherClient{
+ RancherBaseClient: rancherBaseClient,
+ }
+
+ client.Account = newAccountClient(client)
+ client.ActiveSetting = newActiveSettingClient(client)
+ client.AddOutputsInput = newAddOutputsInputClient(client)
+ client.AddRemoveLoadBalancerServiceLinkInput = newAddRemoveLoadBalancerServiceLinkInputClient(client)
+ client.AddRemoveServiceLinkInput = newAddRemoveServiceLinkInputClient(client)
+ client.Agent = newAgentClient(client)
+ client.Amazonec2Config = newAmazonec2ConfigClient(client)
+ client.ApiKey = newApiKeyClient(client)
+ client.AuditLog = newAuditLogClient(client)
+ client.AzureConfig = newAzureConfigClient(client)
+ client.Azureadconfig = newAzureadconfigClient(client)
+ client.Backup = newBackupClient(client)
+ client.BackupTarget = newBackupTargetClient(client)
+ client.BaseMachineConfig = newBaseMachineConfigClient(client)
+ client.BlkioDeviceOption = newBlkioDeviceOptionClient(client)
+ client.Certificate = newCertificateClient(client)
+ client.ChangeSecretInput = newChangeSecretInputClient(client)
+ client.ComposeConfig = newComposeConfigClient(client)
+ client.ComposeConfigInput = newComposeConfigInputClient(client)
+ client.ComposeProject = newComposeProjectClient(client)
+ client.ComposeService = newComposeServiceClient(client)
+ client.ConfigItem = newConfigItemClient(client)
+ client.ConfigItemStatus = newConfigItemStatusClient(client)
+ client.Container = newContainerClient(client)
+ client.ContainerEvent = newContainerEventClient(client)
+ client.ContainerExec = newContainerExecClient(client)
+ client.ContainerLogs = newContainerLogsClient(client)
+ client.ContainerProxy = newContainerProxyClient(client)
+ client.Credential = newCredentialClient(client)
+ client.Databasechangelog = newDatabasechangelogClient(client)
+ client.Databasechangeloglock = newDatabasechangeloglockClient(client)
+ client.DigitaloceanConfig = newDigitaloceanConfigClient(client)
+ client.DnsService = newDnsServiceClient(client)
+ client.DockerBuild = newDockerBuildClient(client)
+ client.DynamicSchema = newDynamicSchemaClient(client)
+ client.Environment = newEnvironmentClient(client)
+ client.EnvironmentUpgrade = newEnvironmentUpgradeClient(client)
+ client.ExtensionImplementation = newExtensionImplementationClient(client)
+ client.ExtensionPoint = newExtensionPointClient(client)
+ client.ExternalDnsEvent = newExternalDnsEventClient(client)
+ client.ExternalEvent = newExternalEventClient(client)
+ client.ExternalHandler = newExternalHandlerClient(client)
+ client.ExternalHandlerExternalHandlerProcessMap = newExternalHandlerExternalHandlerProcessMapClient(client)
+ client.ExternalHandlerProcess = newExternalHandlerProcessClient(client)
+ client.ExternalHandlerProcessConfig = newExternalHandlerProcessConfigClient(client)
+ client.ExternalHostEvent = newExternalHostEventClient(client)
+ client.ExternalService = newExternalServiceClient(client)
+ client.ExternalServiceEvent = newExternalServiceEventClient(client)
+ client.ExternalStoragePoolEvent = newExternalStoragePoolEventClient(client)
+ client.ExternalVolumeEvent = newExternalVolumeEventClient(client)
+ client.FieldDocumentation = newFieldDocumentationClient(client)
+ client.Githubconfig = newGithubconfigClient(client)
+ client.HaConfig = newHaConfigClient(client)
+ client.HaConfigInput = newHaConfigInputClient(client)
+ client.HaproxyConfig = newHaproxyConfigClient(client)
+ client.HealthcheckInstanceHostMap = newHealthcheckInstanceHostMapClient(client)
+ client.Host = newHostClient(client)
+ client.HostAccess = newHostAccessClient(client)
+ client.HostApiProxyToken = newHostApiProxyTokenClient(client)
+ client.Identity = newIdentityClient(client)
+ client.Image = newImageClient(client)
+ client.InServiceUpgradeStrategy = newInServiceUpgradeStrategyClient(client)
+ client.Instance = newInstanceClient(client)
+ client.InstanceConsole = newInstanceConsoleClient(client)
+ client.InstanceConsoleInput = newInstanceConsoleInputClient(client)
+ client.InstanceHealthCheck = newInstanceHealthCheckClient(client)
+ client.InstanceLink = newInstanceLinkClient(client)
+ client.InstanceStop = newInstanceStopClient(client)
+ client.IpAddress = newIpAddressClient(client)
+ client.IpAddressAssociateInput = newIpAddressAssociateInputClient(client)
+ client.KubernetesService = newKubernetesServiceClient(client)
+ client.KubernetesStack = newKubernetesStackClient(client)
+ client.KubernetesStackUpgrade = newKubernetesStackUpgradeClient(client)
+ client.Label = newLabelClient(client)
+ client.LaunchConfig = newLaunchConfigClient(client)
+ client.Ldapconfig = newLdapconfigClient(client)
+ client.LoadBalancerAppCookieStickinessPolicy = newLoadBalancerAppCookieStickinessPolicyClient(client)
+ client.LoadBalancerConfig = newLoadBalancerConfigClient(client)
+ client.LoadBalancerCookieStickinessPolicy = newLoadBalancerCookieStickinessPolicyClient(client)
+ client.LoadBalancerService = newLoadBalancerServiceClient(client)
+ client.LoadBalancerServiceLink = newLoadBalancerServiceLinkClient(client)
+ client.LocalAuthConfig = newLocalAuthConfigClient(client)
+ client.LogConfig = newLogConfigClient(client)
+ client.Machine = newMachineClient(client)
+ client.MachineDriver = newMachineDriverClient(client)
+ client.Mount = newMountClient(client)
+ client.Network = newNetworkClient(client)
+ client.NfsConfig = newNfsConfigClient(client)
+ client.Openldapconfig = newOpenldapconfigClient(client)
+ client.PacketConfig = newPacketConfigClient(client)
+ client.Password = newPasswordClient(client)
+ client.PhysicalHost = newPhysicalHostClient(client)
+ client.Port = newPortClient(client)
+ client.ProcessDefinition = newProcessDefinitionClient(client)
+ client.ProcessExecution = newProcessExecutionClient(client)
+ client.ProcessInstance = newProcessInstanceClient(client)
+ client.Project = newProjectClient(client)
+ client.ProjectMember = newProjectMemberClient(client)
+ client.PublicEndpoint = newPublicEndpointClient(client)
+ client.Publish = newPublishClient(client)
+ client.PullTask = newPullTaskClient(client)
+ client.RecreateOnQuorumStrategyConfig = newRecreateOnQuorumStrategyConfigClient(client)
+ client.Register = newRegisterClient(client)
+ client.RegistrationToken = newRegistrationTokenClient(client)
+ client.Registry = newRegistryClient(client)
+ client.RegistryCredential = newRegistryCredentialClient(client)
+ client.ResourceDefinition = newResourceDefinitionClient(client)
+ client.RestartPolicy = newRestartPolicyClient(client)
+ client.RestoreFromBackupInput = newRestoreFromBackupInputClient(client)
+ client.RevertToSnapshotInput = newRevertToSnapshotInputClient(client)
+ client.RollingRestartStrategy = newRollingRestartStrategyClient(client)
+ client.ScalePolicy = newScalePolicyClient(client)
+ client.SecondaryLaunchConfig = newSecondaryLaunchConfigClient(client)
+ client.Service = newServiceClient(client)
+ client.ServiceConsumeMap = newServiceConsumeMapClient(client)
+ client.ServiceEvent = newServiceEventClient(client)
+ client.ServiceExposeMap = newServiceExposeMapClient(client)
+ client.ServiceLink = newServiceLinkClient(client)
+ client.ServiceProxy = newServiceProxyClient(client)
+ client.ServiceRestart = newServiceRestartClient(client)
+ client.ServiceUpgrade = newServiceUpgradeClient(client)
+ client.ServiceUpgradeStrategy = newServiceUpgradeStrategyClient(client)
+ client.ServicesPortRange = newServicesPortRangeClient(client)
+ client.SetLabelsInput = newSetLabelsInputClient(client)
+ client.SetLoadBalancerServiceLinksInput = newSetLoadBalancerServiceLinksInputClient(client)
+ client.SetProjectMembersInput = newSetProjectMembersInputClient(client)
+ client.SetServiceLinksInput = newSetServiceLinksInputClient(client)
+ client.Setting = newSettingClient(client)
+ client.Snapshot = newSnapshotClient(client)
+ client.SnapshotBackupInput = newSnapshotBackupInputClient(client)
+ client.StateTransition = newStateTransitionClient(client)
+ client.StatsAccess = newStatsAccessClient(client)
+ client.StoragePool = newStoragePoolClient(client)
+ client.Subscribe = newSubscribeClient(client)
+ client.Task = newTaskClient(client)
+ client.TaskInstance = newTaskInstanceClient(client)
+ client.ToServiceUpgradeStrategy = newToServiceUpgradeStrategyClient(client)
+ client.TypeDocumentation = newTypeDocumentationClient(client)
+ client.VirtualMachine = newVirtualMachineClient(client)
+ client.VirtualMachineDisk = newVirtualMachineDiskClient(client)
+ client.Volume = newVolumeClient(client)
+ client.VolumeSnapshotInput = newVolumeSnapshotInputClient(client)
+
+ return client
+}
+
+func NewRancherClient(opts *ClientOpts) (*RancherClient, error) {
+ rancherBaseClient := &RancherBaseClientImpl{
+ Types: map[string]Schema{},
+ }
+ client := constructClient(rancherBaseClient)
+
+ err := setupRancherBaseClient(rancherBaseClient, opts)
+ if err != nil {
+ return nil, err
+ }
+
+ return client, nil
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_compose_config.go b/vendor/github.com/rancher/go-rancher/client/generated_compose_config.go
new file mode 100644
index 00000000..b9bc013c
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_compose_config.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ COMPOSE_CONFIG_TYPE = "composeConfig"
+)
+
+type ComposeConfig struct {
+ Resource
+
+ DockerComposeConfig string `json:"dockerComposeConfig,omitempty" yaml:"docker_compose_config,omitempty"`
+
+ RancherComposeConfig string `json:"rancherComposeConfig,omitempty" yaml:"rancher_compose_config,omitempty"`
+}
+
+type ComposeConfigCollection struct {
+ Collection
+ Data []ComposeConfig `json:"data,omitempty"`
+ client *ComposeConfigClient
+}
+
+type ComposeConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type ComposeConfigOperations interface {
+ List(opts *ListOpts) (*ComposeConfigCollection, error)
+ Create(opts *ComposeConfig) (*ComposeConfig, error)
+ Update(existing *ComposeConfig, updates interface{}) (*ComposeConfig, error)
+ ById(id string) (*ComposeConfig, error)
+ Delete(container *ComposeConfig) error
+}
+
+func newComposeConfigClient(rancherClient *RancherClient) *ComposeConfigClient {
+ return &ComposeConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ComposeConfigClient) Create(container *ComposeConfig) (*ComposeConfig, error) {
+ resp := &ComposeConfig{}
+ err := c.rancherClient.doCreate(COMPOSE_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ComposeConfigClient) Update(existing *ComposeConfig, updates interface{}) (*ComposeConfig, error) {
+ resp := &ComposeConfig{}
+ err := c.rancherClient.doUpdate(COMPOSE_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ComposeConfigClient) List(opts *ListOpts) (*ComposeConfigCollection, error) {
+ resp := &ComposeConfigCollection{}
+ err := c.rancherClient.doList(COMPOSE_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ComposeConfigCollection) Next() (*ComposeConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ComposeConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ComposeConfigClient) ById(id string) (*ComposeConfig, error) {
+ resp := &ComposeConfig{}
+ err := c.rancherClient.doById(COMPOSE_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ComposeConfigClient) Delete(container *ComposeConfig) error {
+ return c.rancherClient.doResourceDelete(COMPOSE_CONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_compose_config_input.go b/vendor/github.com/rancher/go-rancher/client/generated_compose_config_input.go
new file mode 100644
index 00000000..3d03d923
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_compose_config_input.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ COMPOSE_CONFIG_INPUT_TYPE = "composeConfigInput"
+)
+
+type ComposeConfigInput struct {
+ Resource
+
+ ServiceIds []string `json:"serviceIds,omitempty" yaml:"service_ids,omitempty"`
+}
+
+type ComposeConfigInputCollection struct {
+ Collection
+ Data []ComposeConfigInput `json:"data,omitempty"`
+ client *ComposeConfigInputClient
+}
+
+type ComposeConfigInputClient struct {
+ rancherClient *RancherClient
+}
+
+type ComposeConfigInputOperations interface {
+ List(opts *ListOpts) (*ComposeConfigInputCollection, error)
+ Create(opts *ComposeConfigInput) (*ComposeConfigInput, error)
+ Update(existing *ComposeConfigInput, updates interface{}) (*ComposeConfigInput, error)
+ ById(id string) (*ComposeConfigInput, error)
+ Delete(container *ComposeConfigInput) error
+}
+
+func newComposeConfigInputClient(rancherClient *RancherClient) *ComposeConfigInputClient {
+ return &ComposeConfigInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ComposeConfigInputClient) Create(container *ComposeConfigInput) (*ComposeConfigInput, error) {
+ resp := &ComposeConfigInput{}
+ err := c.rancherClient.doCreate(COMPOSE_CONFIG_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ComposeConfigInputClient) Update(existing *ComposeConfigInput, updates interface{}) (*ComposeConfigInput, error) {
+ resp := &ComposeConfigInput{}
+ err := c.rancherClient.doUpdate(COMPOSE_CONFIG_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ComposeConfigInputClient) List(opts *ListOpts) (*ComposeConfigInputCollection, error) {
+ resp := &ComposeConfigInputCollection{}
+ err := c.rancherClient.doList(COMPOSE_CONFIG_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ComposeConfigInputCollection) Next() (*ComposeConfigInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ComposeConfigInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ComposeConfigInputClient) ById(id string) (*ComposeConfigInput, error) {
+ resp := &ComposeConfigInput{}
+ err := c.rancherClient.doById(COMPOSE_CONFIG_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ComposeConfigInputClient) Delete(container *ComposeConfigInput) error {
+ return c.rancherClient.doResourceDelete(COMPOSE_CONFIG_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_compose_project.go b/vendor/github.com/rancher/go-rancher/client/generated_compose_project.go
new file mode 100644
index 00000000..cf5c918a
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_compose_project.go
@@ -0,0 +1,192 @@
+package client
+
+const (
+ COMPOSE_PROJECT_TYPE = "composeProject"
+)
+
+type ComposeProject struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ PreviousEnvironment map[string]interface{} `json:"previousEnvironment,omitempty" yaml:"previous_environment,omitempty"`
+
+ PreviousExternalId string `json:"previousExternalId,omitempty" yaml:"previous_external_id,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Templates map[string]interface{} `json:"templates,omitempty" yaml:"templates,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ComposeProjectCollection struct {
+ Collection
+ Data []ComposeProject `json:"data,omitempty"`
+ client *ComposeProjectClient
+}
+
+type ComposeProjectClient struct {
+ rancherClient *RancherClient
+}
+
+type ComposeProjectOperations interface {
+ List(opts *ListOpts) (*ComposeProjectCollection, error)
+ Create(opts *ComposeProject) (*ComposeProject, error)
+ Update(existing *ComposeProject, updates interface{}) (*ComposeProject, error)
+ ById(id string) (*ComposeProject, error)
+ Delete(container *ComposeProject) error
+
+ ActionCancelrollback(*ComposeProject) (*Environment, error)
+
+ ActionCancelupgrade(*ComposeProject) (*Environment, error)
+
+ ActionCreate(*ComposeProject) (*Environment, error)
+
+ ActionError(*ComposeProject) (*Environment, error)
+
+ ActionFinishupgrade(*ComposeProject) (*Environment, error)
+
+ ActionRemove(*ComposeProject) (*Environment, error)
+
+ ActionRollback(*ComposeProject) (*Environment, error)
+}
+
+func newComposeProjectClient(rancherClient *RancherClient) *ComposeProjectClient {
+ return &ComposeProjectClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ComposeProjectClient) Create(container *ComposeProject) (*ComposeProject, error) {
+ resp := &ComposeProject{}
+ err := c.rancherClient.doCreate(COMPOSE_PROJECT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ComposeProjectClient) Update(existing *ComposeProject, updates interface{}) (*ComposeProject, error) {
+ resp := &ComposeProject{}
+ err := c.rancherClient.doUpdate(COMPOSE_PROJECT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ComposeProjectClient) List(opts *ListOpts) (*ComposeProjectCollection, error) {
+ resp := &ComposeProjectCollection{}
+ err := c.rancherClient.doList(COMPOSE_PROJECT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ComposeProjectCollection) Next() (*ComposeProjectCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ComposeProjectCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ComposeProjectClient) ById(id string) (*ComposeProject, error) {
+ resp := &ComposeProject{}
+ err := c.rancherClient.doById(COMPOSE_PROJECT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ComposeProjectClient) Delete(container *ComposeProject) error {
+ return c.rancherClient.doResourceDelete(COMPOSE_PROJECT_TYPE, &container.Resource)
+}
+
+func (c *ComposeProjectClient) ActionCancelrollback(resource *ComposeProject) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "cancelrollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ComposeProjectClient) ActionCancelupgrade(resource *ComposeProject) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ComposeProjectClient) ActionCreate(resource *ComposeProject) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ComposeProjectClient) ActionError(resource *ComposeProject) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "error", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ComposeProjectClient) ActionFinishupgrade(resource *ComposeProject) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "finishupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ComposeProjectClient) ActionRemove(resource *ComposeProject) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ComposeProjectClient) ActionRollback(resource *ComposeProject) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "rollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_compose_service.go b/vendor/github.com/rancher/go-rancher/client/generated_compose_service.go
new file mode 100644
index 00000000..1af13774
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_compose_service.go
@@ -0,0 +1,206 @@
+package client
+
+const (
+ COMPOSE_SERVICE_TYPE = "composeService"
+)
+
+type ComposeService struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ CurrentScale int64 `json:"currentScale,omitempty" yaml:"current_scale,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"`
+
+ HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ Scale int64 `json:"scale,omitempty" yaml:"scale,omitempty"`
+
+ ScalePolicy *ScalePolicy `json:"scalePolicy,omitempty" yaml:"scale_policy,omitempty"`
+
+ SelectorContainer string `json:"selectorContainer,omitempty" yaml:"selector_container,omitempty"`
+
+ SelectorLink string `json:"selectorLink,omitempty" yaml:"selector_link,omitempty"`
+
+ StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ Vip string `json:"vip,omitempty" yaml:"vip,omitempty"`
+}
+
+type ComposeServiceCollection struct {
+ Collection
+ Data []ComposeService `json:"data,omitempty"`
+ client *ComposeServiceClient
+}
+
+type ComposeServiceClient struct {
+ rancherClient *RancherClient
+}
+
+type ComposeServiceOperations interface {
+ List(opts *ListOpts) (*ComposeServiceCollection, error)
+ Create(opts *ComposeService) (*ComposeService, error)
+ Update(existing *ComposeService, updates interface{}) (*ComposeService, error)
+ ById(id string) (*ComposeService, error)
+ Delete(container *ComposeService) error
+
+ ActionActivate(*ComposeService) (*Service, error)
+
+ ActionCancelrollback(*ComposeService) (*Service, error)
+
+ ActionCancelupgrade(*ComposeService) (*Service, error)
+
+ ActionCreate(*ComposeService) (*Service, error)
+
+ ActionFinishupgrade(*ComposeService) (*Service, error)
+
+ ActionRemove(*ComposeService) (*Service, error)
+
+ ActionRollback(*ComposeService) (*Service, error)
+}
+
+func newComposeServiceClient(rancherClient *RancherClient) *ComposeServiceClient {
+ return &ComposeServiceClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ComposeServiceClient) Create(container *ComposeService) (*ComposeService, error) {
+ resp := &ComposeService{}
+ err := c.rancherClient.doCreate(COMPOSE_SERVICE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ComposeServiceClient) Update(existing *ComposeService, updates interface{}) (*ComposeService, error) {
+ resp := &ComposeService{}
+ err := c.rancherClient.doUpdate(COMPOSE_SERVICE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ComposeServiceClient) List(opts *ListOpts) (*ComposeServiceCollection, error) {
+ resp := &ComposeServiceCollection{}
+ err := c.rancherClient.doList(COMPOSE_SERVICE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ComposeServiceCollection) Next() (*ComposeServiceCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ComposeServiceCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ComposeServiceClient) ById(id string) (*ComposeService, error) {
+ resp := &ComposeService{}
+ err := c.rancherClient.doById(COMPOSE_SERVICE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ComposeServiceClient) Delete(container *ComposeService) error {
+ return c.rancherClient.doResourceDelete(COMPOSE_SERVICE_TYPE, &container.Resource)
+}
+
+func (c *ComposeServiceClient) ActionActivate(resource *ComposeService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ComposeServiceClient) ActionCancelrollback(resource *ComposeService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ComposeServiceClient) ActionCancelupgrade(resource *ComposeService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ComposeServiceClient) ActionCreate(resource *ComposeService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ComposeServiceClient) ActionFinishupgrade(resource *ComposeService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ComposeServiceClient) ActionRemove(resource *ComposeService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ComposeServiceClient) ActionRollback(resource *ComposeService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_config_item.go b/vendor/github.com/rancher/go-rancher/client/generated_config_item.go
new file mode 100644
index 00000000..b9730666
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_config_item.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ CONFIG_ITEM_TYPE = "configItem"
+)
+
+type ConfigItem struct {
+ Resource
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ SourceVersion string `json:"sourceVersion,omitempty" yaml:"source_version,omitempty"`
+}
+
+type ConfigItemCollection struct {
+ Collection
+ Data []ConfigItem `json:"data,omitempty"`
+ client *ConfigItemClient
+}
+
+type ConfigItemClient struct {
+ rancherClient *RancherClient
+}
+
+type ConfigItemOperations interface {
+ List(opts *ListOpts) (*ConfigItemCollection, error)
+ Create(opts *ConfigItem) (*ConfigItem, error)
+ Update(existing *ConfigItem, updates interface{}) (*ConfigItem, error)
+ ById(id string) (*ConfigItem, error)
+ Delete(container *ConfigItem) error
+}
+
+func newConfigItemClient(rancherClient *RancherClient) *ConfigItemClient {
+ return &ConfigItemClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ConfigItemClient) Create(container *ConfigItem) (*ConfigItem, error) {
+ resp := &ConfigItem{}
+ err := c.rancherClient.doCreate(CONFIG_ITEM_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ConfigItemClient) Update(existing *ConfigItem, updates interface{}) (*ConfigItem, error) {
+ resp := &ConfigItem{}
+ err := c.rancherClient.doUpdate(CONFIG_ITEM_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ConfigItemClient) List(opts *ListOpts) (*ConfigItemCollection, error) {
+ resp := &ConfigItemCollection{}
+ err := c.rancherClient.doList(CONFIG_ITEM_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ConfigItemCollection) Next() (*ConfigItemCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ConfigItemCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ConfigItemClient) ById(id string) (*ConfigItem, error) {
+ resp := &ConfigItem{}
+ err := c.rancherClient.doById(CONFIG_ITEM_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ConfigItemClient) Delete(container *ConfigItem) error {
+ return c.rancherClient.doResourceDelete(CONFIG_ITEM_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_config_item_status.go b/vendor/github.com/rancher/go-rancher/client/generated_config_item_status.go
new file mode 100644
index 00000000..2ce32ca9
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_config_item_status.go
@@ -0,0 +1,93 @@
+package client
+
+const (
+ CONFIG_ITEM_STATUS_TYPE = "configItemStatus"
+)
+
+type ConfigItemStatus struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"`
+
+ AppliedUpdated string `json:"appliedUpdated,omitempty" yaml:"applied_updated,omitempty"`
+
+ AppliedVersion int64 `json:"appliedVersion,omitempty" yaml:"applied_version,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RequestedUpdated string `json:"requestedUpdated,omitempty" yaml:"requested_updated,omitempty"`
+
+ RequestedVersion int64 `json:"requestedVersion,omitempty" yaml:"requested_version,omitempty"`
+
+ SourceVersion string `json:"sourceVersion,omitempty" yaml:"source_version,omitempty"`
+}
+
+type ConfigItemStatusCollection struct {
+ Collection
+ Data []ConfigItemStatus `json:"data,omitempty"`
+ client *ConfigItemStatusClient
+}
+
+type ConfigItemStatusClient struct {
+ rancherClient *RancherClient
+}
+
+type ConfigItemStatusOperations interface {
+ List(opts *ListOpts) (*ConfigItemStatusCollection, error)
+ Create(opts *ConfigItemStatus) (*ConfigItemStatus, error)
+ Update(existing *ConfigItemStatus, updates interface{}) (*ConfigItemStatus, error)
+ ById(id string) (*ConfigItemStatus, error)
+ Delete(container *ConfigItemStatus) error
+}
+
+func newConfigItemStatusClient(rancherClient *RancherClient) *ConfigItemStatusClient {
+ return &ConfigItemStatusClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ConfigItemStatusClient) Create(container *ConfigItemStatus) (*ConfigItemStatus, error) {
+ resp := &ConfigItemStatus{}
+ err := c.rancherClient.doCreate(CONFIG_ITEM_STATUS_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ConfigItemStatusClient) Update(existing *ConfigItemStatus, updates interface{}) (*ConfigItemStatus, error) {
+ resp := &ConfigItemStatus{}
+ err := c.rancherClient.doUpdate(CONFIG_ITEM_STATUS_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ConfigItemStatusClient) List(opts *ListOpts) (*ConfigItemStatusCollection, error) {
+ resp := &ConfigItemStatusCollection{}
+ err := c.rancherClient.doList(CONFIG_ITEM_STATUS_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ConfigItemStatusCollection) Next() (*ConfigItemStatusCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ConfigItemStatusCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ConfigItemStatusClient) ById(id string) (*ConfigItemStatus, error) {
+ resp := &ConfigItemStatus{}
+ err := c.rancherClient.doById(CONFIG_ITEM_STATUS_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ConfigItemStatusClient) Delete(container *ConfigItemStatus) error {
+ return c.rancherClient.doResourceDelete(CONFIG_ITEM_STATUS_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_container.go b/vendor/github.com/rancher/go-rancher/client/generated_container.go
new file mode 100644
index 00000000..da3f1748
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_container.go
@@ -0,0 +1,443 @@
+package client
+
+const (
+ CONTAINER_TYPE = "container"
+)
+
+type Container struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"`
+
+ AllocationState string `json:"allocationState,omitempty" yaml:"allocation_state,omitempty"`
+
+ BlkioDeviceOptions map[string]interface{} `json:"blkioDeviceOptions,omitempty" yaml:"blkio_device_options,omitempty"`
+
+ Build *DockerBuild `json:"build,omitempty" yaml:"build,omitempty"`
+
+ CapAdd []string `json:"capAdd,omitempty" yaml:"cap_add,omitempty"`
+
+ CapDrop []string `json:"capDrop,omitempty" yaml:"cap_drop,omitempty"`
+
+ Command []string `json:"command,omitempty" yaml:"command,omitempty"`
+
+ Count int64 `json:"count,omitempty" yaml:"count,omitempty"`
+
+ CpuSet string `json:"cpuSet,omitempty" yaml:"cpu_set,omitempty"`
+
+ CpuShares int64 `json:"cpuShares,omitempty" yaml:"cpu_shares,omitempty"`
+
+ CreateIndex int64 `json:"createIndex,omitempty" yaml:"create_index,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ DataVolumeMounts map[string]interface{} `json:"dataVolumeMounts,omitempty" yaml:"data_volume_mounts,omitempty"`
+
+ DataVolumes []string `json:"dataVolumes,omitempty" yaml:"data_volumes,omitempty"`
+
+ DataVolumesFrom []string `json:"dataVolumesFrom,omitempty" yaml:"data_volumes_from,omitempty"`
+
+ DeploymentUnitUuid string `json:"deploymentUnitUuid,omitempty" yaml:"deployment_unit_uuid,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Devices []string `json:"devices,omitempty" yaml:"devices,omitempty"`
+
+ Dns []string `json:"dns,omitempty" yaml:"dns,omitempty"`
+
+ DnsSearch []string `json:"dnsSearch,omitempty" yaml:"dns_search,omitempty"`
+
+ DomainName string `json:"domainName,omitempty" yaml:"domain_name,omitempty"`
+
+ EntryPoint []string `json:"entryPoint,omitempty" yaml:"entry_point,omitempty"`
+
+ Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
+
+ Expose []string `json:"expose,omitempty" yaml:"expose,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ ExtraHosts []string `json:"extraHosts,omitempty" yaml:"extra_hosts,omitempty"`
+
+ FirstRunning string `json:"firstRunning,omitempty" yaml:"first_running,omitempty"`
+
+ HealthCheck *InstanceHealthCheck `json:"healthCheck,omitempty" yaml:"health_check,omitempty"`
+
+ HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
+
+ HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
+
+ Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
+
+ ImageUuid string `json:"imageUuid,omitempty" yaml:"image_uuid,omitempty"`
+
+ InstanceLinks map[string]interface{} `json:"instanceLinks,omitempty" yaml:"instance_links,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"`
+
+ LogConfig *LogConfig `json:"logConfig,omitempty" yaml:"log_config,omitempty"`
+
+ LxcConf map[string]interface{} `json:"lxcConf,omitempty" yaml:"lxc_conf,omitempty"`
+
+ Memory int64 `json:"memory,omitempty" yaml:"memory,omitempty"`
+
+ MemorySwap int64 `json:"memorySwap,omitempty" yaml:"memory_swap,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ NativeContainer bool `json:"nativeContainer,omitempty" yaml:"native_container,omitempty"`
+
+ NetworkContainerId string `json:"networkContainerId,omitempty" yaml:"network_container_id,omitempty"`
+
+ NetworkIds []string `json:"networkIds,omitempty" yaml:"network_ids,omitempty"`
+
+ NetworkMode string `json:"networkMode,omitempty" yaml:"network_mode,omitempty"`
+
+ PidMode string `json:"pidMode,omitempty" yaml:"pid_mode,omitempty"`
+
+ Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"`
+
+ PrimaryIpAddress string `json:"primaryIpAddress,omitempty" yaml:"primary_ip_address,omitempty"`
+
+ Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"`
+
+ PublishAllPorts bool `json:"publishAllPorts,omitempty" yaml:"publish_all_ports,omitempty"`
+
+ ReadOnly bool `json:"readOnly,omitempty" yaml:"read_only,omitempty"`
+
+ RegistryCredentialId string `json:"registryCredentialId,omitempty" yaml:"registry_credential_id,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ RequestedHostId string `json:"requestedHostId,omitempty" yaml:"requested_host_id,omitempty"`
+
+ RestartPolicy *RestartPolicy `json:"restartPolicy,omitempty" yaml:"restart_policy,omitempty"`
+
+ SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"`
+
+ StartCount int64 `json:"startCount,omitempty" yaml:"start_count,omitempty"`
+
+ StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ StdinOpen bool `json:"stdinOpen,omitempty" yaml:"stdin_open,omitempty"`
+
+ SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"`
+
+ Token string `json:"token,omitempty" yaml:"token,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Tty bool `json:"tty,omitempty" yaml:"tty,omitempty"`
+
+ User string `json:"user,omitempty" yaml:"user,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+
+ VolumeDriver string `json:"volumeDriver,omitempty" yaml:"volume_driver,omitempty"`
+
+ WorkingDir string `json:"workingDir,omitempty" yaml:"working_dir,omitempty"`
+}
+
+type ContainerCollection struct {
+ Collection
+ Data []Container `json:"data,omitempty"`
+ client *ContainerClient
+}
+
+type ContainerClient struct {
+ rancherClient *RancherClient
+}
+
+type ContainerOperations interface {
+ List(opts *ListOpts) (*ContainerCollection, error)
+ Create(opts *Container) (*Container, error)
+ Update(existing *Container, updates interface{}) (*Container, error)
+ ById(id string) (*Container, error)
+ Delete(container *Container) error
+
+ ActionAllocate(*Container) (*Instance, error)
+
+ ActionConsole(*Container, *InstanceConsoleInput) (*InstanceConsole, error)
+
+ ActionCreate(*Container) (*Instance, error)
+
+ ActionDeallocate(*Container) (*Instance, error)
+
+ ActionError(*Container) (*Instance, error)
+
+ ActionExecute(*Container, *ContainerExec) (*HostAccess, error)
+
+ ActionLogs(*Container, *ContainerLogs) (*HostAccess, error)
+
+ ActionMigrate(*Container) (*Instance, error)
+
+ ActionProxy(*Container, *ContainerProxy) (*HostAccess, error)
+
+ ActionPurge(*Container) (*Instance, error)
+
+ ActionRemove(*Container) (*Instance, error)
+
+ ActionRestart(*Container) (*Instance, error)
+
+ ActionRestore(*Container) (*Instance, error)
+
+ ActionSetlabels(*Container, *SetLabelsInput) (*Container, error)
+
+ ActionStart(*Container) (*Instance, error)
+
+ ActionStop(*Container, *InstanceStop) (*Instance, error)
+
+ ActionUpdate(*Container) (*Instance, error)
+
+ ActionUpdatehealthy(*Container) (*Instance, error)
+
+ ActionUpdatereinitializing(*Container) (*Instance, error)
+
+ ActionUpdateunhealthy(*Container) (*Instance, error)
+}
+
+func newContainerClient(rancherClient *RancherClient) *ContainerClient {
+ return &ContainerClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ContainerClient) Create(container *Container) (*Container, error) {
+ resp := &Container{}
+ err := c.rancherClient.doCreate(CONTAINER_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ContainerClient) Update(existing *Container, updates interface{}) (*Container, error) {
+ resp := &Container{}
+ err := c.rancherClient.doUpdate(CONTAINER_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ContainerClient) List(opts *ListOpts) (*ContainerCollection, error) {
+ resp := &ContainerCollection{}
+ err := c.rancherClient.doList(CONTAINER_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ContainerCollection) Next() (*ContainerCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ContainerCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ContainerClient) ById(id string) (*Container, error) {
+ resp := &Container{}
+ err := c.rancherClient.doById(CONTAINER_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ContainerClient) Delete(container *Container) error {
+ return c.rancherClient.doResourceDelete(CONTAINER_TYPE, &container.Resource)
+}
+
+func (c *ContainerClient) ActionAllocate(resource *Container) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "allocate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionConsole(resource *Container, input *InstanceConsoleInput) (*InstanceConsole, error) {
+
+ resp := &InstanceConsole{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "console", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionCreate(resource *Container) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionDeallocate(resource *Container) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "deallocate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionError(resource *Container) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "error", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionExecute(resource *Container, input *ContainerExec) (*HostAccess, error) {
+
+ resp := &HostAccess{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "execute", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionLogs(resource *Container, input *ContainerLogs) (*HostAccess, error) {
+
+ resp := &HostAccess{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "logs", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionMigrate(resource *Container) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "migrate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionProxy(resource *Container, input *ContainerProxy) (*HostAccess, error) {
+
+ resp := &HostAccess{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "proxy", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionPurge(resource *Container) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionRemove(resource *Container) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionRestart(resource *Container) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "restart", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionRestore(resource *Container) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionSetlabels(resource *Container, input *SetLabelsInput) (*Container, error) {
+
+ resp := &Container{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "setlabels", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionStart(resource *Container) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "start", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionStop(resource *Container, input *InstanceStop) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "stop", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionUpdate(resource *Container) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionUpdatehealthy(resource *Container) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "updatehealthy", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionUpdatereinitializing(resource *Container) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "updatereinitializing", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ContainerClient) ActionUpdateunhealthy(resource *Container) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(CONTAINER_TYPE, "updateunhealthy", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_container_event.go b/vendor/github.com/rancher/go-rancher/client/generated_container_event.go
new file mode 100644
index 00000000..8b95651c
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_container_event.go
@@ -0,0 +1,129 @@
+package client
+
+const (
+ CONTAINER_EVENT_TYPE = "containerEvent"
+)
+
+type ContainerEvent struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ DockerInspect interface{} `json:"dockerInspect,omitempty" yaml:"docker_inspect,omitempty"`
+
+ ExternalFrom string `json:"externalFrom,omitempty" yaml:"external_from,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ ExternalStatus string `json:"externalStatus,omitempty" yaml:"external_status,omitempty"`
+
+ ExternalTimestamp int64 `json:"externalTimestamp,omitempty" yaml:"external_timestamp,omitempty"`
+
+ HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ ReportedHostUuid string `json:"reportedHostUuid,omitempty" yaml:"reported_host_uuid,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+}
+
+type ContainerEventCollection struct {
+ Collection
+ Data []ContainerEvent `json:"data,omitempty"`
+ client *ContainerEventClient
+}
+
+type ContainerEventClient struct {
+ rancherClient *RancherClient
+}
+
+type ContainerEventOperations interface {
+ List(opts *ListOpts) (*ContainerEventCollection, error)
+ Create(opts *ContainerEvent) (*ContainerEvent, error)
+ Update(existing *ContainerEvent, updates interface{}) (*ContainerEvent, error)
+ ById(id string) (*ContainerEvent, error)
+ Delete(container *ContainerEvent) error
+
+ ActionCreate(*ContainerEvent) (*ContainerEvent, error)
+
+ ActionRemove(*ContainerEvent) (*ContainerEvent, error)
+}
+
+func newContainerEventClient(rancherClient *RancherClient) *ContainerEventClient {
+ return &ContainerEventClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ContainerEventClient) Create(container *ContainerEvent) (*ContainerEvent, error) {
+ resp := &ContainerEvent{}
+ err := c.rancherClient.doCreate(CONTAINER_EVENT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ContainerEventClient) Update(existing *ContainerEvent, updates interface{}) (*ContainerEvent, error) {
+ resp := &ContainerEvent{}
+ err := c.rancherClient.doUpdate(CONTAINER_EVENT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ContainerEventClient) List(opts *ListOpts) (*ContainerEventCollection, error) {
+ resp := &ContainerEventCollection{}
+ err := c.rancherClient.doList(CONTAINER_EVENT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ContainerEventCollection) Next() (*ContainerEventCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ContainerEventCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ContainerEventClient) ById(id string) (*ContainerEvent, error) {
+ resp := &ContainerEvent{}
+ err := c.rancherClient.doById(CONTAINER_EVENT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ContainerEventClient) Delete(container *ContainerEvent) error {
+ return c.rancherClient.doResourceDelete(CONTAINER_EVENT_TYPE, &container.Resource)
+}
+
+func (c *ContainerEventClient) ActionCreate(resource *ContainerEvent) (*ContainerEvent, error) {
+
+ resp := &ContainerEvent{}
+
+ err := c.rancherClient.doAction(CONTAINER_EVENT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ContainerEventClient) ActionRemove(resource *ContainerEvent) (*ContainerEvent, error) {
+
+ resp := &ContainerEvent{}
+
+ err := c.rancherClient.doAction(CONTAINER_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_container_exec.go b/vendor/github.com/rancher/go-rancher/client/generated_container_exec.go
new file mode 100644
index 00000000..196199b5
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_container_exec.go
@@ -0,0 +1,85 @@
+package client
+
+const (
+ CONTAINER_EXEC_TYPE = "containerExec"
+)
+
+type ContainerExec struct {
+ Resource
+
+ AttachStdin bool `json:"attachStdin,omitempty" yaml:"attach_stdin,omitempty"`
+
+ AttachStdout bool `json:"attachStdout,omitempty" yaml:"attach_stdout,omitempty"`
+
+ Command []string `json:"command,omitempty" yaml:"command,omitempty"`
+
+ Tty bool `json:"tty,omitempty" yaml:"tty,omitempty"`
+}
+
+type ContainerExecCollection struct {
+ Collection
+ Data []ContainerExec `json:"data,omitempty"`
+ client *ContainerExecClient
+}
+
+type ContainerExecClient struct {
+ rancherClient *RancherClient
+}
+
+type ContainerExecOperations interface {
+ List(opts *ListOpts) (*ContainerExecCollection, error)
+ Create(opts *ContainerExec) (*ContainerExec, error)
+ Update(existing *ContainerExec, updates interface{}) (*ContainerExec, error)
+ ById(id string) (*ContainerExec, error)
+ Delete(container *ContainerExec) error
+}
+
+func newContainerExecClient(rancherClient *RancherClient) *ContainerExecClient {
+ return &ContainerExecClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ContainerExecClient) Create(container *ContainerExec) (*ContainerExec, error) {
+ resp := &ContainerExec{}
+ err := c.rancherClient.doCreate(CONTAINER_EXEC_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ContainerExecClient) Update(existing *ContainerExec, updates interface{}) (*ContainerExec, error) {
+ resp := &ContainerExec{}
+ err := c.rancherClient.doUpdate(CONTAINER_EXEC_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ContainerExecClient) List(opts *ListOpts) (*ContainerExecCollection, error) {
+ resp := &ContainerExecCollection{}
+ err := c.rancherClient.doList(CONTAINER_EXEC_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ContainerExecCollection) Next() (*ContainerExecCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ContainerExecCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ContainerExecClient) ById(id string) (*ContainerExec, error) {
+ resp := &ContainerExec{}
+ err := c.rancherClient.doById(CONTAINER_EXEC_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ContainerExecClient) Delete(container *ContainerExec) error {
+ return c.rancherClient.doResourceDelete(CONTAINER_EXEC_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_container_logs.go b/vendor/github.com/rancher/go-rancher/client/generated_container_logs.go
new file mode 100644
index 00000000..2149df19
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_container_logs.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ CONTAINER_LOGS_TYPE = "containerLogs"
+)
+
+type ContainerLogs struct {
+ Resource
+
+ Follow bool `json:"follow,omitempty" yaml:"follow,omitempty"`
+
+ Lines int64 `json:"lines,omitempty" yaml:"lines,omitempty"`
+}
+
+type ContainerLogsCollection struct {
+ Collection
+ Data []ContainerLogs `json:"data,omitempty"`
+ client *ContainerLogsClient
+}
+
+type ContainerLogsClient struct {
+ rancherClient *RancherClient
+}
+
+type ContainerLogsOperations interface {
+ List(opts *ListOpts) (*ContainerLogsCollection, error)
+ Create(opts *ContainerLogs) (*ContainerLogs, error)
+ Update(existing *ContainerLogs, updates interface{}) (*ContainerLogs, error)
+ ById(id string) (*ContainerLogs, error)
+ Delete(container *ContainerLogs) error
+}
+
+func newContainerLogsClient(rancherClient *RancherClient) *ContainerLogsClient {
+ return &ContainerLogsClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ContainerLogsClient) Create(container *ContainerLogs) (*ContainerLogs, error) {
+ resp := &ContainerLogs{}
+ err := c.rancherClient.doCreate(CONTAINER_LOGS_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ContainerLogsClient) Update(existing *ContainerLogs, updates interface{}) (*ContainerLogs, error) {
+ resp := &ContainerLogs{}
+ err := c.rancherClient.doUpdate(CONTAINER_LOGS_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ContainerLogsClient) List(opts *ListOpts) (*ContainerLogsCollection, error) {
+ resp := &ContainerLogsCollection{}
+ err := c.rancherClient.doList(CONTAINER_LOGS_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ContainerLogsCollection) Next() (*ContainerLogsCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ContainerLogsCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ContainerLogsClient) ById(id string) (*ContainerLogs, error) {
+ resp := &ContainerLogs{}
+ err := c.rancherClient.doById(CONTAINER_LOGS_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ContainerLogsClient) Delete(container *ContainerLogs) error {
+ return c.rancherClient.doResourceDelete(CONTAINER_LOGS_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_container_proxy.go b/vendor/github.com/rancher/go-rancher/client/generated_container_proxy.go
new file mode 100644
index 00000000..84d7670e
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_container_proxy.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ CONTAINER_PROXY_TYPE = "containerProxy"
+)
+
+type ContainerProxy struct {
+ Resource
+
+ Port int64 `json:"port,omitempty" yaml:"port,omitempty"`
+
+ Scheme string `json:"scheme,omitempty" yaml:"scheme,omitempty"`
+}
+
+type ContainerProxyCollection struct {
+ Collection
+ Data []ContainerProxy `json:"data,omitempty"`
+ client *ContainerProxyClient
+}
+
+type ContainerProxyClient struct {
+ rancherClient *RancherClient
+}
+
+type ContainerProxyOperations interface {
+ List(opts *ListOpts) (*ContainerProxyCollection, error)
+ Create(opts *ContainerProxy) (*ContainerProxy, error)
+ Update(existing *ContainerProxy, updates interface{}) (*ContainerProxy, error)
+ ById(id string) (*ContainerProxy, error)
+ Delete(container *ContainerProxy) error
+}
+
+func newContainerProxyClient(rancherClient *RancherClient) *ContainerProxyClient {
+ return &ContainerProxyClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ContainerProxyClient) Create(container *ContainerProxy) (*ContainerProxy, error) {
+ resp := &ContainerProxy{}
+ err := c.rancherClient.doCreate(CONTAINER_PROXY_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ContainerProxyClient) Update(existing *ContainerProxy, updates interface{}) (*ContainerProxy, error) {
+ resp := &ContainerProxy{}
+ err := c.rancherClient.doUpdate(CONTAINER_PROXY_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ContainerProxyClient) List(opts *ListOpts) (*ContainerProxyCollection, error) {
+ resp := &ContainerProxyCollection{}
+ err := c.rancherClient.doList(CONTAINER_PROXY_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ContainerProxyCollection) Next() (*ContainerProxyCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ContainerProxyCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ContainerProxyClient) ById(id string) (*ContainerProxy, error) {
+ resp := &ContainerProxy{}
+ err := c.rancherClient.doById(CONTAINER_PROXY_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ContainerProxyClient) Delete(container *ContainerProxy) error {
+ return c.rancherClient.doResourceDelete(CONTAINER_PROXY_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_credential.go b/vendor/github.com/rancher/go-rancher/client/generated_credential.go
new file mode 100644
index 00000000..f34a563d
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_credential.go
@@ -0,0 +1,173 @@
+package client
+
+const (
+ CREDENTIAL_TYPE = "credential"
+)
+
+type Credential struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ PublicValue string `json:"publicValue,omitempty" yaml:"public_value,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ SecretValue string `json:"secretValue,omitempty" yaml:"secret_value,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type CredentialCollection struct {
+ Collection
+ Data []Credential `json:"data,omitempty"`
+ client *CredentialClient
+}
+
+type CredentialClient struct {
+ rancherClient *RancherClient
+}
+
+type CredentialOperations interface {
+ List(opts *ListOpts) (*CredentialCollection, error)
+ Create(opts *Credential) (*Credential, error)
+ Update(existing *Credential, updates interface{}) (*Credential, error)
+ ById(id string) (*Credential, error)
+ Delete(container *Credential) error
+
+ ActionActivate(*Credential) (*Credential, error)
+
+ ActionCreate(*Credential) (*Credential, error)
+
+ ActionDeactivate(*Credential) (*Credential, error)
+
+ ActionPurge(*Credential) (*Credential, error)
+
+ ActionRemove(*Credential) (*Credential, error)
+
+ ActionUpdate(*Credential) (*Credential, error)
+}
+
+func newCredentialClient(rancherClient *RancherClient) *CredentialClient {
+ return &CredentialClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *CredentialClient) Create(container *Credential) (*Credential, error) {
+ resp := &Credential{}
+ err := c.rancherClient.doCreate(CREDENTIAL_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *CredentialClient) Update(existing *Credential, updates interface{}) (*Credential, error) {
+ resp := &Credential{}
+ err := c.rancherClient.doUpdate(CREDENTIAL_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *CredentialClient) List(opts *ListOpts) (*CredentialCollection, error) {
+ resp := &CredentialCollection{}
+ err := c.rancherClient.doList(CREDENTIAL_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *CredentialCollection) Next() (*CredentialCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &CredentialCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *CredentialClient) ById(id string) (*Credential, error) {
+ resp := &Credential{}
+ err := c.rancherClient.doById(CREDENTIAL_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *CredentialClient) Delete(container *Credential) error {
+ return c.rancherClient.doResourceDelete(CREDENTIAL_TYPE, &container.Resource)
+}
+
+func (c *CredentialClient) ActionActivate(resource *Credential) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(CREDENTIAL_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *CredentialClient) ActionCreate(resource *Credential) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(CREDENTIAL_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *CredentialClient) ActionDeactivate(resource *Credential) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(CREDENTIAL_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *CredentialClient) ActionPurge(resource *Credential) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(CREDENTIAL_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *CredentialClient) ActionRemove(resource *Credential) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(CREDENTIAL_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *CredentialClient) ActionUpdate(resource *Credential) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(CREDENTIAL_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_databasechangelog.go b/vendor/github.com/rancher/go-rancher/client/generated_databasechangelog.go
new file mode 100644
index 00000000..0d935f8a
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_databasechangelog.go
@@ -0,0 +1,97 @@
+package client
+
+const (
+ DATABASECHANGELOG_TYPE = "databasechangelog"
+)
+
+type Databasechangelog struct {
+ Resource
+
+ Author string `json:"author,omitempty" yaml:"author,omitempty"`
+
+ Comments string `json:"comments,omitempty" yaml:"comments,omitempty"`
+
+ Dateexecuted string `json:"dateexecuted,omitempty" yaml:"dateexecuted,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Exectype string `json:"exectype,omitempty" yaml:"exectype,omitempty"`
+
+ Filename string `json:"filename,omitempty" yaml:"filename,omitempty"`
+
+ Liquibase string `json:"liquibase,omitempty" yaml:"liquibase,omitempty"`
+
+ Md5sum string `json:"md5sum,omitempty" yaml:"md5sum,omitempty"`
+
+ Orderexecuted int64 `json:"orderexecuted,omitempty" yaml:"orderexecuted,omitempty"`
+
+ Tag string `json:"tag,omitempty" yaml:"tag,omitempty"`
+}
+
+type DatabasechangelogCollection struct {
+ Collection
+ Data []Databasechangelog `json:"data,omitempty"`
+ client *DatabasechangelogClient
+}
+
+type DatabasechangelogClient struct {
+ rancherClient *RancherClient
+}
+
+type DatabasechangelogOperations interface {
+ List(opts *ListOpts) (*DatabasechangelogCollection, error)
+ Create(opts *Databasechangelog) (*Databasechangelog, error)
+ Update(existing *Databasechangelog, updates interface{}) (*Databasechangelog, error)
+ ById(id string) (*Databasechangelog, error)
+ Delete(container *Databasechangelog) error
+}
+
+func newDatabasechangelogClient(rancherClient *RancherClient) *DatabasechangelogClient {
+ return &DatabasechangelogClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *DatabasechangelogClient) Create(container *Databasechangelog) (*Databasechangelog, error) {
+ resp := &Databasechangelog{}
+ err := c.rancherClient.doCreate(DATABASECHANGELOG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *DatabasechangelogClient) Update(existing *Databasechangelog, updates interface{}) (*Databasechangelog, error) {
+ resp := &Databasechangelog{}
+ err := c.rancherClient.doUpdate(DATABASECHANGELOG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *DatabasechangelogClient) List(opts *ListOpts) (*DatabasechangelogCollection, error) {
+ resp := &DatabasechangelogCollection{}
+ err := c.rancherClient.doList(DATABASECHANGELOG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *DatabasechangelogCollection) Next() (*DatabasechangelogCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &DatabasechangelogCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *DatabasechangelogClient) ById(id string) (*Databasechangelog, error) {
+ resp := &Databasechangelog{}
+ err := c.rancherClient.doById(DATABASECHANGELOG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *DatabasechangelogClient) Delete(container *Databasechangelog) error {
+ return c.rancherClient.doResourceDelete(DATABASECHANGELOG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_databasechangeloglock.go b/vendor/github.com/rancher/go-rancher/client/generated_databasechangeloglock.go
new file mode 100644
index 00000000..a93c015a
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_databasechangeloglock.go
@@ -0,0 +1,83 @@
+package client
+
+const (
+ DATABASECHANGELOGLOCK_TYPE = "databasechangeloglock"
+)
+
+type Databasechangeloglock struct {
+ Resource
+
+ Locked bool `json:"locked,omitempty" yaml:"locked,omitempty"`
+
+ Lockedby string `json:"lockedby,omitempty" yaml:"lockedby,omitempty"`
+
+ Lockgranted string `json:"lockgranted,omitempty" yaml:"lockgranted,omitempty"`
+}
+
+type DatabasechangeloglockCollection struct {
+ Collection
+ Data []Databasechangeloglock `json:"data,omitempty"`
+ client *DatabasechangeloglockClient
+}
+
+type DatabasechangeloglockClient struct {
+ rancherClient *RancherClient
+}
+
+type DatabasechangeloglockOperations interface {
+ List(opts *ListOpts) (*DatabasechangeloglockCollection, error)
+ Create(opts *Databasechangeloglock) (*Databasechangeloglock, error)
+ Update(existing *Databasechangeloglock, updates interface{}) (*Databasechangeloglock, error)
+ ById(id string) (*Databasechangeloglock, error)
+ Delete(container *Databasechangeloglock) error
+}
+
+func newDatabasechangeloglockClient(rancherClient *RancherClient) *DatabasechangeloglockClient {
+ return &DatabasechangeloglockClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *DatabasechangeloglockClient) Create(container *Databasechangeloglock) (*Databasechangeloglock, error) {
+ resp := &Databasechangeloglock{}
+ err := c.rancherClient.doCreate(DATABASECHANGELOGLOCK_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *DatabasechangeloglockClient) Update(existing *Databasechangeloglock, updates interface{}) (*Databasechangeloglock, error) {
+ resp := &Databasechangeloglock{}
+ err := c.rancherClient.doUpdate(DATABASECHANGELOGLOCK_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *DatabasechangeloglockClient) List(opts *ListOpts) (*DatabasechangeloglockCollection, error) {
+ resp := &DatabasechangeloglockCollection{}
+ err := c.rancherClient.doList(DATABASECHANGELOGLOCK_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *DatabasechangeloglockCollection) Next() (*DatabasechangeloglockCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &DatabasechangeloglockCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *DatabasechangeloglockClient) ById(id string) (*Databasechangeloglock, error) {
+ resp := &Databasechangeloglock{}
+ err := c.rancherClient.doById(DATABASECHANGELOGLOCK_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *DatabasechangeloglockClient) Delete(container *Databasechangeloglock) error {
+ return c.rancherClient.doResourceDelete(DATABASECHANGELOGLOCK_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_digitalocean_config.go b/vendor/github.com/rancher/go-rancher/client/generated_digitalocean_config.go
new file mode 100644
index 00000000..64597575
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_digitalocean_config.go
@@ -0,0 +1,99 @@
+package client
+
+const (
+ DIGITALOCEAN_CONFIG_TYPE = "digitaloceanConfig"
+)
+
+type DigitaloceanConfig struct {
+ Resource
+
+ AccessToken string `json:"accessToken,omitempty" yaml:"access_token,omitempty"`
+
+ Backups bool `json:"backups,omitempty" yaml:"backups,omitempty"`
+
+ Image string `json:"image,omitempty" yaml:"image,omitempty"`
+
+ Ipv6 bool `json:"ipv6,omitempty" yaml:"ipv6,omitempty"`
+
+ PrivateNetworking bool `json:"privateNetworking,omitempty" yaml:"private_networking,omitempty"`
+
+ Region string `json:"region,omitempty" yaml:"region,omitempty"`
+
+ Size string `json:"size,omitempty" yaml:"size,omitempty"`
+
+ SshKeyFingerprint string `json:"sshKeyFingerprint,omitempty" yaml:"ssh_key_fingerprint,omitempty"`
+
+ SshPort string `json:"sshPort,omitempty" yaml:"ssh_port,omitempty"`
+
+ SshUser string `json:"sshUser,omitempty" yaml:"ssh_user,omitempty"`
+
+ Userdata string `json:"userdata,omitempty" yaml:"userdata,omitempty"`
+}
+
+type DigitaloceanConfigCollection struct {
+ Collection
+ Data []DigitaloceanConfig `json:"data,omitempty"`
+ client *DigitaloceanConfigClient
+}
+
+type DigitaloceanConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type DigitaloceanConfigOperations interface {
+ List(opts *ListOpts) (*DigitaloceanConfigCollection, error)
+ Create(opts *DigitaloceanConfig) (*DigitaloceanConfig, error)
+ Update(existing *DigitaloceanConfig, updates interface{}) (*DigitaloceanConfig, error)
+ ById(id string) (*DigitaloceanConfig, error)
+ Delete(container *DigitaloceanConfig) error
+}
+
+func newDigitaloceanConfigClient(rancherClient *RancherClient) *DigitaloceanConfigClient {
+ return &DigitaloceanConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *DigitaloceanConfigClient) Create(container *DigitaloceanConfig) (*DigitaloceanConfig, error) {
+ resp := &DigitaloceanConfig{}
+ err := c.rancherClient.doCreate(DIGITALOCEAN_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *DigitaloceanConfigClient) Update(existing *DigitaloceanConfig, updates interface{}) (*DigitaloceanConfig, error) {
+ resp := &DigitaloceanConfig{}
+ err := c.rancherClient.doUpdate(DIGITALOCEAN_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *DigitaloceanConfigClient) List(opts *ListOpts) (*DigitaloceanConfigCollection, error) {
+ resp := &DigitaloceanConfigCollection{}
+ err := c.rancherClient.doList(DIGITALOCEAN_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *DigitaloceanConfigCollection) Next() (*DigitaloceanConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &DigitaloceanConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *DigitaloceanConfigClient) ById(id string) (*DigitaloceanConfig, error) {
+ resp := &DigitaloceanConfig{}
+ err := c.rancherClient.doById(DIGITALOCEAN_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *DigitaloceanConfigClient) Delete(container *DigitaloceanConfig) error {
+ return c.rancherClient.doResourceDelete(DIGITALOCEAN_CONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_dns_service.go b/vendor/github.com/rancher/go-rancher/client/generated_dns_service.go
new file mode 100644
index 00000000..a8398b3d
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_dns_service.go
@@ -0,0 +1,279 @@
+package client
+
+const (
+ DNS_SERVICE_TYPE = "dnsService"
+)
+
+type DnsService struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ AssignServiceIpAddress bool `json:"assignServiceIpAddress,omitempty" yaml:"assign_service_ip_address,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"`
+
+ HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"`
+
+ Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ RetainIp bool `json:"retainIp,omitempty" yaml:"retain_ip,omitempty"`
+
+ SelectorLink string `json:"selectorLink,omitempty" yaml:"selector_link,omitempty"`
+
+ StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Upgrade *ServiceUpgrade `json:"upgrade,omitempty" yaml:"upgrade,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type DnsServiceCollection struct {
+ Collection
+ Data []DnsService `json:"data,omitempty"`
+ client *DnsServiceClient
+}
+
+type DnsServiceClient struct {
+ rancherClient *RancherClient
+}
+
+type DnsServiceOperations interface {
+ List(opts *ListOpts) (*DnsServiceCollection, error)
+ Create(opts *DnsService) (*DnsService, error)
+ Update(existing *DnsService, updates interface{}) (*DnsService, error)
+ ById(id string) (*DnsService, error)
+ Delete(container *DnsService) error
+
+ ActionActivate(*DnsService) (*Service, error)
+
+ ActionAddservicelink(*DnsService, *AddRemoveServiceLinkInput) (*Service, error)
+
+ ActionCancelrollback(*DnsService) (*Service, error)
+
+ ActionCancelupgrade(*DnsService) (*Service, error)
+
+ ActionCreate(*DnsService) (*Service, error)
+
+ ActionDeactivate(*DnsService) (*Service, error)
+
+ ActionFinishupgrade(*DnsService) (*Service, error)
+
+ ActionRemove(*DnsService) (*Service, error)
+
+ ActionRemoveservicelink(*DnsService, *AddRemoveServiceLinkInput) (*Service, error)
+
+ ActionRestart(*DnsService, *ServiceRestart) (*Service, error)
+
+ ActionRollback(*DnsService) (*Service, error)
+
+ ActionSetservicelinks(*DnsService, *SetServiceLinksInput) (*Service, error)
+
+ ActionUpdate(*DnsService) (*Service, error)
+
+ ActionUpgrade(*DnsService, *ServiceUpgrade) (*Service, error)
+}
+
+func newDnsServiceClient(rancherClient *RancherClient) *DnsServiceClient {
+ return &DnsServiceClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *DnsServiceClient) Create(container *DnsService) (*DnsService, error) {
+ resp := &DnsService{}
+ err := c.rancherClient.doCreate(DNS_SERVICE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *DnsServiceClient) Update(existing *DnsService, updates interface{}) (*DnsService, error) {
+ resp := &DnsService{}
+ err := c.rancherClient.doUpdate(DNS_SERVICE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *DnsServiceClient) List(opts *ListOpts) (*DnsServiceCollection, error) {
+ resp := &DnsServiceCollection{}
+ err := c.rancherClient.doList(DNS_SERVICE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *DnsServiceCollection) Next() (*DnsServiceCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &DnsServiceCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *DnsServiceClient) ById(id string) (*DnsService, error) {
+ resp := &DnsService{}
+ err := c.rancherClient.doById(DNS_SERVICE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *DnsServiceClient) Delete(container *DnsService) error {
+ return c.rancherClient.doResourceDelete(DNS_SERVICE_TYPE, &container.Resource)
+}
+
+func (c *DnsServiceClient) ActionActivate(resource *DnsService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *DnsServiceClient) ActionAddservicelink(resource *DnsService, input *AddRemoveServiceLinkInput) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "addservicelink", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *DnsServiceClient) ActionCancelrollback(resource *DnsService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *DnsServiceClient) ActionCancelupgrade(resource *DnsService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *DnsServiceClient) ActionCreate(resource *DnsService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *DnsServiceClient) ActionDeactivate(resource *DnsService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *DnsServiceClient) ActionFinishupgrade(resource *DnsService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *DnsServiceClient) ActionRemove(resource *DnsService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *DnsServiceClient) ActionRemoveservicelink(resource *DnsService, input *AddRemoveServiceLinkInput) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "removeservicelink", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *DnsServiceClient) ActionRestart(resource *DnsService, input *ServiceRestart) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "restart", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *DnsServiceClient) ActionRollback(resource *DnsService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *DnsServiceClient) ActionSetservicelinks(resource *DnsService, input *SetServiceLinksInput) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "setservicelinks", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *DnsServiceClient) ActionUpdate(resource *DnsService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *DnsServiceClient) ActionUpgrade(resource *DnsService, input *ServiceUpgrade) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "upgrade", &resource.Resource, input, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_docker_build.go b/vendor/github.com/rancher/go-rancher/client/generated_docker_build.go
new file mode 100644
index 00000000..a1b1e371
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_docker_build.go
@@ -0,0 +1,89 @@
+package client
+
+const (
+ DOCKER_BUILD_TYPE = "dockerBuild"
+)
+
+type DockerBuild struct {
+ Resource
+
+ Context string `json:"context,omitempty" yaml:"context,omitempty"`
+
+ Dockerfile string `json:"dockerfile,omitempty" yaml:"dockerfile,omitempty"`
+
+ Forcerm bool `json:"forcerm,omitempty" yaml:"forcerm,omitempty"`
+
+ Nocache bool `json:"nocache,omitempty" yaml:"nocache,omitempty"`
+
+ Remote string `json:"remote,omitempty" yaml:"remote,omitempty"`
+
+ Rm bool `json:"rm,omitempty" yaml:"rm,omitempty"`
+}
+
+type DockerBuildCollection struct {
+ Collection
+ Data []DockerBuild `json:"data,omitempty"`
+ client *DockerBuildClient
+}
+
+type DockerBuildClient struct {
+ rancherClient *RancherClient
+}
+
+type DockerBuildOperations interface {
+ List(opts *ListOpts) (*DockerBuildCollection, error)
+ Create(opts *DockerBuild) (*DockerBuild, error)
+ Update(existing *DockerBuild, updates interface{}) (*DockerBuild, error)
+ ById(id string) (*DockerBuild, error)
+ Delete(container *DockerBuild) error
+}
+
+func newDockerBuildClient(rancherClient *RancherClient) *DockerBuildClient {
+ return &DockerBuildClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *DockerBuildClient) Create(container *DockerBuild) (*DockerBuild, error) {
+ resp := &DockerBuild{}
+ err := c.rancherClient.doCreate(DOCKER_BUILD_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *DockerBuildClient) Update(existing *DockerBuild, updates interface{}) (*DockerBuild, error) {
+ resp := &DockerBuild{}
+ err := c.rancherClient.doUpdate(DOCKER_BUILD_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *DockerBuildClient) List(opts *ListOpts) (*DockerBuildCollection, error) {
+ resp := &DockerBuildCollection{}
+ err := c.rancherClient.doList(DOCKER_BUILD_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *DockerBuildCollection) Next() (*DockerBuildCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &DockerBuildCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *DockerBuildClient) ById(id string) (*DockerBuild, error) {
+ resp := &DockerBuild{}
+ err := c.rancherClient.doById(DOCKER_BUILD_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *DockerBuildClient) Delete(container *DockerBuild) error {
+ return c.rancherClient.doResourceDelete(DOCKER_BUILD_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_dynamic_schema.go b/vendor/github.com/rancher/go-rancher/client/generated_dynamic_schema.go
new file mode 100644
index 00000000..6ee36740
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_dynamic_schema.go
@@ -0,0 +1,129 @@
+package client
+
+const (
+ DYNAMIC_SCHEMA_TYPE = "dynamicSchema"
+)
+
+type DynamicSchema struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Definition string `json:"definition,omitempty" yaml:"definition,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Parent string `json:"parent,omitempty" yaml:"parent,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ Roles []string `json:"roles,omitempty" yaml:"roles,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type DynamicSchemaCollection struct {
+ Collection
+ Data []DynamicSchema `json:"data,omitempty"`
+ client *DynamicSchemaClient
+}
+
+type DynamicSchemaClient struct {
+ rancherClient *RancherClient
+}
+
+type DynamicSchemaOperations interface {
+ List(opts *ListOpts) (*DynamicSchemaCollection, error)
+ Create(opts *DynamicSchema) (*DynamicSchema, error)
+ Update(existing *DynamicSchema, updates interface{}) (*DynamicSchema, error)
+ ById(id string) (*DynamicSchema, error)
+ Delete(container *DynamicSchema) error
+
+ ActionCreate(*DynamicSchema) (*DynamicSchema, error)
+
+ ActionRemove(*DynamicSchema) (*DynamicSchema, error)
+}
+
+func newDynamicSchemaClient(rancherClient *RancherClient) *DynamicSchemaClient {
+ return &DynamicSchemaClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *DynamicSchemaClient) Create(container *DynamicSchema) (*DynamicSchema, error) {
+ resp := &DynamicSchema{}
+ err := c.rancherClient.doCreate(DYNAMIC_SCHEMA_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *DynamicSchemaClient) Update(existing *DynamicSchema, updates interface{}) (*DynamicSchema, error) {
+ resp := &DynamicSchema{}
+ err := c.rancherClient.doUpdate(DYNAMIC_SCHEMA_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *DynamicSchemaClient) List(opts *ListOpts) (*DynamicSchemaCollection, error) {
+ resp := &DynamicSchemaCollection{}
+ err := c.rancherClient.doList(DYNAMIC_SCHEMA_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *DynamicSchemaCollection) Next() (*DynamicSchemaCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &DynamicSchemaCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *DynamicSchemaClient) ById(id string) (*DynamicSchema, error) {
+ resp := &DynamicSchema{}
+ err := c.rancherClient.doById(DYNAMIC_SCHEMA_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *DynamicSchemaClient) Delete(container *DynamicSchema) error {
+ return c.rancherClient.doResourceDelete(DYNAMIC_SCHEMA_TYPE, &container.Resource)
+}
+
+func (c *DynamicSchemaClient) ActionCreate(resource *DynamicSchema) (*DynamicSchema, error) {
+
+ resp := &DynamicSchema{}
+
+ err := c.rancherClient.doAction(DYNAMIC_SCHEMA_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *DynamicSchemaClient) ActionRemove(resource *DynamicSchema) (*DynamicSchema, error) {
+
+ resp := &DynamicSchema{}
+
+ err := c.rancherClient.doAction(DYNAMIC_SCHEMA_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_environment.go b/vendor/github.com/rancher/go-rancher/client/generated_environment.go
new file mode 100644
index 00000000..bbf3caef
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_environment.go
@@ -0,0 +1,264 @@
+package client
+
+const (
+ ENVIRONMENT_TYPE = "environment"
+)
+
+type Environment struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ DockerCompose string `json:"dockerCompose,omitempty" yaml:"docker_compose,omitempty"`
+
+ Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Outputs map[string]interface{} `json:"outputs,omitempty" yaml:"outputs,omitempty"`
+
+ PreviousEnvironment map[string]interface{} `json:"previousEnvironment,omitempty" yaml:"previous_environment,omitempty"`
+
+ PreviousExternalId string `json:"previousExternalId,omitempty" yaml:"previous_external_id,omitempty"`
+
+ RancherCompose string `json:"rancherCompose,omitempty" yaml:"rancher_compose,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type EnvironmentCollection struct {
+ Collection
+ Data []Environment `json:"data,omitempty"`
+ client *EnvironmentClient
+}
+
+type EnvironmentClient struct {
+ rancherClient *RancherClient
+}
+
+type EnvironmentOperations interface {
+ List(opts *ListOpts) (*EnvironmentCollection, error)
+ Create(opts *Environment) (*Environment, error)
+ Update(existing *Environment, updates interface{}) (*Environment, error)
+ ById(id string) (*Environment, error)
+ Delete(container *Environment) error
+
+ ActionActivateservices(*Environment) (*Environment, error)
+
+ ActionAddoutputs(*Environment, *AddOutputsInput) (*Environment, error)
+
+ ActionCancelrollback(*Environment) (*Environment, error)
+
+ ActionCancelupgrade(*Environment) (*Environment, error)
+
+ ActionCreate(*Environment) (*Environment, error)
+
+ ActionDeactivateservices(*Environment) (*Environment, error)
+
+ ActionError(*Environment) (*Environment, error)
+
+ ActionExportconfig(*Environment, *ComposeConfigInput) (*ComposeConfig, error)
+
+ ActionFinishupgrade(*Environment) (*Environment, error)
+
+ ActionRemove(*Environment) (*Environment, error)
+
+ ActionRollback(*Environment) (*Environment, error)
+
+ ActionUpdate(*Environment) (*Environment, error)
+
+ ActionUpgrade(*Environment, *EnvironmentUpgrade) (*Environment, error)
+}
+
+func newEnvironmentClient(rancherClient *RancherClient) *EnvironmentClient {
+ return &EnvironmentClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *EnvironmentClient) Create(container *Environment) (*Environment, error) {
+ resp := &Environment{}
+ err := c.rancherClient.doCreate(ENVIRONMENT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *EnvironmentClient) Update(existing *Environment, updates interface{}) (*Environment, error) {
+ resp := &Environment{}
+ err := c.rancherClient.doUpdate(ENVIRONMENT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *EnvironmentClient) List(opts *ListOpts) (*EnvironmentCollection, error) {
+ resp := &EnvironmentCollection{}
+ err := c.rancherClient.doList(ENVIRONMENT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *EnvironmentCollection) Next() (*EnvironmentCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &EnvironmentCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *EnvironmentClient) ById(id string) (*Environment, error) {
+ resp := &Environment{}
+ err := c.rancherClient.doById(ENVIRONMENT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *EnvironmentClient) Delete(container *Environment) error {
+ return c.rancherClient.doResourceDelete(ENVIRONMENT_TYPE, &container.Resource)
+}
+
+func (c *EnvironmentClient) ActionActivateservices(resource *Environment) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "activateservices", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *EnvironmentClient) ActionAddoutputs(resource *Environment, input *AddOutputsInput) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "addoutputs", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *EnvironmentClient) ActionCancelrollback(resource *Environment) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "cancelrollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *EnvironmentClient) ActionCancelupgrade(resource *Environment) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *EnvironmentClient) ActionCreate(resource *Environment) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *EnvironmentClient) ActionDeactivateservices(resource *Environment) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "deactivateservices", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *EnvironmentClient) ActionError(resource *Environment) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "error", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *EnvironmentClient) ActionExportconfig(resource *Environment, input *ComposeConfigInput) (*ComposeConfig, error) {
+
+ resp := &ComposeConfig{}
+
+ err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "exportconfig", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *EnvironmentClient) ActionFinishupgrade(resource *Environment) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "finishupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *EnvironmentClient) ActionRemove(resource *Environment) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *EnvironmentClient) ActionRollback(resource *Environment) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "rollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *EnvironmentClient) ActionUpdate(resource *Environment) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *EnvironmentClient) ActionUpgrade(resource *Environment, input *EnvironmentUpgrade) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "upgrade", &resource.Resource, input, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_environment_upgrade.go b/vendor/github.com/rancher/go-rancher/client/generated_environment_upgrade.go
new file mode 100644
index 00000000..7a7700f7
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_environment_upgrade.go
@@ -0,0 +1,85 @@
+package client
+
+const (
+ ENVIRONMENT_UPGRADE_TYPE = "environmentUpgrade"
+)
+
+type EnvironmentUpgrade struct {
+ Resource
+
+ DockerCompose string `json:"dockerCompose,omitempty" yaml:"docker_compose,omitempty"`
+
+ Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ RancherCompose string `json:"rancherCompose,omitempty" yaml:"rancher_compose,omitempty"`
+}
+
+type EnvironmentUpgradeCollection struct {
+ Collection
+ Data []EnvironmentUpgrade `json:"data,omitempty"`
+ client *EnvironmentUpgradeClient
+}
+
+type EnvironmentUpgradeClient struct {
+ rancherClient *RancherClient
+}
+
+type EnvironmentUpgradeOperations interface {
+ List(opts *ListOpts) (*EnvironmentUpgradeCollection, error)
+ Create(opts *EnvironmentUpgrade) (*EnvironmentUpgrade, error)
+ Update(existing *EnvironmentUpgrade, updates interface{}) (*EnvironmentUpgrade, error)
+ ById(id string) (*EnvironmentUpgrade, error)
+ Delete(container *EnvironmentUpgrade) error
+}
+
+func newEnvironmentUpgradeClient(rancherClient *RancherClient) *EnvironmentUpgradeClient {
+ return &EnvironmentUpgradeClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *EnvironmentUpgradeClient) Create(container *EnvironmentUpgrade) (*EnvironmentUpgrade, error) {
+ resp := &EnvironmentUpgrade{}
+ err := c.rancherClient.doCreate(ENVIRONMENT_UPGRADE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *EnvironmentUpgradeClient) Update(existing *EnvironmentUpgrade, updates interface{}) (*EnvironmentUpgrade, error) {
+ resp := &EnvironmentUpgrade{}
+ err := c.rancherClient.doUpdate(ENVIRONMENT_UPGRADE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *EnvironmentUpgradeClient) List(opts *ListOpts) (*EnvironmentUpgradeCollection, error) {
+ resp := &EnvironmentUpgradeCollection{}
+ err := c.rancherClient.doList(ENVIRONMENT_UPGRADE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *EnvironmentUpgradeCollection) Next() (*EnvironmentUpgradeCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &EnvironmentUpgradeCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *EnvironmentUpgradeClient) ById(id string) (*EnvironmentUpgrade, error) {
+ resp := &EnvironmentUpgrade{}
+ err := c.rancherClient.doById(ENVIRONMENT_UPGRADE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *EnvironmentUpgradeClient) Delete(container *EnvironmentUpgrade) error {
+ return c.rancherClient.doResourceDelete(ENVIRONMENT_UPGRADE_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_extension_implementation.go b/vendor/github.com/rancher/go-rancher/client/generated_extension_implementation.go
new file mode 100644
index 00000000..21638338
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_extension_implementation.go
@@ -0,0 +1,83 @@
+package client
+
+const (
+ EXTENSION_IMPLEMENTATION_TYPE = "extensionImplementation"
+)
+
+type ExtensionImplementation struct {
+ Resource
+
+ ClassName string `json:"className,omitempty" yaml:"class_name,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Properties map[string]interface{} `json:"properties,omitempty" yaml:"properties,omitempty"`
+}
+
+type ExtensionImplementationCollection struct {
+ Collection
+ Data []ExtensionImplementation `json:"data,omitempty"`
+ client *ExtensionImplementationClient
+}
+
+type ExtensionImplementationClient struct {
+ rancherClient *RancherClient
+}
+
+type ExtensionImplementationOperations interface {
+ List(opts *ListOpts) (*ExtensionImplementationCollection, error)
+ Create(opts *ExtensionImplementation) (*ExtensionImplementation, error)
+ Update(existing *ExtensionImplementation, updates interface{}) (*ExtensionImplementation, error)
+ ById(id string) (*ExtensionImplementation, error)
+ Delete(container *ExtensionImplementation) error
+}
+
+func newExtensionImplementationClient(rancherClient *RancherClient) *ExtensionImplementationClient {
+ return &ExtensionImplementationClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ExtensionImplementationClient) Create(container *ExtensionImplementation) (*ExtensionImplementation, error) {
+ resp := &ExtensionImplementation{}
+ err := c.rancherClient.doCreate(EXTENSION_IMPLEMENTATION_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ExtensionImplementationClient) Update(existing *ExtensionImplementation, updates interface{}) (*ExtensionImplementation, error) {
+ resp := &ExtensionImplementation{}
+ err := c.rancherClient.doUpdate(EXTENSION_IMPLEMENTATION_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ExtensionImplementationClient) List(opts *ListOpts) (*ExtensionImplementationCollection, error) {
+ resp := &ExtensionImplementationCollection{}
+ err := c.rancherClient.doList(EXTENSION_IMPLEMENTATION_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ExtensionImplementationCollection) Next() (*ExtensionImplementationCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ExtensionImplementationCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ExtensionImplementationClient) ById(id string) (*ExtensionImplementation, error) {
+ resp := &ExtensionImplementation{}
+ err := c.rancherClient.doById(EXTENSION_IMPLEMENTATION_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ExtensionImplementationClient) Delete(container *ExtensionImplementation) error {
+ return c.rancherClient.doResourceDelete(EXTENSION_IMPLEMENTATION_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_extension_point.go b/vendor/github.com/rancher/go-rancher/client/generated_extension_point.go
new file mode 100644
index 00000000..ab073008
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_extension_point.go
@@ -0,0 +1,87 @@
+package client
+
+const (
+ EXTENSION_POINT_TYPE = "extensionPoint"
+)
+
+type ExtensionPoint struct {
+ Resource
+
+ ExcludeSetting string `json:"excludeSetting,omitempty" yaml:"exclude_setting,omitempty"`
+
+ Implementations []interface{} `json:"implementations,omitempty" yaml:"implementations,omitempty"`
+
+ IncludeSetting string `json:"includeSetting,omitempty" yaml:"include_setting,omitempty"`
+
+ ListSetting string `json:"listSetting,omitempty" yaml:"list_setting,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+}
+
+type ExtensionPointCollection struct {
+ Collection
+ Data []ExtensionPoint `json:"data,omitempty"`
+ client *ExtensionPointClient
+}
+
+type ExtensionPointClient struct {
+ rancherClient *RancherClient
+}
+
+type ExtensionPointOperations interface {
+ List(opts *ListOpts) (*ExtensionPointCollection, error)
+ Create(opts *ExtensionPoint) (*ExtensionPoint, error)
+ Update(existing *ExtensionPoint, updates interface{}) (*ExtensionPoint, error)
+ ById(id string) (*ExtensionPoint, error)
+ Delete(container *ExtensionPoint) error
+}
+
+func newExtensionPointClient(rancherClient *RancherClient) *ExtensionPointClient {
+ return &ExtensionPointClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ExtensionPointClient) Create(container *ExtensionPoint) (*ExtensionPoint, error) {
+ resp := &ExtensionPoint{}
+ err := c.rancherClient.doCreate(EXTENSION_POINT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ExtensionPointClient) Update(existing *ExtensionPoint, updates interface{}) (*ExtensionPoint, error) {
+ resp := &ExtensionPoint{}
+ err := c.rancherClient.doUpdate(EXTENSION_POINT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ExtensionPointClient) List(opts *ListOpts) (*ExtensionPointCollection, error) {
+ resp := &ExtensionPointCollection{}
+ err := c.rancherClient.doList(EXTENSION_POINT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ExtensionPointCollection) Next() (*ExtensionPointCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ExtensionPointCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ExtensionPointClient) ById(id string) (*ExtensionPoint, error) {
+ resp := &ExtensionPoint{}
+ err := c.rancherClient.doById(EXTENSION_POINT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ExtensionPointClient) Delete(container *ExtensionPoint) error {
+ return c.rancherClient.doResourceDelete(EXTENSION_POINT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_dns_event.go b/vendor/github.com/rancher/go-rancher/client/generated_external_dns_event.go
new file mode 100644
index 00000000..e4c6c929
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_external_dns_event.go
@@ -0,0 +1,129 @@
+package client
+
+const (
+ EXTERNAL_DNS_EVENT_TYPE = "externalDnsEvent"
+)
+
+type ExternalDnsEvent struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"`
+
+ ServiceName string `json:"serviceName,omitempty" yaml:"service_name,omitempty"`
+
+ StackName string `json:"stackName,omitempty" yaml:"stack_name,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ExternalDnsEventCollection struct {
+ Collection
+ Data []ExternalDnsEvent `json:"data,omitempty"`
+ client *ExternalDnsEventClient
+}
+
+type ExternalDnsEventClient struct {
+ rancherClient *RancherClient
+}
+
+type ExternalDnsEventOperations interface {
+ List(opts *ListOpts) (*ExternalDnsEventCollection, error)
+ Create(opts *ExternalDnsEvent) (*ExternalDnsEvent, error)
+ Update(existing *ExternalDnsEvent, updates interface{}) (*ExternalDnsEvent, error)
+ ById(id string) (*ExternalDnsEvent, error)
+ Delete(container *ExternalDnsEvent) error
+
+ ActionCreate(*ExternalDnsEvent) (*ExternalEvent, error)
+
+ ActionRemove(*ExternalDnsEvent) (*ExternalEvent, error)
+}
+
+func newExternalDnsEventClient(rancherClient *RancherClient) *ExternalDnsEventClient {
+ return &ExternalDnsEventClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ExternalDnsEventClient) Create(container *ExternalDnsEvent) (*ExternalDnsEvent, error) {
+ resp := &ExternalDnsEvent{}
+ err := c.rancherClient.doCreate(EXTERNAL_DNS_EVENT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ExternalDnsEventClient) Update(existing *ExternalDnsEvent, updates interface{}) (*ExternalDnsEvent, error) {
+ resp := &ExternalDnsEvent{}
+ err := c.rancherClient.doUpdate(EXTERNAL_DNS_EVENT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ExternalDnsEventClient) List(opts *ListOpts) (*ExternalDnsEventCollection, error) {
+ resp := &ExternalDnsEventCollection{}
+ err := c.rancherClient.doList(EXTERNAL_DNS_EVENT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ExternalDnsEventCollection) Next() (*ExternalDnsEventCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ExternalDnsEventCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ExternalDnsEventClient) ById(id string) (*ExternalDnsEvent, error) {
+ resp := &ExternalDnsEvent{}
+ err := c.rancherClient.doById(EXTERNAL_DNS_EVENT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ExternalDnsEventClient) Delete(container *ExternalDnsEvent) error {
+ return c.rancherClient.doResourceDelete(EXTERNAL_DNS_EVENT_TYPE, &container.Resource)
+}
+
+func (c *ExternalDnsEventClient) ActionCreate(resource *ExternalDnsEvent) (*ExternalEvent, error) {
+
+ resp := &ExternalEvent{}
+
+ err := c.rancherClient.doAction(EXTERNAL_DNS_EVENT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalDnsEventClient) ActionRemove(resource *ExternalDnsEvent) (*ExternalEvent, error) {
+
+ resp := &ExternalEvent{}
+
+ err := c.rancherClient.doAction(EXTERNAL_DNS_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_event.go b/vendor/github.com/rancher/go-rancher/client/generated_external_event.go
new file mode 100644
index 00000000..3b43545a
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_external_event.go
@@ -0,0 +1,123 @@
+package client
+
+const (
+ EXTERNAL_EVENT_TYPE = "externalEvent"
+)
+
+type ExternalEvent struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ExternalEventCollection struct {
+ Collection
+ Data []ExternalEvent `json:"data,omitempty"`
+ client *ExternalEventClient
+}
+
+type ExternalEventClient struct {
+ rancherClient *RancherClient
+}
+
+type ExternalEventOperations interface {
+ List(opts *ListOpts) (*ExternalEventCollection, error)
+ Create(opts *ExternalEvent) (*ExternalEvent, error)
+ Update(existing *ExternalEvent, updates interface{}) (*ExternalEvent, error)
+ ById(id string) (*ExternalEvent, error)
+ Delete(container *ExternalEvent) error
+
+ ActionCreate(*ExternalEvent) (*ExternalEvent, error)
+
+ ActionRemove(*ExternalEvent) (*ExternalEvent, error)
+}
+
+func newExternalEventClient(rancherClient *RancherClient) *ExternalEventClient {
+ return &ExternalEventClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ExternalEventClient) Create(container *ExternalEvent) (*ExternalEvent, error) {
+ resp := &ExternalEvent{}
+ err := c.rancherClient.doCreate(EXTERNAL_EVENT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ExternalEventClient) Update(existing *ExternalEvent, updates interface{}) (*ExternalEvent, error) {
+ resp := &ExternalEvent{}
+ err := c.rancherClient.doUpdate(EXTERNAL_EVENT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ExternalEventClient) List(opts *ListOpts) (*ExternalEventCollection, error) {
+ resp := &ExternalEventCollection{}
+ err := c.rancherClient.doList(EXTERNAL_EVENT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ExternalEventCollection) Next() (*ExternalEventCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ExternalEventCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ExternalEventClient) ById(id string) (*ExternalEvent, error) {
+ resp := &ExternalEvent{}
+ err := c.rancherClient.doById(EXTERNAL_EVENT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ExternalEventClient) Delete(container *ExternalEvent) error {
+ return c.rancherClient.doResourceDelete(EXTERNAL_EVENT_TYPE, &container.Resource)
+}
+
+func (c *ExternalEventClient) ActionCreate(resource *ExternalEvent) (*ExternalEvent, error) {
+
+ resp := &ExternalEvent{}
+
+ err := c.rancherClient.doAction(EXTERNAL_EVENT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalEventClient) ActionRemove(resource *ExternalEvent) (*ExternalEvent, error) {
+
+ resp := &ExternalEvent{}
+
+ err := c.rancherClient.doAction(EXTERNAL_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_handler.go b/vendor/github.com/rancher/go-rancher/client/generated_external_handler.go
new file mode 100644
index 00000000..ae7dcda6
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_external_handler.go
@@ -0,0 +1,186 @@
+package client
+
+const (
+ EXTERNAL_HANDLER_TYPE = "externalHandler"
+)
+
+type ExternalHandler struct {
+ Resource
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Priority int64 `json:"priority,omitempty" yaml:"priority,omitempty"`
+
+ ProcessConfigs []interface{} `json:"processConfigs,omitempty" yaml:"process_configs,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ Retries int64 `json:"retries,omitempty" yaml:"retries,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ TimeoutMillis int64 `json:"timeoutMillis,omitempty" yaml:"timeout_millis,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ExternalHandlerCollection struct {
+ Collection
+ Data []ExternalHandler `json:"data,omitempty"`
+ client *ExternalHandlerClient
+}
+
+type ExternalHandlerClient struct {
+ rancherClient *RancherClient
+}
+
+type ExternalHandlerOperations interface {
+ List(opts *ListOpts) (*ExternalHandlerCollection, error)
+ Create(opts *ExternalHandler) (*ExternalHandler, error)
+ Update(existing *ExternalHandler, updates interface{}) (*ExternalHandler, error)
+ ById(id string) (*ExternalHandler, error)
+ Delete(container *ExternalHandler) error
+
+ ActionActivate(*ExternalHandler) (*ExternalHandler, error)
+
+ ActionCreate(*ExternalHandler) (*ExternalHandler, error)
+
+ ActionDeactivate(*ExternalHandler) (*ExternalHandler, error)
+
+ ActionPurge(*ExternalHandler) (*ExternalHandler, error)
+
+ ActionRemove(*ExternalHandler) (*ExternalHandler, error)
+
+ ActionRestore(*ExternalHandler) (*ExternalHandler, error)
+
+ ActionUpdate(*ExternalHandler) (*ExternalHandler, error)
+}
+
+func newExternalHandlerClient(rancherClient *RancherClient) *ExternalHandlerClient {
+ return &ExternalHandlerClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ExternalHandlerClient) Create(container *ExternalHandler) (*ExternalHandler, error) {
+ resp := &ExternalHandler{}
+ err := c.rancherClient.doCreate(EXTERNAL_HANDLER_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ExternalHandlerClient) Update(existing *ExternalHandler, updates interface{}) (*ExternalHandler, error) {
+ resp := &ExternalHandler{}
+ err := c.rancherClient.doUpdate(EXTERNAL_HANDLER_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ExternalHandlerClient) List(opts *ListOpts) (*ExternalHandlerCollection, error) {
+ resp := &ExternalHandlerCollection{}
+ err := c.rancherClient.doList(EXTERNAL_HANDLER_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ExternalHandlerCollection) Next() (*ExternalHandlerCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ExternalHandlerCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ExternalHandlerClient) ById(id string) (*ExternalHandler, error) {
+ resp := &ExternalHandler{}
+ err := c.rancherClient.doById(EXTERNAL_HANDLER_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ExternalHandlerClient) Delete(container *ExternalHandler) error {
+ return c.rancherClient.doResourceDelete(EXTERNAL_HANDLER_TYPE, &container.Resource)
+}
+
+func (c *ExternalHandlerClient) ActionActivate(resource *ExternalHandler) (*ExternalHandler, error) {
+
+ resp := &ExternalHandler{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerClient) ActionCreate(resource *ExternalHandler) (*ExternalHandler, error) {
+
+ resp := &ExternalHandler{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerClient) ActionDeactivate(resource *ExternalHandler) (*ExternalHandler, error) {
+
+ resp := &ExternalHandler{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerClient) ActionPurge(resource *ExternalHandler) (*ExternalHandler, error) {
+
+ resp := &ExternalHandler{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerClient) ActionRemove(resource *ExternalHandler) (*ExternalHandler, error) {
+
+ resp := &ExternalHandler{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerClient) ActionRestore(resource *ExternalHandler) (*ExternalHandler, error) {
+
+ resp := &ExternalHandler{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerClient) ActionUpdate(resource *ExternalHandler) (*ExternalHandler, error) {
+
+ resp := &ExternalHandler{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_handler_external_handler_process_map.go b/vendor/github.com/rancher/go-rancher/client/generated_external_handler_external_handler_process_map.go
new file mode 100644
index 00000000..37f32182
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_external_handler_external_handler_process_map.go
@@ -0,0 +1,184 @@
+package client
+
+const (
+ EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE = "externalHandlerExternalHandlerProcessMap"
+)
+
+type ExternalHandlerExternalHandlerProcessMap struct {
+ Resource
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ ExternalHandlerId string `json:"externalHandlerId,omitempty" yaml:"external_handler_id,omitempty"`
+
+ ExternalHandlerProcessId string `json:"externalHandlerProcessId,omitempty" yaml:"external_handler_process_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ OnError string `json:"onError,omitempty" yaml:"on_error,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ExternalHandlerExternalHandlerProcessMapCollection struct {
+ Collection
+ Data []ExternalHandlerExternalHandlerProcessMap `json:"data,omitempty"`
+ client *ExternalHandlerExternalHandlerProcessMapClient
+}
+
+type ExternalHandlerExternalHandlerProcessMapClient struct {
+ rancherClient *RancherClient
+}
+
+type ExternalHandlerExternalHandlerProcessMapOperations interface {
+ List(opts *ListOpts) (*ExternalHandlerExternalHandlerProcessMapCollection, error)
+ Create(opts *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
+ Update(existing *ExternalHandlerExternalHandlerProcessMap, updates interface{}) (*ExternalHandlerExternalHandlerProcessMap, error)
+ ById(id string) (*ExternalHandlerExternalHandlerProcessMap, error)
+ Delete(container *ExternalHandlerExternalHandlerProcessMap) error
+
+ ActionActivate(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
+
+ ActionCreate(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
+
+ ActionDeactivate(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
+
+ ActionPurge(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
+
+ ActionRemove(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
+
+ ActionRestore(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
+
+ ActionUpdate(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error)
+}
+
+func newExternalHandlerExternalHandlerProcessMapClient(rancherClient *RancherClient) *ExternalHandlerExternalHandlerProcessMapClient {
+ return &ExternalHandlerExternalHandlerProcessMapClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ExternalHandlerExternalHandlerProcessMapClient) Create(container *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
+ resp := &ExternalHandlerExternalHandlerProcessMap{}
+ err := c.rancherClient.doCreate(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ExternalHandlerExternalHandlerProcessMapClient) Update(existing *ExternalHandlerExternalHandlerProcessMap, updates interface{}) (*ExternalHandlerExternalHandlerProcessMap, error) {
+ resp := &ExternalHandlerExternalHandlerProcessMap{}
+ err := c.rancherClient.doUpdate(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ExternalHandlerExternalHandlerProcessMapClient) List(opts *ListOpts) (*ExternalHandlerExternalHandlerProcessMapCollection, error) {
+ resp := &ExternalHandlerExternalHandlerProcessMapCollection{}
+ err := c.rancherClient.doList(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ExternalHandlerExternalHandlerProcessMapCollection) Next() (*ExternalHandlerExternalHandlerProcessMapCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ExternalHandlerExternalHandlerProcessMapCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ExternalHandlerExternalHandlerProcessMapClient) ById(id string) (*ExternalHandlerExternalHandlerProcessMap, error) {
+ resp := &ExternalHandlerExternalHandlerProcessMap{}
+ err := c.rancherClient.doById(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ExternalHandlerExternalHandlerProcessMapClient) Delete(container *ExternalHandlerExternalHandlerProcessMap) error {
+ return c.rancherClient.doResourceDelete(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, &container.Resource)
+}
+
+func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionActivate(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
+
+ resp := &ExternalHandlerExternalHandlerProcessMap{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionCreate(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
+
+ resp := &ExternalHandlerExternalHandlerProcessMap{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionDeactivate(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
+
+ resp := &ExternalHandlerExternalHandlerProcessMap{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionPurge(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
+
+ resp := &ExternalHandlerExternalHandlerProcessMap{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionRemove(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
+
+ resp := &ExternalHandlerExternalHandlerProcessMap{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionRestore(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
+
+ resp := &ExternalHandlerExternalHandlerProcessMap{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionUpdate(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) {
+
+ resp := &ExternalHandlerExternalHandlerProcessMap{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_handler_process.go b/vendor/github.com/rancher/go-rancher/client/generated_external_handler_process.go
new file mode 100644
index 00000000..81a1b8a9
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_external_handler_process.go
@@ -0,0 +1,178 @@
+package client
+
+const (
+ EXTERNAL_HANDLER_PROCESS_TYPE = "externalHandlerProcess"
+)
+
+type ExternalHandlerProcess struct {
+ Resource
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ExternalHandlerProcessCollection struct {
+ Collection
+ Data []ExternalHandlerProcess `json:"data,omitempty"`
+ client *ExternalHandlerProcessClient
+}
+
+type ExternalHandlerProcessClient struct {
+ rancherClient *RancherClient
+}
+
+type ExternalHandlerProcessOperations interface {
+ List(opts *ListOpts) (*ExternalHandlerProcessCollection, error)
+ Create(opts *ExternalHandlerProcess) (*ExternalHandlerProcess, error)
+ Update(existing *ExternalHandlerProcess, updates interface{}) (*ExternalHandlerProcess, error)
+ ById(id string) (*ExternalHandlerProcess, error)
+ Delete(container *ExternalHandlerProcess) error
+
+ ActionActivate(*ExternalHandlerProcess) (*ExternalHandlerProcess, error)
+
+ ActionCreate(*ExternalHandlerProcess) (*ExternalHandlerProcess, error)
+
+ ActionDeactivate(*ExternalHandlerProcess) (*ExternalHandlerProcess, error)
+
+ ActionPurge(*ExternalHandlerProcess) (*ExternalHandlerProcess, error)
+
+ ActionRemove(*ExternalHandlerProcess) (*ExternalHandlerProcess, error)
+
+ ActionRestore(*ExternalHandlerProcess) (*ExternalHandlerProcess, error)
+
+ ActionUpdate(*ExternalHandlerProcess) (*ExternalHandlerProcess, error)
+}
+
+func newExternalHandlerProcessClient(rancherClient *RancherClient) *ExternalHandlerProcessClient {
+ return &ExternalHandlerProcessClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ExternalHandlerProcessClient) Create(container *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
+ resp := &ExternalHandlerProcess{}
+ err := c.rancherClient.doCreate(EXTERNAL_HANDLER_PROCESS_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ExternalHandlerProcessClient) Update(existing *ExternalHandlerProcess, updates interface{}) (*ExternalHandlerProcess, error) {
+ resp := &ExternalHandlerProcess{}
+ err := c.rancherClient.doUpdate(EXTERNAL_HANDLER_PROCESS_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ExternalHandlerProcessClient) List(opts *ListOpts) (*ExternalHandlerProcessCollection, error) {
+ resp := &ExternalHandlerProcessCollection{}
+ err := c.rancherClient.doList(EXTERNAL_HANDLER_PROCESS_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ExternalHandlerProcessCollection) Next() (*ExternalHandlerProcessCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ExternalHandlerProcessCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ExternalHandlerProcessClient) ById(id string) (*ExternalHandlerProcess, error) {
+ resp := &ExternalHandlerProcess{}
+ err := c.rancherClient.doById(EXTERNAL_HANDLER_PROCESS_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ExternalHandlerProcessClient) Delete(container *ExternalHandlerProcess) error {
+ return c.rancherClient.doResourceDelete(EXTERNAL_HANDLER_PROCESS_TYPE, &container.Resource)
+}
+
+func (c *ExternalHandlerProcessClient) ActionActivate(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
+
+ resp := &ExternalHandlerProcess{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerProcessClient) ActionCreate(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
+
+ resp := &ExternalHandlerProcess{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerProcessClient) ActionDeactivate(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
+
+ resp := &ExternalHandlerProcess{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerProcessClient) ActionPurge(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
+
+ resp := &ExternalHandlerProcess{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerProcessClient) ActionRemove(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
+
+ resp := &ExternalHandlerProcess{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerProcessClient) ActionRestore(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
+
+ resp := &ExternalHandlerProcess{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHandlerProcessClient) ActionUpdate(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) {
+
+ resp := &ExternalHandlerProcess{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_handler_process_config.go b/vendor/github.com/rancher/go-rancher/client/generated_external_handler_process_config.go
new file mode 100644
index 00000000..08d4ab06
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_external_handler_process_config.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE = "externalHandlerProcessConfig"
+)
+
+type ExternalHandlerProcessConfig struct {
+ Resource
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ OnError string `json:"onError,omitempty" yaml:"on_error,omitempty"`
+}
+
+type ExternalHandlerProcessConfigCollection struct {
+ Collection
+ Data []ExternalHandlerProcessConfig `json:"data,omitempty"`
+ client *ExternalHandlerProcessConfigClient
+}
+
+type ExternalHandlerProcessConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type ExternalHandlerProcessConfigOperations interface {
+ List(opts *ListOpts) (*ExternalHandlerProcessConfigCollection, error)
+ Create(opts *ExternalHandlerProcessConfig) (*ExternalHandlerProcessConfig, error)
+ Update(existing *ExternalHandlerProcessConfig, updates interface{}) (*ExternalHandlerProcessConfig, error)
+ ById(id string) (*ExternalHandlerProcessConfig, error)
+ Delete(container *ExternalHandlerProcessConfig) error
+}
+
+func newExternalHandlerProcessConfigClient(rancherClient *RancherClient) *ExternalHandlerProcessConfigClient {
+ return &ExternalHandlerProcessConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ExternalHandlerProcessConfigClient) Create(container *ExternalHandlerProcessConfig) (*ExternalHandlerProcessConfig, error) {
+ resp := &ExternalHandlerProcessConfig{}
+ err := c.rancherClient.doCreate(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ExternalHandlerProcessConfigClient) Update(existing *ExternalHandlerProcessConfig, updates interface{}) (*ExternalHandlerProcessConfig, error) {
+ resp := &ExternalHandlerProcessConfig{}
+ err := c.rancherClient.doUpdate(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ExternalHandlerProcessConfigClient) List(opts *ListOpts) (*ExternalHandlerProcessConfigCollection, error) {
+ resp := &ExternalHandlerProcessConfigCollection{}
+ err := c.rancherClient.doList(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ExternalHandlerProcessConfigCollection) Next() (*ExternalHandlerProcessConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ExternalHandlerProcessConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ExternalHandlerProcessConfigClient) ById(id string) (*ExternalHandlerProcessConfig, error) {
+ resp := &ExternalHandlerProcessConfig{}
+ err := c.rancherClient.doById(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ExternalHandlerProcessConfigClient) Delete(container *ExternalHandlerProcessConfig) error {
+ return c.rancherClient.doResourceDelete(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_host_event.go b/vendor/github.com/rancher/go-rancher/client/generated_external_host_event.go
new file mode 100644
index 00000000..e35425eb
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_external_host_event.go
@@ -0,0 +1,129 @@
+package client
+
+const (
+ EXTERNAL_HOST_EVENT_TYPE = "externalHostEvent"
+)
+
+type ExternalHostEvent struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ DeleteHost bool `json:"deleteHost,omitempty" yaml:"delete_host,omitempty"`
+
+ EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
+
+ HostLabel string `json:"hostLabel,omitempty" yaml:"host_label,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ExternalHostEventCollection struct {
+ Collection
+ Data []ExternalHostEvent `json:"data,omitempty"`
+ client *ExternalHostEventClient
+}
+
+type ExternalHostEventClient struct {
+ rancherClient *RancherClient
+}
+
+type ExternalHostEventOperations interface {
+ List(opts *ListOpts) (*ExternalHostEventCollection, error)
+ Create(opts *ExternalHostEvent) (*ExternalHostEvent, error)
+ Update(existing *ExternalHostEvent, updates interface{}) (*ExternalHostEvent, error)
+ ById(id string) (*ExternalHostEvent, error)
+ Delete(container *ExternalHostEvent) error
+
+ ActionCreate(*ExternalHostEvent) (*ExternalEvent, error)
+
+ ActionRemove(*ExternalHostEvent) (*ExternalEvent, error)
+}
+
+func newExternalHostEventClient(rancherClient *RancherClient) *ExternalHostEventClient {
+ return &ExternalHostEventClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ExternalHostEventClient) Create(container *ExternalHostEvent) (*ExternalHostEvent, error) {
+ resp := &ExternalHostEvent{}
+ err := c.rancherClient.doCreate(EXTERNAL_HOST_EVENT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ExternalHostEventClient) Update(existing *ExternalHostEvent, updates interface{}) (*ExternalHostEvent, error) {
+ resp := &ExternalHostEvent{}
+ err := c.rancherClient.doUpdate(EXTERNAL_HOST_EVENT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ExternalHostEventClient) List(opts *ListOpts) (*ExternalHostEventCollection, error) {
+ resp := &ExternalHostEventCollection{}
+ err := c.rancherClient.doList(EXTERNAL_HOST_EVENT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ExternalHostEventCollection) Next() (*ExternalHostEventCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ExternalHostEventCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ExternalHostEventClient) ById(id string) (*ExternalHostEvent, error) {
+ resp := &ExternalHostEvent{}
+ err := c.rancherClient.doById(EXTERNAL_HOST_EVENT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ExternalHostEventClient) Delete(container *ExternalHostEvent) error {
+ return c.rancherClient.doResourceDelete(EXTERNAL_HOST_EVENT_TYPE, &container.Resource)
+}
+
+func (c *ExternalHostEventClient) ActionCreate(resource *ExternalHostEvent) (*ExternalEvent, error) {
+
+ resp := &ExternalEvent{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HOST_EVENT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalHostEventClient) ActionRemove(resource *ExternalHostEvent) (*ExternalEvent, error) {
+
+ resp := &ExternalEvent{}
+
+ err := c.rancherClient.doAction(EXTERNAL_HOST_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_service.go b/vendor/github.com/rancher/go-rancher/client/generated_external_service.go
new file mode 100644
index 00000000..44f04479
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_external_service.go
@@ -0,0 +1,246 @@
+package client
+
+const (
+ EXTERNAL_SERVICE_TYPE = "externalService"
+)
+
+type ExternalService struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ ExternalIpAddresses []string `json:"externalIpAddresses,omitempty" yaml:"external_ip_addresses,omitempty"`
+
+ Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"`
+
+ HealthCheck *InstanceHealthCheck `json:"healthCheck,omitempty" yaml:"health_check,omitempty"`
+
+ HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
+
+ Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"`
+
+ Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Upgrade *ServiceUpgrade `json:"upgrade,omitempty" yaml:"upgrade,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ExternalServiceCollection struct {
+ Collection
+ Data []ExternalService `json:"data,omitempty"`
+ client *ExternalServiceClient
+}
+
+type ExternalServiceClient struct {
+ rancherClient *RancherClient
+}
+
+type ExternalServiceOperations interface {
+ List(opts *ListOpts) (*ExternalServiceCollection, error)
+ Create(opts *ExternalService) (*ExternalService, error)
+ Update(existing *ExternalService, updates interface{}) (*ExternalService, error)
+ ById(id string) (*ExternalService, error)
+ Delete(container *ExternalService) error
+
+ ActionActivate(*ExternalService) (*Service, error)
+
+ ActionCancelrollback(*ExternalService) (*Service, error)
+
+ ActionCancelupgrade(*ExternalService) (*Service, error)
+
+ ActionCreate(*ExternalService) (*Service, error)
+
+ ActionDeactivate(*ExternalService) (*Service, error)
+
+ ActionFinishupgrade(*ExternalService) (*Service, error)
+
+ ActionRemove(*ExternalService) (*Service, error)
+
+ ActionRestart(*ExternalService, *ServiceRestart) (*Service, error)
+
+ ActionRollback(*ExternalService) (*Service, error)
+
+ ActionUpdate(*ExternalService) (*Service, error)
+
+ ActionUpgrade(*ExternalService, *ServiceUpgrade) (*Service, error)
+}
+
+func newExternalServiceClient(rancherClient *RancherClient) *ExternalServiceClient {
+ return &ExternalServiceClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ExternalServiceClient) Create(container *ExternalService) (*ExternalService, error) {
+ resp := &ExternalService{}
+ err := c.rancherClient.doCreate(EXTERNAL_SERVICE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ExternalServiceClient) Update(existing *ExternalService, updates interface{}) (*ExternalService, error) {
+ resp := &ExternalService{}
+ err := c.rancherClient.doUpdate(EXTERNAL_SERVICE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ExternalServiceClient) List(opts *ListOpts) (*ExternalServiceCollection, error) {
+ resp := &ExternalServiceCollection{}
+ err := c.rancherClient.doList(EXTERNAL_SERVICE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ExternalServiceCollection) Next() (*ExternalServiceCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ExternalServiceCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ExternalServiceClient) ById(id string) (*ExternalService, error) {
+ resp := &ExternalService{}
+ err := c.rancherClient.doById(EXTERNAL_SERVICE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ExternalServiceClient) Delete(container *ExternalService) error {
+ return c.rancherClient.doResourceDelete(EXTERNAL_SERVICE_TYPE, &container.Resource)
+}
+
+func (c *ExternalServiceClient) ActionActivate(resource *ExternalService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalServiceClient) ActionCancelrollback(resource *ExternalService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalServiceClient) ActionCancelupgrade(resource *ExternalService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalServiceClient) ActionCreate(resource *ExternalService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalServiceClient) ActionDeactivate(resource *ExternalService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalServiceClient) ActionFinishupgrade(resource *ExternalService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalServiceClient) ActionRemove(resource *ExternalService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalServiceClient) ActionRestart(resource *ExternalService, input *ServiceRestart) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "restart", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *ExternalServiceClient) ActionRollback(resource *ExternalService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalServiceClient) ActionUpdate(resource *ExternalService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalServiceClient) ActionUpgrade(resource *ExternalService, input *ServiceUpgrade) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "upgrade", &resource.Resource, input, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_service_event.go b/vendor/github.com/rancher/go-rancher/client/generated_external_service_event.go
new file mode 100644
index 00000000..59913d20
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_external_service_event.go
@@ -0,0 +1,127 @@
+package client
+
+const (
+ EXTERNAL_SERVICE_EVENT_TYPE = "externalServiceEvent"
+)
+
+type ExternalServiceEvent struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Environment interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
+
+ EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"`
+
+ Service interface{} `json:"service,omitempty" yaml:"service,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ExternalServiceEventCollection struct {
+ Collection
+ Data []ExternalServiceEvent `json:"data,omitempty"`
+ client *ExternalServiceEventClient
+}
+
+type ExternalServiceEventClient struct {
+ rancherClient *RancherClient
+}
+
+type ExternalServiceEventOperations interface {
+ List(opts *ListOpts) (*ExternalServiceEventCollection, error)
+ Create(opts *ExternalServiceEvent) (*ExternalServiceEvent, error)
+ Update(existing *ExternalServiceEvent, updates interface{}) (*ExternalServiceEvent, error)
+ ById(id string) (*ExternalServiceEvent, error)
+ Delete(container *ExternalServiceEvent) error
+
+ ActionCreate(*ExternalServiceEvent) (*ExternalEvent, error)
+
+ ActionRemove(*ExternalServiceEvent) (*ExternalEvent, error)
+}
+
+func newExternalServiceEventClient(rancherClient *RancherClient) *ExternalServiceEventClient {
+ return &ExternalServiceEventClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ExternalServiceEventClient) Create(container *ExternalServiceEvent) (*ExternalServiceEvent, error) {
+ resp := &ExternalServiceEvent{}
+ err := c.rancherClient.doCreate(EXTERNAL_SERVICE_EVENT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ExternalServiceEventClient) Update(existing *ExternalServiceEvent, updates interface{}) (*ExternalServiceEvent, error) {
+ resp := &ExternalServiceEvent{}
+ err := c.rancherClient.doUpdate(EXTERNAL_SERVICE_EVENT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ExternalServiceEventClient) List(opts *ListOpts) (*ExternalServiceEventCollection, error) {
+ resp := &ExternalServiceEventCollection{}
+ err := c.rancherClient.doList(EXTERNAL_SERVICE_EVENT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ExternalServiceEventCollection) Next() (*ExternalServiceEventCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ExternalServiceEventCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ExternalServiceEventClient) ById(id string) (*ExternalServiceEvent, error) {
+ resp := &ExternalServiceEvent{}
+ err := c.rancherClient.doById(EXTERNAL_SERVICE_EVENT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ExternalServiceEventClient) Delete(container *ExternalServiceEvent) error {
+ return c.rancherClient.doResourceDelete(EXTERNAL_SERVICE_EVENT_TYPE, &container.Resource)
+}
+
+func (c *ExternalServiceEventClient) ActionCreate(resource *ExternalServiceEvent) (*ExternalEvent, error) {
+
+ resp := &ExternalEvent{}
+
+ err := c.rancherClient.doAction(EXTERNAL_SERVICE_EVENT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalServiceEventClient) ActionRemove(resource *ExternalServiceEvent) (*ExternalEvent, error) {
+
+ resp := &ExternalEvent{}
+
+ err := c.rancherClient.doAction(EXTERNAL_SERVICE_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_storage_pool_event.go b/vendor/github.com/rancher/go-rancher/client/generated_external_storage_pool_event.go
new file mode 100644
index 00000000..30b8ca17
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_external_storage_pool_event.go
@@ -0,0 +1,127 @@
+package client
+
+const (
+ EXTERNAL_STORAGE_POOL_EVENT_TYPE = "externalStoragePoolEvent"
+)
+
+type ExternalStoragePoolEvent struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ HostUuids []string `json:"hostUuids,omitempty" yaml:"host_uuids,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ StoragePool StoragePool `json:"storagePool,omitempty" yaml:"storage_pool,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ExternalStoragePoolEventCollection struct {
+ Collection
+ Data []ExternalStoragePoolEvent `json:"data,omitempty"`
+ client *ExternalStoragePoolEventClient
+}
+
+type ExternalStoragePoolEventClient struct {
+ rancherClient *RancherClient
+}
+
+type ExternalStoragePoolEventOperations interface {
+ List(opts *ListOpts) (*ExternalStoragePoolEventCollection, error)
+ Create(opts *ExternalStoragePoolEvent) (*ExternalStoragePoolEvent, error)
+ Update(existing *ExternalStoragePoolEvent, updates interface{}) (*ExternalStoragePoolEvent, error)
+ ById(id string) (*ExternalStoragePoolEvent, error)
+ Delete(container *ExternalStoragePoolEvent) error
+
+ ActionCreate(*ExternalStoragePoolEvent) (*ExternalEvent, error)
+
+ ActionRemove(*ExternalStoragePoolEvent) (*ExternalEvent, error)
+}
+
+func newExternalStoragePoolEventClient(rancherClient *RancherClient) *ExternalStoragePoolEventClient {
+ return &ExternalStoragePoolEventClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ExternalStoragePoolEventClient) Create(container *ExternalStoragePoolEvent) (*ExternalStoragePoolEvent, error) {
+ resp := &ExternalStoragePoolEvent{}
+ err := c.rancherClient.doCreate(EXTERNAL_STORAGE_POOL_EVENT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ExternalStoragePoolEventClient) Update(existing *ExternalStoragePoolEvent, updates interface{}) (*ExternalStoragePoolEvent, error) {
+ resp := &ExternalStoragePoolEvent{}
+ err := c.rancherClient.doUpdate(EXTERNAL_STORAGE_POOL_EVENT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ExternalStoragePoolEventClient) List(opts *ListOpts) (*ExternalStoragePoolEventCollection, error) {
+ resp := &ExternalStoragePoolEventCollection{}
+ err := c.rancherClient.doList(EXTERNAL_STORAGE_POOL_EVENT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ExternalStoragePoolEventCollection) Next() (*ExternalStoragePoolEventCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ExternalStoragePoolEventCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ExternalStoragePoolEventClient) ById(id string) (*ExternalStoragePoolEvent, error) {
+ resp := &ExternalStoragePoolEvent{}
+ err := c.rancherClient.doById(EXTERNAL_STORAGE_POOL_EVENT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ExternalStoragePoolEventClient) Delete(container *ExternalStoragePoolEvent) error {
+ return c.rancherClient.doResourceDelete(EXTERNAL_STORAGE_POOL_EVENT_TYPE, &container.Resource)
+}
+
+func (c *ExternalStoragePoolEventClient) ActionCreate(resource *ExternalStoragePoolEvent) (*ExternalEvent, error) {
+
+ resp := &ExternalEvent{}
+
+ err := c.rancherClient.doAction(EXTERNAL_STORAGE_POOL_EVENT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalStoragePoolEventClient) ActionRemove(resource *ExternalStoragePoolEvent) (*ExternalEvent, error) {
+
+ resp := &ExternalEvent{}
+
+ err := c.rancherClient.doAction(EXTERNAL_STORAGE_POOL_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_volume_event.go b/vendor/github.com/rancher/go-rancher/client/generated_external_volume_event.go
new file mode 100644
index 00000000..785efb15
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_external_volume_event.go
@@ -0,0 +1,125 @@
+package client
+
+const (
+ EXTERNAL_VOLUME_EVENT_TYPE = "externalVolumeEvent"
+)
+
+type ExternalVolumeEvent struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ Volume Volume `json:"volume,omitempty" yaml:"volume,omitempty"`
+}
+
+type ExternalVolumeEventCollection struct {
+ Collection
+ Data []ExternalVolumeEvent `json:"data,omitempty"`
+ client *ExternalVolumeEventClient
+}
+
+type ExternalVolumeEventClient struct {
+ rancherClient *RancherClient
+}
+
+type ExternalVolumeEventOperations interface {
+ List(opts *ListOpts) (*ExternalVolumeEventCollection, error)
+ Create(opts *ExternalVolumeEvent) (*ExternalVolumeEvent, error)
+ Update(existing *ExternalVolumeEvent, updates interface{}) (*ExternalVolumeEvent, error)
+ ById(id string) (*ExternalVolumeEvent, error)
+ Delete(container *ExternalVolumeEvent) error
+
+ ActionCreate(*ExternalVolumeEvent) (*ExternalEvent, error)
+
+ ActionRemove(*ExternalVolumeEvent) (*ExternalEvent, error)
+}
+
+func newExternalVolumeEventClient(rancherClient *RancherClient) *ExternalVolumeEventClient {
+ return &ExternalVolumeEventClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ExternalVolumeEventClient) Create(container *ExternalVolumeEvent) (*ExternalVolumeEvent, error) {
+ resp := &ExternalVolumeEvent{}
+ err := c.rancherClient.doCreate(EXTERNAL_VOLUME_EVENT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ExternalVolumeEventClient) Update(existing *ExternalVolumeEvent, updates interface{}) (*ExternalVolumeEvent, error) {
+ resp := &ExternalVolumeEvent{}
+ err := c.rancherClient.doUpdate(EXTERNAL_VOLUME_EVENT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ExternalVolumeEventClient) List(opts *ListOpts) (*ExternalVolumeEventCollection, error) {
+ resp := &ExternalVolumeEventCollection{}
+ err := c.rancherClient.doList(EXTERNAL_VOLUME_EVENT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ExternalVolumeEventCollection) Next() (*ExternalVolumeEventCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ExternalVolumeEventCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ExternalVolumeEventClient) ById(id string) (*ExternalVolumeEvent, error) {
+ resp := &ExternalVolumeEvent{}
+ err := c.rancherClient.doById(EXTERNAL_VOLUME_EVENT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ExternalVolumeEventClient) Delete(container *ExternalVolumeEvent) error {
+ return c.rancherClient.doResourceDelete(EXTERNAL_VOLUME_EVENT_TYPE, &container.Resource)
+}
+
+func (c *ExternalVolumeEventClient) ActionCreate(resource *ExternalVolumeEvent) (*ExternalEvent, error) {
+
+ resp := &ExternalEvent{}
+
+ err := c.rancherClient.doAction(EXTERNAL_VOLUME_EVENT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ExternalVolumeEventClient) ActionRemove(resource *ExternalVolumeEvent) (*ExternalEvent, error) {
+
+ resp := &ExternalEvent{}
+
+ err := c.rancherClient.doAction(EXTERNAL_VOLUME_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_field_documentation.go b/vendor/github.com/rancher/go-rancher/client/generated_field_documentation.go
new file mode 100644
index 00000000..511d33be
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_field_documentation.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ FIELD_DOCUMENTATION_TYPE = "fieldDocumentation"
+)
+
+type FieldDocumentation struct {
+ Resource
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+}
+
+type FieldDocumentationCollection struct {
+ Collection
+ Data []FieldDocumentation `json:"data,omitempty"`
+ client *FieldDocumentationClient
+}
+
+type FieldDocumentationClient struct {
+ rancherClient *RancherClient
+}
+
+type FieldDocumentationOperations interface {
+ List(opts *ListOpts) (*FieldDocumentationCollection, error)
+ Create(opts *FieldDocumentation) (*FieldDocumentation, error)
+ Update(existing *FieldDocumentation, updates interface{}) (*FieldDocumentation, error)
+ ById(id string) (*FieldDocumentation, error)
+ Delete(container *FieldDocumentation) error
+}
+
+func newFieldDocumentationClient(rancherClient *RancherClient) *FieldDocumentationClient {
+ return &FieldDocumentationClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *FieldDocumentationClient) Create(container *FieldDocumentation) (*FieldDocumentation, error) {
+ resp := &FieldDocumentation{}
+ err := c.rancherClient.doCreate(FIELD_DOCUMENTATION_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *FieldDocumentationClient) Update(existing *FieldDocumentation, updates interface{}) (*FieldDocumentation, error) {
+ resp := &FieldDocumentation{}
+ err := c.rancherClient.doUpdate(FIELD_DOCUMENTATION_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *FieldDocumentationClient) List(opts *ListOpts) (*FieldDocumentationCollection, error) {
+ resp := &FieldDocumentationCollection{}
+ err := c.rancherClient.doList(FIELD_DOCUMENTATION_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *FieldDocumentationCollection) Next() (*FieldDocumentationCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &FieldDocumentationCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *FieldDocumentationClient) ById(id string) (*FieldDocumentation, error) {
+ resp := &FieldDocumentation{}
+ err := c.rancherClient.doById(FIELD_DOCUMENTATION_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *FieldDocumentationClient) Delete(container *FieldDocumentation) error {
+ return c.rancherClient.doResourceDelete(FIELD_DOCUMENTATION_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_githubconfig.go b/vendor/github.com/rancher/go-rancher/client/generated_githubconfig.go
new file mode 100644
index 00000000..c053fc3f
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_githubconfig.go
@@ -0,0 +1,93 @@
+package client
+
+const (
+ GITHUBCONFIG_TYPE = "githubconfig"
+)
+
+type Githubconfig struct {
+ Resource
+
+ AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"`
+
+ AllowedIdentities []interface{} `json:"allowedIdentities,omitempty" yaml:"allowed_identities,omitempty"`
+
+ ClientId string `json:"clientId,omitempty" yaml:"client_id,omitempty"`
+
+ ClientSecret string `json:"clientSecret,omitempty" yaml:"client_secret,omitempty"`
+
+ Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
+
+ Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Scheme string `json:"scheme,omitempty" yaml:"scheme,omitempty"`
+}
+
+type GithubconfigCollection struct {
+ Collection
+ Data []Githubconfig `json:"data,omitempty"`
+ client *GithubconfigClient
+}
+
+type GithubconfigClient struct {
+ rancherClient *RancherClient
+}
+
+type GithubconfigOperations interface {
+ List(opts *ListOpts) (*GithubconfigCollection, error)
+ Create(opts *Githubconfig) (*Githubconfig, error)
+ Update(existing *Githubconfig, updates interface{}) (*Githubconfig, error)
+ ById(id string) (*Githubconfig, error)
+ Delete(container *Githubconfig) error
+}
+
+func newGithubconfigClient(rancherClient *RancherClient) *GithubconfigClient {
+ return &GithubconfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *GithubconfigClient) Create(container *Githubconfig) (*Githubconfig, error) {
+ resp := &Githubconfig{}
+ err := c.rancherClient.doCreate(GITHUBCONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *GithubconfigClient) Update(existing *Githubconfig, updates interface{}) (*Githubconfig, error) {
+ resp := &Githubconfig{}
+ err := c.rancherClient.doUpdate(GITHUBCONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *GithubconfigClient) List(opts *ListOpts) (*GithubconfigCollection, error) {
+ resp := &GithubconfigCollection{}
+ err := c.rancherClient.doList(GITHUBCONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *GithubconfigCollection) Next() (*GithubconfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &GithubconfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *GithubconfigClient) ById(id string) (*Githubconfig, error) {
+ resp := &Githubconfig{}
+ err := c.rancherClient.doById(GITHUBCONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *GithubconfigClient) Delete(container *Githubconfig) error {
+ return c.rancherClient.doResourceDelete(GITHUBCONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_ha_config.go b/vendor/github.com/rancher/go-rancher/client/generated_ha_config.go
new file mode 100644
index 00000000..f5bb82f2
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_ha_config.go
@@ -0,0 +1,85 @@
+package client
+
+const (
+ HA_CONFIG_TYPE = "haConfig"
+)
+
+type HaConfig struct {
+ Resource
+
+ ClusterSize int64 `json:"clusterSize,omitempty" yaml:"cluster_size,omitempty"`
+
+ DbHost string `json:"dbHost,omitempty" yaml:"db_host,omitempty"`
+
+ DbSize int64 `json:"dbSize,omitempty" yaml:"db_size,omitempty"`
+
+ Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
+}
+
+type HaConfigCollection struct {
+ Collection
+ Data []HaConfig `json:"data,omitempty"`
+ client *HaConfigClient
+}
+
+type HaConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type HaConfigOperations interface {
+ List(opts *ListOpts) (*HaConfigCollection, error)
+ Create(opts *HaConfig) (*HaConfig, error)
+ Update(existing *HaConfig, updates interface{}) (*HaConfig, error)
+ ById(id string) (*HaConfig, error)
+ Delete(container *HaConfig) error
+}
+
+func newHaConfigClient(rancherClient *RancherClient) *HaConfigClient {
+ return &HaConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *HaConfigClient) Create(container *HaConfig) (*HaConfig, error) {
+ resp := &HaConfig{}
+ err := c.rancherClient.doCreate(HA_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *HaConfigClient) Update(existing *HaConfig, updates interface{}) (*HaConfig, error) {
+ resp := &HaConfig{}
+ err := c.rancherClient.doUpdate(HA_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *HaConfigClient) List(opts *ListOpts) (*HaConfigCollection, error) {
+ resp := &HaConfigCollection{}
+ err := c.rancherClient.doList(HA_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *HaConfigCollection) Next() (*HaConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &HaConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *HaConfigClient) ById(id string) (*HaConfig, error) {
+ resp := &HaConfig{}
+ err := c.rancherClient.doById(HA_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *HaConfigClient) Delete(container *HaConfig) error {
+ return c.rancherClient.doResourceDelete(HA_CONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_ha_config_input.go b/vendor/github.com/rancher/go-rancher/client/generated_ha_config_input.go
new file mode 100644
index 00000000..ce869369
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_ha_config_input.go
@@ -0,0 +1,109 @@
+package client
+
+const (
+ HA_CONFIG_INPUT_TYPE = "haConfigInput"
+)
+
+type HaConfigInput struct {
+ Resource
+
+ Cert string `json:"cert,omitempty" yaml:"cert,omitempty"`
+
+ CertChain string `json:"certChain,omitempty" yaml:"cert_chain,omitempty"`
+
+ ClusterSize int64 `json:"clusterSize,omitempty" yaml:"cluster_size,omitempty"`
+
+ HostRegistrationUrl string `json:"hostRegistrationUrl,omitempty" yaml:"host_registration_url,omitempty"`
+
+ HttpEnabled bool `json:"httpEnabled,omitempty" yaml:"http_enabled,omitempty"`
+
+ HttpPort int64 `json:"httpPort,omitempty" yaml:"http_port,omitempty"`
+
+ HttpsPort int64 `json:"httpsPort,omitempty" yaml:"https_port,omitempty"`
+
+ Key string `json:"key,omitempty" yaml:"key,omitempty"`
+
+ PpHttpPort int64 `json:"ppHttpPort,omitempty" yaml:"pp_http_port,omitempty"`
+
+ PpHttpsPort int64 `json:"ppHttpsPort,omitempty" yaml:"pp_https_port,omitempty"`
+
+ RedisPort int64 `json:"redisPort,omitempty" yaml:"redis_port,omitempty"`
+
+ SwarmEnabled bool `json:"swarmEnabled,omitempty" yaml:"swarm_enabled,omitempty"`
+
+ SwarmPort int64 `json:"swarmPort,omitempty" yaml:"swarm_port,omitempty"`
+
+ ZookeeperClientPort int64 `json:"zookeeperClientPort,omitempty" yaml:"zookeeper_client_port,omitempty"`
+
+ ZookeeperLeaderPort int64 `json:"zookeeperLeaderPort,omitempty" yaml:"zookeeper_leader_port,omitempty"`
+
+ ZookeeperQuorumPort int64 `json:"zookeeperQuorumPort,omitempty" yaml:"zookeeper_quorum_port,omitempty"`
+}
+
+type HaConfigInputCollection struct {
+ Collection
+ Data []HaConfigInput `json:"data,omitempty"`
+ client *HaConfigInputClient
+}
+
+type HaConfigInputClient struct {
+ rancherClient *RancherClient
+}
+
+type HaConfigInputOperations interface {
+ List(opts *ListOpts) (*HaConfigInputCollection, error)
+ Create(opts *HaConfigInput) (*HaConfigInput, error)
+ Update(existing *HaConfigInput, updates interface{}) (*HaConfigInput, error)
+ ById(id string) (*HaConfigInput, error)
+ Delete(container *HaConfigInput) error
+}
+
+func newHaConfigInputClient(rancherClient *RancherClient) *HaConfigInputClient {
+ return &HaConfigInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *HaConfigInputClient) Create(container *HaConfigInput) (*HaConfigInput, error) {
+ resp := &HaConfigInput{}
+ err := c.rancherClient.doCreate(HA_CONFIG_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *HaConfigInputClient) Update(existing *HaConfigInput, updates interface{}) (*HaConfigInput, error) {
+ resp := &HaConfigInput{}
+ err := c.rancherClient.doUpdate(HA_CONFIG_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *HaConfigInputClient) List(opts *ListOpts) (*HaConfigInputCollection, error) {
+ resp := &HaConfigInputCollection{}
+ err := c.rancherClient.doList(HA_CONFIG_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *HaConfigInputCollection) Next() (*HaConfigInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &HaConfigInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *HaConfigInputClient) ById(id string) (*HaConfigInput, error) {
+ resp := &HaConfigInput{}
+ err := c.rancherClient.doById(HA_CONFIG_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *HaConfigInputClient) Delete(container *HaConfigInput) error {
+ return c.rancherClient.doResourceDelete(HA_CONFIG_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_haproxy_config.go b/vendor/github.com/rancher/go-rancher/client/generated_haproxy_config.go
new file mode 100644
index 00000000..e8f6cc36
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_haproxy_config.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ HAPROXY_CONFIG_TYPE = "haproxyConfig"
+)
+
+type HaproxyConfig struct {
+ Resource
+
+ Defaults string `json:"defaults,omitempty" yaml:"defaults,omitempty"`
+
+ Global string `json:"global,omitempty" yaml:"global,omitempty"`
+}
+
+type HaproxyConfigCollection struct {
+ Collection
+ Data []HaproxyConfig `json:"data,omitempty"`
+ client *HaproxyConfigClient
+}
+
+type HaproxyConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type HaproxyConfigOperations interface {
+ List(opts *ListOpts) (*HaproxyConfigCollection, error)
+ Create(opts *HaproxyConfig) (*HaproxyConfig, error)
+ Update(existing *HaproxyConfig, updates interface{}) (*HaproxyConfig, error)
+ ById(id string) (*HaproxyConfig, error)
+ Delete(container *HaproxyConfig) error
+}
+
+func newHaproxyConfigClient(rancherClient *RancherClient) *HaproxyConfigClient {
+ return &HaproxyConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *HaproxyConfigClient) Create(container *HaproxyConfig) (*HaproxyConfig, error) {
+ resp := &HaproxyConfig{}
+ err := c.rancherClient.doCreate(HAPROXY_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *HaproxyConfigClient) Update(existing *HaproxyConfig, updates interface{}) (*HaproxyConfig, error) {
+ resp := &HaproxyConfig{}
+ err := c.rancherClient.doUpdate(HAPROXY_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *HaproxyConfigClient) List(opts *ListOpts) (*HaproxyConfigCollection, error) {
+ resp := &HaproxyConfigCollection{}
+ err := c.rancherClient.doList(HAPROXY_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *HaproxyConfigCollection) Next() (*HaproxyConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &HaproxyConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *HaproxyConfigClient) ById(id string) (*HaproxyConfig, error) {
+ resp := &HaproxyConfig{}
+ err := c.rancherClient.doById(HAPROXY_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *HaproxyConfigClient) Delete(container *HaproxyConfig) error {
+ return c.rancherClient.doResourceDelete(HAPROXY_CONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_healthcheck_instance_host_map.go b/vendor/github.com/rancher/go-rancher/client/generated_healthcheck_instance_host_map.go
new file mode 100644
index 00000000..b30b9d86
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_healthcheck_instance_host_map.go
@@ -0,0 +1,131 @@
+package client
+
+const (
+ HEALTHCHECK_INSTANCE_HOST_MAP_TYPE = "healthcheckInstanceHostMap"
+)
+
+type HealthcheckInstanceHostMap struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
+
+ HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
+
+ InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type HealthcheckInstanceHostMapCollection struct {
+ Collection
+ Data []HealthcheckInstanceHostMap `json:"data,omitempty"`
+ client *HealthcheckInstanceHostMapClient
+}
+
+type HealthcheckInstanceHostMapClient struct {
+ rancherClient *RancherClient
+}
+
+type HealthcheckInstanceHostMapOperations interface {
+ List(opts *ListOpts) (*HealthcheckInstanceHostMapCollection, error)
+ Create(opts *HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error)
+ Update(existing *HealthcheckInstanceHostMap, updates interface{}) (*HealthcheckInstanceHostMap, error)
+ ById(id string) (*HealthcheckInstanceHostMap, error)
+ Delete(container *HealthcheckInstanceHostMap) error
+
+ ActionCreate(*HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error)
+
+ ActionRemove(*HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error)
+}
+
+func newHealthcheckInstanceHostMapClient(rancherClient *RancherClient) *HealthcheckInstanceHostMapClient {
+ return &HealthcheckInstanceHostMapClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *HealthcheckInstanceHostMapClient) Create(container *HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error) {
+ resp := &HealthcheckInstanceHostMap{}
+ err := c.rancherClient.doCreate(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *HealthcheckInstanceHostMapClient) Update(existing *HealthcheckInstanceHostMap, updates interface{}) (*HealthcheckInstanceHostMap, error) {
+ resp := &HealthcheckInstanceHostMap{}
+ err := c.rancherClient.doUpdate(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *HealthcheckInstanceHostMapClient) List(opts *ListOpts) (*HealthcheckInstanceHostMapCollection, error) {
+ resp := &HealthcheckInstanceHostMapCollection{}
+ err := c.rancherClient.doList(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *HealthcheckInstanceHostMapCollection) Next() (*HealthcheckInstanceHostMapCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &HealthcheckInstanceHostMapCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *HealthcheckInstanceHostMapClient) ById(id string) (*HealthcheckInstanceHostMap, error) {
+ resp := &HealthcheckInstanceHostMap{}
+ err := c.rancherClient.doById(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *HealthcheckInstanceHostMapClient) Delete(container *HealthcheckInstanceHostMap) error {
+ return c.rancherClient.doResourceDelete(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, &container.Resource)
+}
+
+func (c *HealthcheckInstanceHostMapClient) ActionCreate(resource *HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error) {
+
+ resp := &HealthcheckInstanceHostMap{}
+
+ err := c.rancherClient.doAction(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *HealthcheckInstanceHostMapClient) ActionRemove(resource *HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error) {
+
+ resp := &HealthcheckInstanceHostMap{}
+
+ err := c.rancherClient.doAction(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_host.go b/vendor/github.com/rancher/go-rancher/client/generated_host.go
new file mode 100644
index 00000000..114c0551
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_host.go
@@ -0,0 +1,209 @@
+package client
+
+const (
+ HOST_TYPE = "host"
+)
+
+type Host struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"`
+
+ AgentState string `json:"agentState,omitempty" yaml:"agent_state,omitempty"`
+
+ ApiProxy string `json:"apiProxy,omitempty" yaml:"api_proxy,omitempty"`
+
+ ComputeTotal int64 `json:"computeTotal,omitempty" yaml:"compute_total,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
+
+ Info interface{} `json:"info,omitempty" yaml:"info,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ PhysicalHostId string `json:"physicalHostId,omitempty" yaml:"physical_host_id,omitempty"`
+
+ PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type HostCollection struct {
+ Collection
+ Data []Host `json:"data,omitempty"`
+ client *HostClient
+}
+
+type HostClient struct {
+ rancherClient *RancherClient
+}
+
+type HostOperations interface {
+ List(opts *ListOpts) (*HostCollection, error)
+ Create(opts *Host) (*Host, error)
+ Update(existing *Host, updates interface{}) (*Host, error)
+ ById(id string) (*Host, error)
+ Delete(container *Host) error
+
+ ActionActivate(*Host) (*Host, error)
+
+ ActionCreate(*Host) (*Host, error)
+
+ ActionDeactivate(*Host) (*Host, error)
+
+ ActionDockersocket(*Host) (*HostAccess, error)
+
+ ActionPurge(*Host) (*Host, error)
+
+ ActionRemove(*Host) (*Host, error)
+
+ ActionRestore(*Host) (*Host, error)
+
+ ActionUpdate(*Host) (*Host, error)
+}
+
+func newHostClient(rancherClient *RancherClient) *HostClient {
+ return &HostClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *HostClient) Create(container *Host) (*Host, error) {
+ resp := &Host{}
+ err := c.rancherClient.doCreate(HOST_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *HostClient) Update(existing *Host, updates interface{}) (*Host, error) {
+ resp := &Host{}
+ err := c.rancherClient.doUpdate(HOST_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *HostClient) List(opts *ListOpts) (*HostCollection, error) {
+ resp := &HostCollection{}
+ err := c.rancherClient.doList(HOST_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *HostCollection) Next() (*HostCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &HostCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *HostClient) ById(id string) (*Host, error) {
+ resp := &Host{}
+ err := c.rancherClient.doById(HOST_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *HostClient) Delete(container *Host) error {
+ return c.rancherClient.doResourceDelete(HOST_TYPE, &container.Resource)
+}
+
+func (c *HostClient) ActionActivate(resource *Host) (*Host, error) {
+
+ resp := &Host{}
+
+ err := c.rancherClient.doAction(HOST_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *HostClient) ActionCreate(resource *Host) (*Host, error) {
+
+ resp := &Host{}
+
+ err := c.rancherClient.doAction(HOST_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *HostClient) ActionDeactivate(resource *Host) (*Host, error) {
+
+ resp := &Host{}
+
+ err := c.rancherClient.doAction(HOST_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *HostClient) ActionDockersocket(resource *Host) (*HostAccess, error) {
+
+ resp := &HostAccess{}
+
+ err := c.rancherClient.doAction(HOST_TYPE, "dockersocket", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *HostClient) ActionPurge(resource *Host) (*Host, error) {
+
+ resp := &Host{}
+
+ err := c.rancherClient.doAction(HOST_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *HostClient) ActionRemove(resource *Host) (*Host, error) {
+
+ resp := &Host{}
+
+ err := c.rancherClient.doAction(HOST_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *HostClient) ActionRestore(resource *Host) (*Host, error) {
+
+ resp := &Host{}
+
+ err := c.rancherClient.doAction(HOST_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *HostClient) ActionUpdate(resource *Host) (*Host, error) {
+
+ resp := &Host{}
+
+ err := c.rancherClient.doAction(HOST_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_host_access.go b/vendor/github.com/rancher/go-rancher/client/generated_host_access.go
new file mode 100644
index 00000000..7ebc586b
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_host_access.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ HOST_ACCESS_TYPE = "hostAccess"
+)
+
+type HostAccess struct {
+ Resource
+
+ Token string `json:"token,omitempty" yaml:"token,omitempty"`
+
+ Url string `json:"url,omitempty" yaml:"url,omitempty"`
+}
+
+type HostAccessCollection struct {
+ Collection
+ Data []HostAccess `json:"data,omitempty"`
+ client *HostAccessClient
+}
+
+type HostAccessClient struct {
+ rancherClient *RancherClient
+}
+
+type HostAccessOperations interface {
+ List(opts *ListOpts) (*HostAccessCollection, error)
+ Create(opts *HostAccess) (*HostAccess, error)
+ Update(existing *HostAccess, updates interface{}) (*HostAccess, error)
+ ById(id string) (*HostAccess, error)
+ Delete(container *HostAccess) error
+}
+
+func newHostAccessClient(rancherClient *RancherClient) *HostAccessClient {
+ return &HostAccessClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *HostAccessClient) Create(container *HostAccess) (*HostAccess, error) {
+ resp := &HostAccess{}
+ err := c.rancherClient.doCreate(HOST_ACCESS_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *HostAccessClient) Update(existing *HostAccess, updates interface{}) (*HostAccess, error) {
+ resp := &HostAccess{}
+ err := c.rancherClient.doUpdate(HOST_ACCESS_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *HostAccessClient) List(opts *ListOpts) (*HostAccessCollection, error) {
+ resp := &HostAccessCollection{}
+ err := c.rancherClient.doList(HOST_ACCESS_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *HostAccessCollection) Next() (*HostAccessCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &HostAccessCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *HostAccessClient) ById(id string) (*HostAccess, error) {
+ resp := &HostAccess{}
+ err := c.rancherClient.doById(HOST_ACCESS_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *HostAccessClient) Delete(container *HostAccess) error {
+ return c.rancherClient.doResourceDelete(HOST_ACCESS_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_host_api_proxy_token.go b/vendor/github.com/rancher/go-rancher/client/generated_host_api_proxy_token.go
new file mode 100644
index 00000000..1517b79b
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_host_api_proxy_token.go
@@ -0,0 +1,83 @@
+package client
+
+const (
+ HOST_API_PROXY_TOKEN_TYPE = "hostApiProxyToken"
+)
+
+type HostApiProxyToken struct {
+ Resource
+
+ ReportedUuid string `json:"reportedUuid,omitempty" yaml:"reported_uuid,omitempty"`
+
+ Token string `json:"token,omitempty" yaml:"token,omitempty"`
+
+ Url string `json:"url,omitempty" yaml:"url,omitempty"`
+}
+
+type HostApiProxyTokenCollection struct {
+ Collection
+ Data []HostApiProxyToken `json:"data,omitempty"`
+ client *HostApiProxyTokenClient
+}
+
+type HostApiProxyTokenClient struct {
+ rancherClient *RancherClient
+}
+
+type HostApiProxyTokenOperations interface {
+ List(opts *ListOpts) (*HostApiProxyTokenCollection, error)
+ Create(opts *HostApiProxyToken) (*HostApiProxyToken, error)
+ Update(existing *HostApiProxyToken, updates interface{}) (*HostApiProxyToken, error)
+ ById(id string) (*HostApiProxyToken, error)
+ Delete(container *HostApiProxyToken) error
+}
+
+func newHostApiProxyTokenClient(rancherClient *RancherClient) *HostApiProxyTokenClient {
+ return &HostApiProxyTokenClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *HostApiProxyTokenClient) Create(container *HostApiProxyToken) (*HostApiProxyToken, error) {
+ resp := &HostApiProxyToken{}
+ err := c.rancherClient.doCreate(HOST_API_PROXY_TOKEN_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *HostApiProxyTokenClient) Update(existing *HostApiProxyToken, updates interface{}) (*HostApiProxyToken, error) {
+ resp := &HostApiProxyToken{}
+ err := c.rancherClient.doUpdate(HOST_API_PROXY_TOKEN_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *HostApiProxyTokenClient) List(opts *ListOpts) (*HostApiProxyTokenCollection, error) {
+ resp := &HostApiProxyTokenCollection{}
+ err := c.rancherClient.doList(HOST_API_PROXY_TOKEN_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *HostApiProxyTokenCollection) Next() (*HostApiProxyTokenCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &HostApiProxyTokenCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *HostApiProxyTokenClient) ById(id string) (*HostApiProxyToken, error) {
+ resp := &HostApiProxyToken{}
+ err := c.rancherClient.doById(HOST_API_PROXY_TOKEN_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *HostApiProxyTokenClient) Delete(container *HostApiProxyToken) error {
+ return c.rancherClient.doResourceDelete(HOST_API_PROXY_TOKEN_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_identity.go b/vendor/github.com/rancher/go-rancher/client/generated_identity.go
new file mode 100644
index 00000000..1d92de6a
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_identity.go
@@ -0,0 +1,95 @@
+package client
+
+const (
+ IDENTITY_TYPE = "identity"
+)
+
+type Identity struct {
+ Resource
+
+ All string `json:"all,omitempty" yaml:"all,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ ExternalIdType string `json:"externalIdType,omitempty" yaml:"external_id_type,omitempty"`
+
+ Login string `json:"login,omitempty" yaml:"login,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ ProfilePicture string `json:"profilePicture,omitempty" yaml:"profile_picture,omitempty"`
+
+ ProfileUrl string `json:"profileUrl,omitempty" yaml:"profile_url,omitempty"`
+
+ ProjectId string `json:"projectId,omitempty" yaml:"project_id,omitempty"`
+
+ Role string `json:"role,omitempty" yaml:"role,omitempty"`
+}
+
+type IdentityCollection struct {
+ Collection
+ Data []Identity `json:"data,omitempty"`
+ client *IdentityClient
+}
+
+type IdentityClient struct {
+ rancherClient *RancherClient
+}
+
+type IdentityOperations interface {
+ List(opts *ListOpts) (*IdentityCollection, error)
+ Create(opts *Identity) (*Identity, error)
+ Update(existing *Identity, updates interface{}) (*Identity, error)
+ ById(id string) (*Identity, error)
+ Delete(container *Identity) error
+}
+
+func newIdentityClient(rancherClient *RancherClient) *IdentityClient {
+ return &IdentityClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *IdentityClient) Create(container *Identity) (*Identity, error) {
+ resp := &Identity{}
+ err := c.rancherClient.doCreate(IDENTITY_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *IdentityClient) Update(existing *Identity, updates interface{}) (*Identity, error) {
+ resp := &Identity{}
+ err := c.rancherClient.doUpdate(IDENTITY_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *IdentityClient) List(opts *ListOpts) (*IdentityCollection, error) {
+ resp := &IdentityCollection{}
+ err := c.rancherClient.doList(IDENTITY_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *IdentityCollection) Next() (*IdentityCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &IdentityCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *IdentityClient) ById(id string) (*Identity, error) {
+ resp := &Identity{}
+ err := c.rancherClient.doById(IDENTITY_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *IdentityClient) Delete(container *Identity) error {
+ return c.rancherClient.doResourceDelete(IDENTITY_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_image.go b/vendor/github.com/rancher/go-rancher/client/generated_image.go
new file mode 100644
index 00000000..b14103b3
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_image.go
@@ -0,0 +1,180 @@
+package client
+
+const (
+ IMAGE_TYPE = "image"
+)
+
+type Image struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ImageCollection struct {
+ Collection
+ Data []Image `json:"data,omitempty"`
+ client *ImageClient
+}
+
+type ImageClient struct {
+ rancherClient *RancherClient
+}
+
+type ImageOperations interface {
+ List(opts *ListOpts) (*ImageCollection, error)
+ Create(opts *Image) (*Image, error)
+ Update(existing *Image, updates interface{}) (*Image, error)
+ ById(id string) (*Image, error)
+ Delete(container *Image) error
+
+ ActionActivate(*Image) (*Image, error)
+
+ ActionCreate(*Image) (*Image, error)
+
+ ActionDeactivate(*Image) (*Image, error)
+
+ ActionPurge(*Image) (*Image, error)
+
+ ActionRemove(*Image) (*Image, error)
+
+ ActionRestore(*Image) (*Image, error)
+
+ ActionUpdate(*Image) (*Image, error)
+}
+
+func newImageClient(rancherClient *RancherClient) *ImageClient {
+ return &ImageClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ImageClient) Create(container *Image) (*Image, error) {
+ resp := &Image{}
+ err := c.rancherClient.doCreate(IMAGE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ImageClient) Update(existing *Image, updates interface{}) (*Image, error) {
+ resp := &Image{}
+ err := c.rancherClient.doUpdate(IMAGE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ImageClient) List(opts *ListOpts) (*ImageCollection, error) {
+ resp := &ImageCollection{}
+ err := c.rancherClient.doList(IMAGE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ImageCollection) Next() (*ImageCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ImageCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ImageClient) ById(id string) (*Image, error) {
+ resp := &Image{}
+ err := c.rancherClient.doById(IMAGE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ImageClient) Delete(container *Image) error {
+ return c.rancherClient.doResourceDelete(IMAGE_TYPE, &container.Resource)
+}
+
+func (c *ImageClient) ActionActivate(resource *Image) (*Image, error) {
+
+ resp := &Image{}
+
+ err := c.rancherClient.doAction(IMAGE_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ImageClient) ActionCreate(resource *Image) (*Image, error) {
+
+ resp := &Image{}
+
+ err := c.rancherClient.doAction(IMAGE_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ImageClient) ActionDeactivate(resource *Image) (*Image, error) {
+
+ resp := &Image{}
+
+ err := c.rancherClient.doAction(IMAGE_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ImageClient) ActionPurge(resource *Image) (*Image, error) {
+
+ resp := &Image{}
+
+ err := c.rancherClient.doAction(IMAGE_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ImageClient) ActionRemove(resource *Image) (*Image, error) {
+
+ resp := &Image{}
+
+ err := c.rancherClient.doAction(IMAGE_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ImageClient) ActionRestore(resource *Image) (*Image, error) {
+
+ resp := &Image{}
+
+ err := c.rancherClient.doAction(IMAGE_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ImageClient) ActionUpdate(resource *Image) (*Image, error) {
+
+ resp := &Image{}
+
+ err := c.rancherClient.doAction(IMAGE_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_in_service_upgrade_strategy.go b/vendor/github.com/rancher/go-rancher/client/generated_in_service_upgrade_strategy.go
new file mode 100644
index 00000000..0dc61686
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_in_service_upgrade_strategy.go
@@ -0,0 +1,91 @@
+package client
+
+const (
+ IN_SERVICE_UPGRADE_STRATEGY_TYPE = "inServiceUpgradeStrategy"
+)
+
+type InServiceUpgradeStrategy struct {
+ Resource
+
+ BatchSize int64 `json:"batchSize,omitempty" yaml:"batch_size,omitempty"`
+
+ IntervalMillis int64 `json:"intervalMillis,omitempty" yaml:"interval_millis,omitempty"`
+
+ LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"`
+
+ PreviousLaunchConfig *LaunchConfig `json:"previousLaunchConfig,omitempty" yaml:"previous_launch_config,omitempty"`
+
+ PreviousSecondaryLaunchConfigs []interface{} `json:"previousSecondaryLaunchConfigs,omitempty" yaml:"previous_secondary_launch_configs,omitempty"`
+
+ SecondaryLaunchConfigs []interface{} `json:"secondaryLaunchConfigs,omitempty" yaml:"secondary_launch_configs,omitempty"`
+
+ StartFirst bool `json:"startFirst,omitempty" yaml:"start_first,omitempty"`
+}
+
+type InServiceUpgradeStrategyCollection struct {
+ Collection
+ Data []InServiceUpgradeStrategy `json:"data,omitempty"`
+ client *InServiceUpgradeStrategyClient
+}
+
+type InServiceUpgradeStrategyClient struct {
+ rancherClient *RancherClient
+}
+
+type InServiceUpgradeStrategyOperations interface {
+ List(opts *ListOpts) (*InServiceUpgradeStrategyCollection, error)
+ Create(opts *InServiceUpgradeStrategy) (*InServiceUpgradeStrategy, error)
+ Update(existing *InServiceUpgradeStrategy, updates interface{}) (*InServiceUpgradeStrategy, error)
+ ById(id string) (*InServiceUpgradeStrategy, error)
+ Delete(container *InServiceUpgradeStrategy) error
+}
+
+func newInServiceUpgradeStrategyClient(rancherClient *RancherClient) *InServiceUpgradeStrategyClient {
+ return &InServiceUpgradeStrategyClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *InServiceUpgradeStrategyClient) Create(container *InServiceUpgradeStrategy) (*InServiceUpgradeStrategy, error) {
+ resp := &InServiceUpgradeStrategy{}
+ err := c.rancherClient.doCreate(IN_SERVICE_UPGRADE_STRATEGY_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *InServiceUpgradeStrategyClient) Update(existing *InServiceUpgradeStrategy, updates interface{}) (*InServiceUpgradeStrategy, error) {
+ resp := &InServiceUpgradeStrategy{}
+ err := c.rancherClient.doUpdate(IN_SERVICE_UPGRADE_STRATEGY_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *InServiceUpgradeStrategyClient) List(opts *ListOpts) (*InServiceUpgradeStrategyCollection, error) {
+ resp := &InServiceUpgradeStrategyCollection{}
+ err := c.rancherClient.doList(IN_SERVICE_UPGRADE_STRATEGY_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *InServiceUpgradeStrategyCollection) Next() (*InServiceUpgradeStrategyCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &InServiceUpgradeStrategyCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *InServiceUpgradeStrategyClient) ById(id string) (*InServiceUpgradeStrategy, error) {
+ resp := &InServiceUpgradeStrategy{}
+ err := c.rancherClient.doById(IN_SERVICE_UPGRADE_STRATEGY_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *InServiceUpgradeStrategyClient) Delete(container *InServiceUpgradeStrategy) error {
+ return c.rancherClient.doResourceDelete(IN_SERVICE_UPGRADE_STRATEGY_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_instance.go b/vendor/github.com/rancher/go-rancher/client/generated_instance.go
new file mode 100644
index 00000000..c552f3de
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_instance.go
@@ -0,0 +1,283 @@
+package client
+
+const (
+ INSTANCE_TYPE = "instance"
+)
+
+type Instance struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type InstanceCollection struct {
+ Collection
+ Data []Instance `json:"data,omitempty"`
+ client *InstanceClient
+}
+
+type InstanceClient struct {
+ rancherClient *RancherClient
+}
+
+type InstanceOperations interface {
+ List(opts *ListOpts) (*InstanceCollection, error)
+ Create(opts *Instance) (*Instance, error)
+ Update(existing *Instance, updates interface{}) (*Instance, error)
+ ById(id string) (*Instance, error)
+ Delete(container *Instance) error
+
+ ActionAllocate(*Instance) (*Instance, error)
+
+ ActionConsole(*Instance, *InstanceConsoleInput) (*InstanceConsole, error)
+
+ ActionCreate(*Instance) (*Instance, error)
+
+ ActionDeallocate(*Instance) (*Instance, error)
+
+ ActionError(*Instance) (*Instance, error)
+
+ ActionMigrate(*Instance) (*Instance, error)
+
+ ActionPurge(*Instance) (*Instance, error)
+
+ ActionRemove(*Instance) (*Instance, error)
+
+ ActionRestart(*Instance) (*Instance, error)
+
+ ActionRestore(*Instance) (*Instance, error)
+
+ ActionStart(*Instance) (*Instance, error)
+
+ ActionStop(*Instance, *InstanceStop) (*Instance, error)
+
+ ActionUpdate(*Instance) (*Instance, error)
+
+ ActionUpdatehealthy(*Instance) (*Instance, error)
+
+ ActionUpdatereinitializing(*Instance) (*Instance, error)
+
+ ActionUpdateunhealthy(*Instance) (*Instance, error)
+}
+
+func newInstanceClient(rancherClient *RancherClient) *InstanceClient {
+ return &InstanceClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *InstanceClient) Create(container *Instance) (*Instance, error) {
+ resp := &Instance{}
+ err := c.rancherClient.doCreate(INSTANCE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *InstanceClient) Update(existing *Instance, updates interface{}) (*Instance, error) {
+ resp := &Instance{}
+ err := c.rancherClient.doUpdate(INSTANCE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *InstanceClient) List(opts *ListOpts) (*InstanceCollection, error) {
+ resp := &InstanceCollection{}
+ err := c.rancherClient.doList(INSTANCE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *InstanceCollection) Next() (*InstanceCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &InstanceCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *InstanceClient) ById(id string) (*Instance, error) {
+ resp := &Instance{}
+ err := c.rancherClient.doById(INSTANCE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *InstanceClient) Delete(container *Instance) error {
+ return c.rancherClient.doResourceDelete(INSTANCE_TYPE, &container.Resource)
+}
+
+func (c *InstanceClient) ActionAllocate(resource *Instance) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "allocate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionConsole(resource *Instance, input *InstanceConsoleInput) (*InstanceConsole, error) {
+
+ resp := &InstanceConsole{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "console", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionCreate(resource *Instance) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionDeallocate(resource *Instance) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "deallocate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionError(resource *Instance) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "error", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionMigrate(resource *Instance) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "migrate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionPurge(resource *Instance) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionRemove(resource *Instance) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionRestart(resource *Instance) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "restart", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionRestore(resource *Instance) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionStart(resource *Instance) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "start", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionStop(resource *Instance, input *InstanceStop) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "stop", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionUpdate(resource *Instance) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionUpdatehealthy(resource *Instance) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "updatehealthy", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionUpdatereinitializing(resource *Instance) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "updatereinitializing", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceClient) ActionUpdateunhealthy(resource *Instance) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(INSTANCE_TYPE, "updateunhealthy", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_instance_console.go b/vendor/github.com/rancher/go-rancher/client/generated_instance_console.go
new file mode 100644
index 00000000..85746058
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_instance_console.go
@@ -0,0 +1,83 @@
+package client
+
+const (
+ INSTANCE_CONSOLE_TYPE = "instanceConsole"
+)
+
+type InstanceConsole struct {
+ Resource
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Password string `json:"password,omitempty" yaml:"password,omitempty"`
+
+ Url string `json:"url,omitempty" yaml:"url,omitempty"`
+}
+
+type InstanceConsoleCollection struct {
+ Collection
+ Data []InstanceConsole `json:"data,omitempty"`
+ client *InstanceConsoleClient
+}
+
+type InstanceConsoleClient struct {
+ rancherClient *RancherClient
+}
+
+type InstanceConsoleOperations interface {
+ List(opts *ListOpts) (*InstanceConsoleCollection, error)
+ Create(opts *InstanceConsole) (*InstanceConsole, error)
+ Update(existing *InstanceConsole, updates interface{}) (*InstanceConsole, error)
+ ById(id string) (*InstanceConsole, error)
+ Delete(container *InstanceConsole) error
+}
+
+func newInstanceConsoleClient(rancherClient *RancherClient) *InstanceConsoleClient {
+ return &InstanceConsoleClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *InstanceConsoleClient) Create(container *InstanceConsole) (*InstanceConsole, error) {
+ resp := &InstanceConsole{}
+ err := c.rancherClient.doCreate(INSTANCE_CONSOLE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *InstanceConsoleClient) Update(existing *InstanceConsole, updates interface{}) (*InstanceConsole, error) {
+ resp := &InstanceConsole{}
+ err := c.rancherClient.doUpdate(INSTANCE_CONSOLE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *InstanceConsoleClient) List(opts *ListOpts) (*InstanceConsoleCollection, error) {
+ resp := &InstanceConsoleCollection{}
+ err := c.rancherClient.doList(INSTANCE_CONSOLE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *InstanceConsoleCollection) Next() (*InstanceConsoleCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &InstanceConsoleCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *InstanceConsoleClient) ById(id string) (*InstanceConsole, error) {
+ resp := &InstanceConsole{}
+ err := c.rancherClient.doById(INSTANCE_CONSOLE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *InstanceConsoleClient) Delete(container *InstanceConsole) error {
+ return c.rancherClient.doResourceDelete(INSTANCE_CONSOLE_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_instance_console_input.go b/vendor/github.com/rancher/go-rancher/client/generated_instance_console_input.go
new file mode 100644
index 00000000..5bfbe81f
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_instance_console_input.go
@@ -0,0 +1,77 @@
+package client
+
+const (
+ INSTANCE_CONSOLE_INPUT_TYPE = "instanceConsoleInput"
+)
+
+type InstanceConsoleInput struct {
+ Resource
+}
+
+type InstanceConsoleInputCollection struct {
+ Collection
+ Data []InstanceConsoleInput `json:"data,omitempty"`
+ client *InstanceConsoleInputClient
+}
+
+type InstanceConsoleInputClient struct {
+ rancherClient *RancherClient
+}
+
+type InstanceConsoleInputOperations interface {
+ List(opts *ListOpts) (*InstanceConsoleInputCollection, error)
+ Create(opts *InstanceConsoleInput) (*InstanceConsoleInput, error)
+ Update(existing *InstanceConsoleInput, updates interface{}) (*InstanceConsoleInput, error)
+ ById(id string) (*InstanceConsoleInput, error)
+ Delete(container *InstanceConsoleInput) error
+}
+
+func newInstanceConsoleInputClient(rancherClient *RancherClient) *InstanceConsoleInputClient {
+ return &InstanceConsoleInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *InstanceConsoleInputClient) Create(container *InstanceConsoleInput) (*InstanceConsoleInput, error) {
+ resp := &InstanceConsoleInput{}
+ err := c.rancherClient.doCreate(INSTANCE_CONSOLE_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *InstanceConsoleInputClient) Update(existing *InstanceConsoleInput, updates interface{}) (*InstanceConsoleInput, error) {
+ resp := &InstanceConsoleInput{}
+ err := c.rancherClient.doUpdate(INSTANCE_CONSOLE_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *InstanceConsoleInputClient) List(opts *ListOpts) (*InstanceConsoleInputCollection, error) {
+ resp := &InstanceConsoleInputCollection{}
+ err := c.rancherClient.doList(INSTANCE_CONSOLE_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *InstanceConsoleInputCollection) Next() (*InstanceConsoleInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &InstanceConsoleInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *InstanceConsoleInputClient) ById(id string) (*InstanceConsoleInput, error) {
+ resp := &InstanceConsoleInput{}
+ err := c.rancherClient.doById(INSTANCE_CONSOLE_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *InstanceConsoleInputClient) Delete(container *InstanceConsoleInput) error {
+ return c.rancherClient.doResourceDelete(INSTANCE_CONSOLE_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_instance_health_check.go b/vendor/github.com/rancher/go-rancher/client/generated_instance_health_check.go
new file mode 100644
index 00000000..4f2ce46c
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_instance_health_check.go
@@ -0,0 +1,99 @@
+package client
+
+const (
+ INSTANCE_HEALTH_CHECK_TYPE = "instanceHealthCheck"
+)
+
+type InstanceHealthCheck struct {
+ Resource
+
+ HealthyThreshold int64 `json:"healthyThreshold,omitempty" yaml:"healthy_threshold,omitempty"`
+
+ InitializingTimeout int64 `json:"initializingTimeout,omitempty" yaml:"initializing_timeout,omitempty"`
+
+ Interval int64 `json:"interval,omitempty" yaml:"interval,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Port int64 `json:"port,omitempty" yaml:"port,omitempty"`
+
+ RecreateOnQuorumStrategyConfig *RecreateOnQuorumStrategyConfig `json:"recreateOnQuorumStrategyConfig,omitempty" yaml:"recreate_on_quorum_strategy_config,omitempty"`
+
+ ReinitializingTimeout int64 `json:"reinitializingTimeout,omitempty" yaml:"reinitializing_timeout,omitempty"`
+
+ RequestLine string `json:"requestLine,omitempty" yaml:"request_line,omitempty"`
+
+ ResponseTimeout int64 `json:"responseTimeout,omitempty" yaml:"response_timeout,omitempty"`
+
+ Strategy string `json:"strategy,omitempty" yaml:"strategy,omitempty"`
+
+ UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty" yaml:"unhealthy_threshold,omitempty"`
+}
+
+type InstanceHealthCheckCollection struct {
+ Collection
+ Data []InstanceHealthCheck `json:"data,omitempty"`
+ client *InstanceHealthCheckClient
+}
+
+type InstanceHealthCheckClient struct {
+ rancherClient *RancherClient
+}
+
+type InstanceHealthCheckOperations interface {
+ List(opts *ListOpts) (*InstanceHealthCheckCollection, error)
+ Create(opts *InstanceHealthCheck) (*InstanceHealthCheck, error)
+ Update(existing *InstanceHealthCheck, updates interface{}) (*InstanceHealthCheck, error)
+ ById(id string) (*InstanceHealthCheck, error)
+ Delete(container *InstanceHealthCheck) error
+}
+
+func newInstanceHealthCheckClient(rancherClient *RancherClient) *InstanceHealthCheckClient {
+ return &InstanceHealthCheckClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *InstanceHealthCheckClient) Create(container *InstanceHealthCheck) (*InstanceHealthCheck, error) {
+ resp := &InstanceHealthCheck{}
+ err := c.rancherClient.doCreate(INSTANCE_HEALTH_CHECK_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *InstanceHealthCheckClient) Update(existing *InstanceHealthCheck, updates interface{}) (*InstanceHealthCheck, error) {
+ resp := &InstanceHealthCheck{}
+ err := c.rancherClient.doUpdate(INSTANCE_HEALTH_CHECK_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *InstanceHealthCheckClient) List(opts *ListOpts) (*InstanceHealthCheckCollection, error) {
+ resp := &InstanceHealthCheckCollection{}
+ err := c.rancherClient.doList(INSTANCE_HEALTH_CHECK_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *InstanceHealthCheckCollection) Next() (*InstanceHealthCheckCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &InstanceHealthCheckCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *InstanceHealthCheckClient) ById(id string) (*InstanceHealthCheck, error) {
+ resp := &InstanceHealthCheck{}
+ err := c.rancherClient.doById(INSTANCE_HEALTH_CHECK_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *InstanceHealthCheckClient) Delete(container *InstanceHealthCheck) error {
+ return c.rancherClient.doResourceDelete(INSTANCE_HEALTH_CHECK_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_instance_link.go b/vendor/github.com/rancher/go-rancher/client/generated_instance_link.go
new file mode 100644
index 00000000..598d5e52
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_instance_link.go
@@ -0,0 +1,188 @@
+package client
+
+const (
+ INSTANCE_LINK_TYPE = "instanceLink"
+)
+
+type InstanceLink struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ LinkName string `json:"linkName,omitempty" yaml:"link_name,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Ports []interface{} `json:"ports,omitempty" yaml:"ports,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ TargetInstanceId string `json:"targetInstanceId,omitempty" yaml:"target_instance_id,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type InstanceLinkCollection struct {
+ Collection
+ Data []InstanceLink `json:"data,omitempty"`
+ client *InstanceLinkClient
+}
+
+type InstanceLinkClient struct {
+ rancherClient *RancherClient
+}
+
+type InstanceLinkOperations interface {
+ List(opts *ListOpts) (*InstanceLinkCollection, error)
+ Create(opts *InstanceLink) (*InstanceLink, error)
+ Update(existing *InstanceLink, updates interface{}) (*InstanceLink, error)
+ ById(id string) (*InstanceLink, error)
+ Delete(container *InstanceLink) error
+
+ ActionActivate(*InstanceLink) (*InstanceLink, error)
+
+ ActionCreate(*InstanceLink) (*InstanceLink, error)
+
+ ActionDeactivate(*InstanceLink) (*InstanceLink, error)
+
+ ActionPurge(*InstanceLink) (*InstanceLink, error)
+
+ ActionRemove(*InstanceLink) (*InstanceLink, error)
+
+ ActionRestore(*InstanceLink) (*InstanceLink, error)
+
+ ActionUpdate(*InstanceLink) (*InstanceLink, error)
+}
+
+func newInstanceLinkClient(rancherClient *RancherClient) *InstanceLinkClient {
+ return &InstanceLinkClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *InstanceLinkClient) Create(container *InstanceLink) (*InstanceLink, error) {
+ resp := &InstanceLink{}
+ err := c.rancherClient.doCreate(INSTANCE_LINK_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *InstanceLinkClient) Update(existing *InstanceLink, updates interface{}) (*InstanceLink, error) {
+ resp := &InstanceLink{}
+ err := c.rancherClient.doUpdate(INSTANCE_LINK_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *InstanceLinkClient) List(opts *ListOpts) (*InstanceLinkCollection, error) {
+ resp := &InstanceLinkCollection{}
+ err := c.rancherClient.doList(INSTANCE_LINK_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *InstanceLinkCollection) Next() (*InstanceLinkCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &InstanceLinkCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *InstanceLinkClient) ById(id string) (*InstanceLink, error) {
+ resp := &InstanceLink{}
+ err := c.rancherClient.doById(INSTANCE_LINK_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *InstanceLinkClient) Delete(container *InstanceLink) error {
+ return c.rancherClient.doResourceDelete(INSTANCE_LINK_TYPE, &container.Resource)
+}
+
+func (c *InstanceLinkClient) ActionActivate(resource *InstanceLink) (*InstanceLink, error) {
+
+ resp := &InstanceLink{}
+
+ err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceLinkClient) ActionCreate(resource *InstanceLink) (*InstanceLink, error) {
+
+ resp := &InstanceLink{}
+
+ err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceLinkClient) ActionDeactivate(resource *InstanceLink) (*InstanceLink, error) {
+
+ resp := &InstanceLink{}
+
+ err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceLinkClient) ActionPurge(resource *InstanceLink) (*InstanceLink, error) {
+
+ resp := &InstanceLink{}
+
+ err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceLinkClient) ActionRemove(resource *InstanceLink) (*InstanceLink, error) {
+
+ resp := &InstanceLink{}
+
+ err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceLinkClient) ActionRestore(resource *InstanceLink) (*InstanceLink, error) {
+
+ resp := &InstanceLink{}
+
+ err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *InstanceLinkClient) ActionUpdate(resource *InstanceLink) (*InstanceLink, error) {
+
+ resp := &InstanceLink{}
+
+ err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_instance_stop.go b/vendor/github.com/rancher/go-rancher/client/generated_instance_stop.go
new file mode 100644
index 00000000..2e3b2b67
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_instance_stop.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ INSTANCE_STOP_TYPE = "instanceStop"
+)
+
+type InstanceStop struct {
+ Resource
+
+ Remove bool `json:"remove,omitempty" yaml:"remove,omitempty"`
+
+ Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"`
+}
+
+type InstanceStopCollection struct {
+ Collection
+ Data []InstanceStop `json:"data,omitempty"`
+ client *InstanceStopClient
+}
+
+type InstanceStopClient struct {
+ rancherClient *RancherClient
+}
+
+type InstanceStopOperations interface {
+ List(opts *ListOpts) (*InstanceStopCollection, error)
+ Create(opts *InstanceStop) (*InstanceStop, error)
+ Update(existing *InstanceStop, updates interface{}) (*InstanceStop, error)
+ ById(id string) (*InstanceStop, error)
+ Delete(container *InstanceStop) error
+}
+
+func newInstanceStopClient(rancherClient *RancherClient) *InstanceStopClient {
+ return &InstanceStopClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *InstanceStopClient) Create(container *InstanceStop) (*InstanceStop, error) {
+ resp := &InstanceStop{}
+ err := c.rancherClient.doCreate(INSTANCE_STOP_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *InstanceStopClient) Update(existing *InstanceStop, updates interface{}) (*InstanceStop, error) {
+ resp := &InstanceStop{}
+ err := c.rancherClient.doUpdate(INSTANCE_STOP_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *InstanceStopClient) List(opts *ListOpts) (*InstanceStopCollection, error) {
+ resp := &InstanceStopCollection{}
+ err := c.rancherClient.doList(INSTANCE_STOP_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *InstanceStopCollection) Next() (*InstanceStopCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &InstanceStopCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *InstanceStopClient) ById(id string) (*InstanceStop, error) {
+ resp := &InstanceStop{}
+ err := c.rancherClient.doById(INSTANCE_STOP_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *InstanceStopClient) Delete(container *InstanceStop) error {
+ return c.rancherClient.doResourceDelete(INSTANCE_STOP_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_ip_address.go b/vendor/github.com/rancher/go-rancher/client/generated_ip_address.go
new file mode 100644
index 00000000..60932494
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_ip_address.go
@@ -0,0 +1,195 @@
+package client
+
+const (
+ IP_ADDRESS_TYPE = "ipAddress"
+)
+
+type IpAddress struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Address string `json:"address,omitempty" yaml:"address,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ NetworkId string `json:"networkId,omitempty" yaml:"network_id,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type IpAddressCollection struct {
+ Collection
+ Data []IpAddress `json:"data,omitempty"`
+ client *IpAddressClient
+}
+
+type IpAddressClient struct {
+ rancherClient *RancherClient
+}
+
+type IpAddressOperations interface {
+ List(opts *ListOpts) (*IpAddressCollection, error)
+ Create(opts *IpAddress) (*IpAddress, error)
+ Update(existing *IpAddress, updates interface{}) (*IpAddress, error)
+ ById(id string) (*IpAddress, error)
+ Delete(container *IpAddress) error
+
+ ActionActivate(*IpAddress) (*IpAddress, error)
+
+ ActionCreate(*IpAddress) (*IpAddress, error)
+
+ ActionDeactivate(*IpAddress) (*IpAddress, error)
+
+ ActionDisassociate(*IpAddress) (*IpAddress, error)
+
+ ActionPurge(*IpAddress) (*IpAddress, error)
+
+ ActionRemove(*IpAddress) (*IpAddress, error)
+
+ ActionRestore(*IpAddress) (*IpAddress, error)
+
+ ActionUpdate(*IpAddress) (*IpAddress, error)
+}
+
+func newIpAddressClient(rancherClient *RancherClient) *IpAddressClient {
+ return &IpAddressClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *IpAddressClient) Create(container *IpAddress) (*IpAddress, error) {
+ resp := &IpAddress{}
+ err := c.rancherClient.doCreate(IP_ADDRESS_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *IpAddressClient) Update(existing *IpAddress, updates interface{}) (*IpAddress, error) {
+ resp := &IpAddress{}
+ err := c.rancherClient.doUpdate(IP_ADDRESS_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *IpAddressClient) List(opts *ListOpts) (*IpAddressCollection, error) {
+ resp := &IpAddressCollection{}
+ err := c.rancherClient.doList(IP_ADDRESS_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *IpAddressCollection) Next() (*IpAddressCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &IpAddressCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *IpAddressClient) ById(id string) (*IpAddress, error) {
+ resp := &IpAddress{}
+ err := c.rancherClient.doById(IP_ADDRESS_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *IpAddressClient) Delete(container *IpAddress) error {
+ return c.rancherClient.doResourceDelete(IP_ADDRESS_TYPE, &container.Resource)
+}
+
+func (c *IpAddressClient) ActionActivate(resource *IpAddress) (*IpAddress, error) {
+
+ resp := &IpAddress{}
+
+ err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *IpAddressClient) ActionCreate(resource *IpAddress) (*IpAddress, error) {
+
+ resp := &IpAddress{}
+
+ err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *IpAddressClient) ActionDeactivate(resource *IpAddress) (*IpAddress, error) {
+
+ resp := &IpAddress{}
+
+ err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *IpAddressClient) ActionDisassociate(resource *IpAddress) (*IpAddress, error) {
+
+ resp := &IpAddress{}
+
+ err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "disassociate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *IpAddressClient) ActionPurge(resource *IpAddress) (*IpAddress, error) {
+
+ resp := &IpAddress{}
+
+ err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *IpAddressClient) ActionRemove(resource *IpAddress) (*IpAddress, error) {
+
+ resp := &IpAddress{}
+
+ err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *IpAddressClient) ActionRestore(resource *IpAddress) (*IpAddress, error) {
+
+ resp := &IpAddress{}
+
+ err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *IpAddressClient) ActionUpdate(resource *IpAddress) (*IpAddress, error) {
+
+ resp := &IpAddress{}
+
+ err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_ip_address_associate_input.go b/vendor/github.com/rancher/go-rancher/client/generated_ip_address_associate_input.go
new file mode 100644
index 00000000..2fb5fe2e
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_ip_address_associate_input.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ IP_ADDRESS_ASSOCIATE_INPUT_TYPE = "ipAddressAssociateInput"
+)
+
+type IpAddressAssociateInput struct {
+ Resource
+
+ IpAddressId string `json:"ipAddressId,omitempty" yaml:"ip_address_id,omitempty"`
+}
+
+type IpAddressAssociateInputCollection struct {
+ Collection
+ Data []IpAddressAssociateInput `json:"data,omitempty"`
+ client *IpAddressAssociateInputClient
+}
+
+type IpAddressAssociateInputClient struct {
+ rancherClient *RancherClient
+}
+
+type IpAddressAssociateInputOperations interface {
+ List(opts *ListOpts) (*IpAddressAssociateInputCollection, error)
+ Create(opts *IpAddressAssociateInput) (*IpAddressAssociateInput, error)
+ Update(existing *IpAddressAssociateInput, updates interface{}) (*IpAddressAssociateInput, error)
+ ById(id string) (*IpAddressAssociateInput, error)
+ Delete(container *IpAddressAssociateInput) error
+}
+
+func newIpAddressAssociateInputClient(rancherClient *RancherClient) *IpAddressAssociateInputClient {
+ return &IpAddressAssociateInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *IpAddressAssociateInputClient) Create(container *IpAddressAssociateInput) (*IpAddressAssociateInput, error) {
+ resp := &IpAddressAssociateInput{}
+ err := c.rancherClient.doCreate(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *IpAddressAssociateInputClient) Update(existing *IpAddressAssociateInput, updates interface{}) (*IpAddressAssociateInput, error) {
+ resp := &IpAddressAssociateInput{}
+ err := c.rancherClient.doUpdate(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *IpAddressAssociateInputClient) List(opts *ListOpts) (*IpAddressAssociateInputCollection, error) {
+ resp := &IpAddressAssociateInputCollection{}
+ err := c.rancherClient.doList(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *IpAddressAssociateInputCollection) Next() (*IpAddressAssociateInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &IpAddressAssociateInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *IpAddressAssociateInputClient) ById(id string) (*IpAddressAssociateInput, error) {
+ resp := &IpAddressAssociateInput{}
+ err := c.rancherClient.doById(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *IpAddressAssociateInputClient) Delete(container *IpAddressAssociateInput) error {
+ return c.rancherClient.doResourceDelete(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_service.go b/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_service.go
new file mode 100644
index 00000000..34ac4360
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_service.go
@@ -0,0 +1,269 @@
+package client
+
+const (
+ KUBERNETES_SERVICE_TYPE = "kubernetesService"
+)
+
+type KubernetesService struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ SelectorContainer string `json:"selectorContainer,omitempty" yaml:"selector_container,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Template interface{} `json:"template,omitempty" yaml:"template,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ Vip string `json:"vip,omitempty" yaml:"vip,omitempty"`
+}
+
+type KubernetesServiceCollection struct {
+ Collection
+ Data []KubernetesService `json:"data,omitempty"`
+ client *KubernetesServiceClient
+}
+
+type KubernetesServiceClient struct {
+ rancherClient *RancherClient
+}
+
+type KubernetesServiceOperations interface {
+ List(opts *ListOpts) (*KubernetesServiceCollection, error)
+ Create(opts *KubernetesService) (*KubernetesService, error)
+ Update(existing *KubernetesService, updates interface{}) (*KubernetesService, error)
+ ById(id string) (*KubernetesService, error)
+ Delete(container *KubernetesService) error
+
+ ActionActivate(*KubernetesService) (*Service, error)
+
+ ActionAddservicelink(*KubernetesService, *AddRemoveServiceLinkInput) (*Service, error)
+
+ ActionCancelrollback(*KubernetesService) (*Service, error)
+
+ ActionCancelupgrade(*KubernetesService) (*Service, error)
+
+ ActionCreate(*KubernetesService) (*Service, error)
+
+ ActionDeactivate(*KubernetesService) (*Service, error)
+
+ ActionFinishupgrade(*KubernetesService) (*Service, error)
+
+ ActionRemove(*KubernetesService) (*Service, error)
+
+ ActionRemoveservicelink(*KubernetesService, *AddRemoveServiceLinkInput) (*Service, error)
+
+ ActionRestart(*KubernetesService, *ServiceRestart) (*Service, error)
+
+ ActionRollback(*KubernetesService) (*Service, error)
+
+ ActionSetservicelinks(*KubernetesService, *SetServiceLinksInput) (*Service, error)
+
+ ActionUpdate(*KubernetesService) (*Service, error)
+
+ ActionUpgrade(*KubernetesService, *ServiceUpgrade) (*Service, error)
+}
+
+func newKubernetesServiceClient(rancherClient *RancherClient) *KubernetesServiceClient {
+ return &KubernetesServiceClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *KubernetesServiceClient) Create(container *KubernetesService) (*KubernetesService, error) {
+ resp := &KubernetesService{}
+ err := c.rancherClient.doCreate(KUBERNETES_SERVICE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) Update(existing *KubernetesService, updates interface{}) (*KubernetesService, error) {
+ resp := &KubernetesService{}
+ err := c.rancherClient.doUpdate(KUBERNETES_SERVICE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) List(opts *ListOpts) (*KubernetesServiceCollection, error) {
+ resp := &KubernetesServiceCollection{}
+ err := c.rancherClient.doList(KUBERNETES_SERVICE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *KubernetesServiceCollection) Next() (*KubernetesServiceCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &KubernetesServiceCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *KubernetesServiceClient) ById(id string) (*KubernetesService, error) {
+ resp := &KubernetesService{}
+ err := c.rancherClient.doById(KUBERNETES_SERVICE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) Delete(container *KubernetesService) error {
+ return c.rancherClient.doResourceDelete(KUBERNETES_SERVICE_TYPE, &container.Resource)
+}
+
+func (c *KubernetesServiceClient) ActionActivate(resource *KubernetesService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) ActionAddservicelink(resource *KubernetesService, input *AddRemoveServiceLinkInput) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "addservicelink", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) ActionCancelrollback(resource *KubernetesService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) ActionCancelupgrade(resource *KubernetesService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) ActionCreate(resource *KubernetesService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) ActionDeactivate(resource *KubernetesService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) ActionFinishupgrade(resource *KubernetesService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) ActionRemove(resource *KubernetesService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) ActionRemoveservicelink(resource *KubernetesService, input *AddRemoveServiceLinkInput) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "removeservicelink", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) ActionRestart(resource *KubernetesService, input *ServiceRestart) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "restart", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) ActionRollback(resource *KubernetesService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) ActionSetservicelinks(resource *KubernetesService, input *SetServiceLinksInput) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "setservicelinks", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) ActionUpdate(resource *KubernetesService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesServiceClient) ActionUpgrade(resource *KubernetesService, input *ServiceUpgrade) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "upgrade", &resource.Resource, input, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack.go b/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack.go
new file mode 100644
index 00000000..136466fa
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack.go
@@ -0,0 +1,205 @@
+package client
+
+const (
+ KUBERNETES_STACK_TYPE = "kubernetesStack"
+)
+
+type KubernetesStack struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
+
+ PreviousEnvironment map[string]interface{} `json:"previousEnvironment,omitempty" yaml:"previous_environment,omitempty"`
+
+ PreviousExternalId string `json:"previousExternalId,omitempty" yaml:"previous_external_id,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Templates map[string]interface{} `json:"templates,omitempty" yaml:"templates,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type KubernetesStackCollection struct {
+ Collection
+ Data []KubernetesStack `json:"data,omitempty"`
+ client *KubernetesStackClient
+}
+
+type KubernetesStackClient struct {
+ rancherClient *RancherClient
+}
+
+type KubernetesStackOperations interface {
+ List(opts *ListOpts) (*KubernetesStackCollection, error)
+ Create(opts *KubernetesStack) (*KubernetesStack, error)
+ Update(existing *KubernetesStack, updates interface{}) (*KubernetesStack, error)
+ ById(id string) (*KubernetesStack, error)
+ Delete(container *KubernetesStack) error
+
+ ActionCancelrollback(*KubernetesStack) (*Environment, error)
+
+ ActionCancelupgrade(*KubernetesStack) (*Environment, error)
+
+ ActionCreate(*KubernetesStack) (*Environment, error)
+
+ ActionError(*KubernetesStack) (*Environment, error)
+
+ ActionFinishupgrade(*KubernetesStack) (*Environment, error)
+
+ ActionRemove(*KubernetesStack) (*Environment, error)
+
+ ActionRollback(*KubernetesStack) (*Environment, error)
+
+ ActionUpgrade(*KubernetesStack, *KubernetesStackUpgrade) (*KubernetesStack, error)
+}
+
+func newKubernetesStackClient(rancherClient *RancherClient) *KubernetesStackClient {
+ return &KubernetesStackClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *KubernetesStackClient) Create(container *KubernetesStack) (*KubernetesStack, error) {
+ resp := &KubernetesStack{}
+ err := c.rancherClient.doCreate(KUBERNETES_STACK_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *KubernetesStackClient) Update(existing *KubernetesStack, updates interface{}) (*KubernetesStack, error) {
+ resp := &KubernetesStack{}
+ err := c.rancherClient.doUpdate(KUBERNETES_STACK_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *KubernetesStackClient) List(opts *ListOpts) (*KubernetesStackCollection, error) {
+ resp := &KubernetesStackCollection{}
+ err := c.rancherClient.doList(KUBERNETES_STACK_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *KubernetesStackCollection) Next() (*KubernetesStackCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &KubernetesStackCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *KubernetesStackClient) ById(id string) (*KubernetesStack, error) {
+ resp := &KubernetesStack{}
+ err := c.rancherClient.doById(KUBERNETES_STACK_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *KubernetesStackClient) Delete(container *KubernetesStack) error {
+ return c.rancherClient.doResourceDelete(KUBERNETES_STACK_TYPE, &container.Resource)
+}
+
+func (c *KubernetesStackClient) ActionCancelrollback(resource *KubernetesStack) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "cancelrollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesStackClient) ActionCancelupgrade(resource *KubernetesStack) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesStackClient) ActionCreate(resource *KubernetesStack) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesStackClient) ActionError(resource *KubernetesStack) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "error", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesStackClient) ActionFinishupgrade(resource *KubernetesStack) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "finishupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesStackClient) ActionRemove(resource *KubernetesStack) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesStackClient) ActionRollback(resource *KubernetesStack) (*Environment, error) {
+
+ resp := &Environment{}
+
+ err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "rollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *KubernetesStackClient) ActionUpgrade(resource *KubernetesStack, input *KubernetesStackUpgrade) (*KubernetesStack, error) {
+
+ resp := &KubernetesStack{}
+
+ err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "upgrade", &resource.Resource, input, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack_upgrade.go b/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack_upgrade.go
new file mode 100644
index 00000000..58c6c5ca
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack_upgrade.go
@@ -0,0 +1,83 @@
+package client
+
+const (
+ KUBERNETES_STACK_UPGRADE_TYPE = "kubernetesStackUpgrade"
+)
+
+type KubernetesStackUpgrade struct {
+ Resource
+
+ Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ Templates map[string]interface{} `json:"templates,omitempty" yaml:"templates,omitempty"`
+}
+
+type KubernetesStackUpgradeCollection struct {
+ Collection
+ Data []KubernetesStackUpgrade `json:"data,omitempty"`
+ client *KubernetesStackUpgradeClient
+}
+
+type KubernetesStackUpgradeClient struct {
+ rancherClient *RancherClient
+}
+
+type KubernetesStackUpgradeOperations interface {
+ List(opts *ListOpts) (*KubernetesStackUpgradeCollection, error)
+ Create(opts *KubernetesStackUpgrade) (*KubernetesStackUpgrade, error)
+ Update(existing *KubernetesStackUpgrade, updates interface{}) (*KubernetesStackUpgrade, error)
+ ById(id string) (*KubernetesStackUpgrade, error)
+ Delete(container *KubernetesStackUpgrade) error
+}
+
+func newKubernetesStackUpgradeClient(rancherClient *RancherClient) *KubernetesStackUpgradeClient {
+ return &KubernetesStackUpgradeClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *KubernetesStackUpgradeClient) Create(container *KubernetesStackUpgrade) (*KubernetesStackUpgrade, error) {
+ resp := &KubernetesStackUpgrade{}
+ err := c.rancherClient.doCreate(KUBERNETES_STACK_UPGRADE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *KubernetesStackUpgradeClient) Update(existing *KubernetesStackUpgrade, updates interface{}) (*KubernetesStackUpgrade, error) {
+ resp := &KubernetesStackUpgrade{}
+ err := c.rancherClient.doUpdate(KUBERNETES_STACK_UPGRADE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *KubernetesStackUpgradeClient) List(opts *ListOpts) (*KubernetesStackUpgradeCollection, error) {
+ resp := &KubernetesStackUpgradeCollection{}
+ err := c.rancherClient.doList(KUBERNETES_STACK_UPGRADE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *KubernetesStackUpgradeCollection) Next() (*KubernetesStackUpgradeCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &KubernetesStackUpgradeCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *KubernetesStackUpgradeClient) ById(id string) (*KubernetesStackUpgrade, error) {
+ resp := &KubernetesStackUpgrade{}
+ err := c.rancherClient.doById(KUBERNETES_STACK_UPGRADE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *KubernetesStackUpgradeClient) Delete(container *KubernetesStackUpgrade) error {
+ return c.rancherClient.doResourceDelete(KUBERNETES_STACK_UPGRADE_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_label.go b/vendor/github.com/rancher/go-rancher/client/generated_label.go
new file mode 100644
index 00000000..6b67a2e8
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_label.go
@@ -0,0 +1,129 @@
+package client
+
+const (
+ LABEL_TYPE = "label"
+)
+
+type Label struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Key string `json:"key,omitempty" yaml:"key,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ Value string `json:"value,omitempty" yaml:"value,omitempty"`
+}
+
+type LabelCollection struct {
+ Collection
+ Data []Label `json:"data,omitempty"`
+ client *LabelClient
+}
+
+type LabelClient struct {
+ rancherClient *RancherClient
+}
+
+type LabelOperations interface {
+ List(opts *ListOpts) (*LabelCollection, error)
+ Create(opts *Label) (*Label, error)
+ Update(existing *Label, updates interface{}) (*Label, error)
+ ById(id string) (*Label, error)
+ Delete(container *Label) error
+
+ ActionCreate(*Label) (*Label, error)
+
+ ActionRemove(*Label) (*Label, error)
+}
+
+func newLabelClient(rancherClient *RancherClient) *LabelClient {
+ return &LabelClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *LabelClient) Create(container *Label) (*Label, error) {
+ resp := &Label{}
+ err := c.rancherClient.doCreate(LABEL_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *LabelClient) Update(existing *Label, updates interface{}) (*Label, error) {
+ resp := &Label{}
+ err := c.rancherClient.doUpdate(LABEL_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *LabelClient) List(opts *ListOpts) (*LabelCollection, error) {
+ resp := &LabelCollection{}
+ err := c.rancherClient.doList(LABEL_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *LabelCollection) Next() (*LabelCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &LabelCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *LabelClient) ById(id string) (*Label, error) {
+ resp := &Label{}
+ err := c.rancherClient.doById(LABEL_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *LabelClient) Delete(container *Label) error {
+ return c.rancherClient.doResourceDelete(LABEL_TYPE, &container.Resource)
+}
+
+func (c *LabelClient) ActionCreate(resource *Label) (*Label, error) {
+
+ resp := &Label{}
+
+ err := c.rancherClient.doAction(LABEL_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LabelClient) ActionRemove(resource *Label) (*Label, error) {
+
+ resp := &Label{}
+
+ err := c.rancherClient.doAction(LABEL_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_launch_config.go b/vendor/github.com/rancher/go-rancher/client/generated_launch_config.go
new file mode 100644
index 00000000..11b43558
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_launch_config.go
@@ -0,0 +1,442 @@
+package client
+
+const (
+ LAUNCH_CONFIG_TYPE = "launchConfig"
+)
+
+type LaunchConfig struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"`
+
+ AllocationState string `json:"allocationState,omitempty" yaml:"allocation_state,omitempty"`
+
+ BlkioDeviceOptions map[string]interface{} `json:"blkioDeviceOptions,omitempty" yaml:"blkio_device_options,omitempty"`
+
+ Build *DockerBuild `json:"build,omitempty" yaml:"build,omitempty"`
+
+ CapAdd []string `json:"capAdd,omitempty" yaml:"cap_add,omitempty"`
+
+ CapDrop []string `json:"capDrop,omitempty" yaml:"cap_drop,omitempty"`
+
+ Command []string `json:"command,omitempty" yaml:"command,omitempty"`
+
+ Count int64 `json:"count,omitempty" yaml:"count,omitempty"`
+
+ CpuSet string `json:"cpuSet,omitempty" yaml:"cpu_set,omitempty"`
+
+ CpuShares int64 `json:"cpuShares,omitempty" yaml:"cpu_shares,omitempty"`
+
+ CreateIndex int64 `json:"createIndex,omitempty" yaml:"create_index,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ DataVolumeMounts map[string]interface{} `json:"dataVolumeMounts,omitempty" yaml:"data_volume_mounts,omitempty"`
+
+ DataVolumes []string `json:"dataVolumes,omitempty" yaml:"data_volumes,omitempty"`
+
+ DataVolumesFrom []string `json:"dataVolumesFrom,omitempty" yaml:"data_volumes_from,omitempty"`
+
+ DataVolumesFromLaunchConfigs []string `json:"dataVolumesFromLaunchConfigs,omitempty" yaml:"data_volumes_from_launch_configs,omitempty"`
+
+ DeploymentUnitUuid string `json:"deploymentUnitUuid,omitempty" yaml:"deployment_unit_uuid,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Devices []string `json:"devices,omitempty" yaml:"devices,omitempty"`
+
+ Disks []interface{} `json:"disks,omitempty" yaml:"disks,omitempty"`
+
+ Dns []string `json:"dns,omitempty" yaml:"dns,omitempty"`
+
+ DnsSearch []string `json:"dnsSearch,omitempty" yaml:"dns_search,omitempty"`
+
+ DomainName string `json:"domainName,omitempty" yaml:"domain_name,omitempty"`
+
+ EntryPoint []string `json:"entryPoint,omitempty" yaml:"entry_point,omitempty"`
+
+ Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
+
+ Expose []string `json:"expose,omitempty" yaml:"expose,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ ExtraHosts []string `json:"extraHosts,omitempty" yaml:"extra_hosts,omitempty"`
+
+ FirstRunning string `json:"firstRunning,omitempty" yaml:"first_running,omitempty"`
+
+ HealthCheck *InstanceHealthCheck `json:"healthCheck,omitempty" yaml:"health_check,omitempty"`
+
+ HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
+
+ HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
+
+ Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
+
+ ImageUuid string `json:"imageUuid,omitempty" yaml:"image_uuid,omitempty"`
+
+ InstanceLinks map[string]interface{} `json:"instanceLinks,omitempty" yaml:"instance_links,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"`
+
+ LogConfig *LogConfig `json:"logConfig,omitempty" yaml:"log_config,omitempty"`
+
+ LxcConf map[string]interface{} `json:"lxcConf,omitempty" yaml:"lxc_conf,omitempty"`
+
+ Memory int64 `json:"memory,omitempty" yaml:"memory,omitempty"`
+
+ MemoryMb int64 `json:"memoryMb,omitempty" yaml:"memory_mb,omitempty"`
+
+ MemorySwap int64 `json:"memorySwap,omitempty" yaml:"memory_swap,omitempty"`
+
+ NativeContainer bool `json:"nativeContainer,omitempty" yaml:"native_container,omitempty"`
+
+ NetworkContainerId string `json:"networkContainerId,omitempty" yaml:"network_container_id,omitempty"`
+
+ NetworkIds []string `json:"networkIds,omitempty" yaml:"network_ids,omitempty"`
+
+ NetworkLaunchConfig string `json:"networkLaunchConfig,omitempty" yaml:"network_launch_config,omitempty"`
+
+ NetworkMode string `json:"networkMode,omitempty" yaml:"network_mode,omitempty"`
+
+ PidMode string `json:"pidMode,omitempty" yaml:"pid_mode,omitempty"`
+
+ Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"`
+
+ PrimaryIpAddress string `json:"primaryIpAddress,omitempty" yaml:"primary_ip_address,omitempty"`
+
+ Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"`
+
+ PublishAllPorts bool `json:"publishAllPorts,omitempty" yaml:"publish_all_ports,omitempty"`
+
+ ReadOnly bool `json:"readOnly,omitempty" yaml:"read_only,omitempty"`
+
+ RegistryCredentialId string `json:"registryCredentialId,omitempty" yaml:"registry_credential_id,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ RequestedHostId string `json:"requestedHostId,omitempty" yaml:"requested_host_id,omitempty"`
+
+ RequestedIpAddress string `json:"requestedIpAddress,omitempty" yaml:"requested_ip_address,omitempty"`
+
+ SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"`
+
+ StartCount int64 `json:"startCount,omitempty" yaml:"start_count,omitempty"`
+
+ StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ StdinOpen bool `json:"stdinOpen,omitempty" yaml:"stdin_open,omitempty"`
+
+ SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"`
+
+ Token string `json:"token,omitempty" yaml:"token,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Tty bool `json:"tty,omitempty" yaml:"tty,omitempty"`
+
+ User string `json:"user,omitempty" yaml:"user,omitempty"`
+
+ Userdata string `json:"userdata,omitempty" yaml:"userdata,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ Vcpu int64 `json:"vcpu,omitempty" yaml:"vcpu,omitempty"`
+
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+
+ VolumeDriver string `json:"volumeDriver,omitempty" yaml:"volume_driver,omitempty"`
+
+ WorkingDir string `json:"workingDir,omitempty" yaml:"working_dir,omitempty"`
+}
+
+type LaunchConfigCollection struct {
+ Collection
+ Data []LaunchConfig `json:"data,omitempty"`
+ client *LaunchConfigClient
+}
+
+type LaunchConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type LaunchConfigOperations interface {
+ List(opts *ListOpts) (*LaunchConfigCollection, error)
+ Create(opts *LaunchConfig) (*LaunchConfig, error)
+ Update(existing *LaunchConfig, updates interface{}) (*LaunchConfig, error)
+ ById(id string) (*LaunchConfig, error)
+ Delete(container *LaunchConfig) error
+
+ ActionAllocate(*LaunchConfig) (*Instance, error)
+
+ ActionConsole(*LaunchConfig, *InstanceConsoleInput) (*InstanceConsole, error)
+
+ ActionCreate(*LaunchConfig) (*Instance, error)
+
+ ActionDeallocate(*LaunchConfig) (*Instance, error)
+
+ ActionError(*LaunchConfig) (*Instance, error)
+
+ ActionExecute(*LaunchConfig, *ContainerExec) (*HostAccess, error)
+
+ ActionMigrate(*LaunchConfig) (*Instance, error)
+
+ ActionProxy(*LaunchConfig, *ContainerProxy) (*HostAccess, error)
+
+ ActionPurge(*LaunchConfig) (*Instance, error)
+
+ ActionRemove(*LaunchConfig) (*Instance, error)
+
+ ActionRestart(*LaunchConfig) (*Instance, error)
+
+ ActionRestore(*LaunchConfig) (*Instance, error)
+
+ ActionSetlabels(*LaunchConfig, *SetLabelsInput) (*Container, error)
+
+ ActionStart(*LaunchConfig) (*Instance, error)
+
+ ActionStop(*LaunchConfig, *InstanceStop) (*Instance, error)
+
+ ActionUpdate(*LaunchConfig) (*Instance, error)
+
+ ActionUpdatehealthy(*LaunchConfig) (*Instance, error)
+
+ ActionUpdatereinitializing(*LaunchConfig) (*Instance, error)
+
+ ActionUpdateunhealthy(*LaunchConfig) (*Instance, error)
+}
+
+func newLaunchConfigClient(rancherClient *RancherClient) *LaunchConfigClient {
+ return &LaunchConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *LaunchConfigClient) Create(container *LaunchConfig) (*LaunchConfig, error) {
+ resp := &LaunchConfig{}
+ err := c.rancherClient.doCreate(LAUNCH_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *LaunchConfigClient) Update(existing *LaunchConfig, updates interface{}) (*LaunchConfig, error) {
+ resp := &LaunchConfig{}
+ err := c.rancherClient.doUpdate(LAUNCH_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *LaunchConfigClient) List(opts *ListOpts) (*LaunchConfigCollection, error) {
+ resp := &LaunchConfigCollection{}
+ err := c.rancherClient.doList(LAUNCH_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *LaunchConfigCollection) Next() (*LaunchConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &LaunchConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *LaunchConfigClient) ById(id string) (*LaunchConfig, error) {
+ resp := &LaunchConfig{}
+ err := c.rancherClient.doById(LAUNCH_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *LaunchConfigClient) Delete(container *LaunchConfig) error {
+ return c.rancherClient.doResourceDelete(LAUNCH_CONFIG_TYPE, &container.Resource)
+}
+
+func (c *LaunchConfigClient) ActionAllocate(resource *LaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "allocate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionConsole(resource *LaunchConfig, input *InstanceConsoleInput) (*InstanceConsole, error) {
+
+ resp := &InstanceConsole{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "console", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionCreate(resource *LaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionDeallocate(resource *LaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "deallocate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionError(resource *LaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "error", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionExecute(resource *LaunchConfig, input *ContainerExec) (*HostAccess, error) {
+
+ resp := &HostAccess{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "execute", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionMigrate(resource *LaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "migrate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionProxy(resource *LaunchConfig, input *ContainerProxy) (*HostAccess, error) {
+
+ resp := &HostAccess{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "proxy", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionPurge(resource *LaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionRemove(resource *LaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionRestart(resource *LaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "restart", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionRestore(resource *LaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionSetlabels(resource *LaunchConfig, input *SetLabelsInput) (*Container, error) {
+
+ resp := &Container{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "setlabels", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionStart(resource *LaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "start", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionStop(resource *LaunchConfig, input *InstanceStop) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "stop", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionUpdate(resource *LaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionUpdatehealthy(resource *LaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "updatehealthy", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionUpdatereinitializing(resource *LaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "updatereinitializing", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LaunchConfigClient) ActionUpdateunhealthy(resource *LaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "updateunhealthy", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_ldapconfig.go b/vendor/github.com/rancher/go-rancher/client/generated_ldapconfig.go
new file mode 100644
index 00000000..fb8a1c93
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_ldapconfig.go
@@ -0,0 +1,123 @@
+package client
+
+const (
+ LDAPCONFIG_TYPE = "ldapconfig"
+)
+
+type Ldapconfig struct {
+ Resource
+
+ AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"`
+
+ AllowedIdentities []interface{} `json:"allowedIdentities,omitempty" yaml:"allowed_identities,omitempty"`
+
+ ConnectionTimeout int64 `json:"connectionTimeout,omitempty" yaml:"connection_timeout,omitempty"`
+
+ Domain string `json:"domain,omitempty" yaml:"domain,omitempty"`
+
+ Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
+
+ GroupMemberMappingAttribute string `json:"groupMemberMappingAttribute,omitempty" yaml:"group_member_mapping_attribute,omitempty"`
+
+ GroupNameField string `json:"groupNameField,omitempty" yaml:"group_name_field,omitempty"`
+
+ GroupObjectClass string `json:"groupObjectClass,omitempty" yaml:"group_object_class,omitempty"`
+
+ GroupSearchField string `json:"groupSearchField,omitempty" yaml:"group_search_field,omitempty"`
+
+ LoginDomain string `json:"loginDomain,omitempty" yaml:"login_domain,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Port int64 `json:"port,omitempty" yaml:"port,omitempty"`
+
+ Server string `json:"server,omitempty" yaml:"server,omitempty"`
+
+ ServiceAccountPassword string `json:"serviceAccountPassword,omitempty" yaml:"service_account_password,omitempty"`
+
+ ServiceAccountUsername string `json:"serviceAccountUsername,omitempty" yaml:"service_account_username,omitempty"`
+
+ Tls bool `json:"tls,omitempty" yaml:"tls,omitempty"`
+
+ UserDisabledBitMask int64 `json:"userDisabledBitMask,omitempty" yaml:"user_disabled_bit_mask,omitempty"`
+
+ UserEnabledAttribute string `json:"userEnabledAttribute,omitempty" yaml:"user_enabled_attribute,omitempty"`
+
+ UserLoginField string `json:"userLoginField,omitempty" yaml:"user_login_field,omitempty"`
+
+ UserMemberAttribute string `json:"userMemberAttribute,omitempty" yaml:"user_member_attribute,omitempty"`
+
+ UserNameField string `json:"userNameField,omitempty" yaml:"user_name_field,omitempty"`
+
+ UserObjectClass string `json:"userObjectClass,omitempty" yaml:"user_object_class,omitempty"`
+
+ UserSearchField string `json:"userSearchField,omitempty" yaml:"user_search_field,omitempty"`
+}
+
+type LdapconfigCollection struct {
+ Collection
+ Data []Ldapconfig `json:"data,omitempty"`
+ client *LdapconfigClient
+}
+
+type LdapconfigClient struct {
+ rancherClient *RancherClient
+}
+
+type LdapconfigOperations interface {
+ List(opts *ListOpts) (*LdapconfigCollection, error)
+ Create(opts *Ldapconfig) (*Ldapconfig, error)
+ Update(existing *Ldapconfig, updates interface{}) (*Ldapconfig, error)
+ ById(id string) (*Ldapconfig, error)
+ Delete(container *Ldapconfig) error
+}
+
+func newLdapconfigClient(rancherClient *RancherClient) *LdapconfigClient {
+ return &LdapconfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *LdapconfigClient) Create(container *Ldapconfig) (*Ldapconfig, error) {
+ resp := &Ldapconfig{}
+ err := c.rancherClient.doCreate(LDAPCONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *LdapconfigClient) Update(existing *Ldapconfig, updates interface{}) (*Ldapconfig, error) {
+ resp := &Ldapconfig{}
+ err := c.rancherClient.doUpdate(LDAPCONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *LdapconfigClient) List(opts *ListOpts) (*LdapconfigCollection, error) {
+ resp := &LdapconfigCollection{}
+ err := c.rancherClient.doList(LDAPCONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *LdapconfigCollection) Next() (*LdapconfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &LdapconfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *LdapconfigClient) ById(id string) (*Ldapconfig, error) {
+ resp := &Ldapconfig{}
+ err := c.rancherClient.doById(LDAPCONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *LdapconfigClient) Delete(container *Ldapconfig) error {
+ return c.rancherClient.doResourceDelete(LDAPCONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_app_cookie_stickiness_policy.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_app_cookie_stickiness_policy.go
new file mode 100644
index 00000000..9a0e7407
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_app_cookie_stickiness_policy.go
@@ -0,0 +1,91 @@
+package client
+
+const (
+ LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE = "loadBalancerAppCookieStickinessPolicy"
+)
+
+type LoadBalancerAppCookieStickinessPolicy struct {
+ Resource
+
+ Cookie string `json:"cookie,omitempty" yaml:"cookie,omitempty"`
+
+ MaxLength int64 `json:"maxLength,omitempty" yaml:"max_length,omitempty"`
+
+ Mode string `json:"mode,omitempty" yaml:"mode,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Prefix bool `json:"prefix,omitempty" yaml:"prefix,omitempty"`
+
+ RequestLearn bool `json:"requestLearn,omitempty" yaml:"request_learn,omitempty"`
+
+ Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"`
+}
+
+type LoadBalancerAppCookieStickinessPolicyCollection struct {
+ Collection
+ Data []LoadBalancerAppCookieStickinessPolicy `json:"data,omitempty"`
+ client *LoadBalancerAppCookieStickinessPolicyClient
+}
+
+type LoadBalancerAppCookieStickinessPolicyClient struct {
+ rancherClient *RancherClient
+}
+
+type LoadBalancerAppCookieStickinessPolicyOperations interface {
+ List(opts *ListOpts) (*LoadBalancerAppCookieStickinessPolicyCollection, error)
+ Create(opts *LoadBalancerAppCookieStickinessPolicy) (*LoadBalancerAppCookieStickinessPolicy, error)
+ Update(existing *LoadBalancerAppCookieStickinessPolicy, updates interface{}) (*LoadBalancerAppCookieStickinessPolicy, error)
+ ById(id string) (*LoadBalancerAppCookieStickinessPolicy, error)
+ Delete(container *LoadBalancerAppCookieStickinessPolicy) error
+}
+
+func newLoadBalancerAppCookieStickinessPolicyClient(rancherClient *RancherClient) *LoadBalancerAppCookieStickinessPolicyClient {
+ return &LoadBalancerAppCookieStickinessPolicyClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *LoadBalancerAppCookieStickinessPolicyClient) Create(container *LoadBalancerAppCookieStickinessPolicy) (*LoadBalancerAppCookieStickinessPolicy, error) {
+ resp := &LoadBalancerAppCookieStickinessPolicy{}
+ err := c.rancherClient.doCreate(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *LoadBalancerAppCookieStickinessPolicyClient) Update(existing *LoadBalancerAppCookieStickinessPolicy, updates interface{}) (*LoadBalancerAppCookieStickinessPolicy, error) {
+ resp := &LoadBalancerAppCookieStickinessPolicy{}
+ err := c.rancherClient.doUpdate(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *LoadBalancerAppCookieStickinessPolicyClient) List(opts *ListOpts) (*LoadBalancerAppCookieStickinessPolicyCollection, error) {
+ resp := &LoadBalancerAppCookieStickinessPolicyCollection{}
+ err := c.rancherClient.doList(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *LoadBalancerAppCookieStickinessPolicyCollection) Next() (*LoadBalancerAppCookieStickinessPolicyCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &LoadBalancerAppCookieStickinessPolicyCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *LoadBalancerAppCookieStickinessPolicyClient) ById(id string) (*LoadBalancerAppCookieStickinessPolicy, error) {
+ resp := &LoadBalancerAppCookieStickinessPolicy{}
+ err := c.rancherClient.doById(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *LoadBalancerAppCookieStickinessPolicyClient) Delete(container *LoadBalancerAppCookieStickinessPolicy) error {
+ return c.rancherClient.doResourceDelete(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_config.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_config.go
new file mode 100644
index 00000000..aabc4ef6
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_config.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ LOAD_BALANCER_CONFIG_TYPE = "loadBalancerConfig"
+)
+
+type LoadBalancerConfig struct {
+ Resource
+
+ HaproxyConfig *HaproxyConfig `json:"haproxyConfig,omitempty" yaml:"haproxy_config,omitempty"`
+
+ LbCookieStickinessPolicy *LoadBalancerCookieStickinessPolicy `json:"lbCookieStickinessPolicy,omitempty" yaml:"lb_cookie_stickiness_policy,omitempty"`
+}
+
+type LoadBalancerConfigCollection struct {
+ Collection
+ Data []LoadBalancerConfig `json:"data,omitempty"`
+ client *LoadBalancerConfigClient
+}
+
+type LoadBalancerConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type LoadBalancerConfigOperations interface {
+ List(opts *ListOpts) (*LoadBalancerConfigCollection, error)
+ Create(opts *LoadBalancerConfig) (*LoadBalancerConfig, error)
+ Update(existing *LoadBalancerConfig, updates interface{}) (*LoadBalancerConfig, error)
+ ById(id string) (*LoadBalancerConfig, error)
+ Delete(container *LoadBalancerConfig) error
+}
+
+func newLoadBalancerConfigClient(rancherClient *RancherClient) *LoadBalancerConfigClient {
+ return &LoadBalancerConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *LoadBalancerConfigClient) Create(container *LoadBalancerConfig) (*LoadBalancerConfig, error) {
+ resp := &LoadBalancerConfig{}
+ err := c.rancherClient.doCreate(LOAD_BALANCER_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *LoadBalancerConfigClient) Update(existing *LoadBalancerConfig, updates interface{}) (*LoadBalancerConfig, error) {
+ resp := &LoadBalancerConfig{}
+ err := c.rancherClient.doUpdate(LOAD_BALANCER_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *LoadBalancerConfigClient) List(opts *ListOpts) (*LoadBalancerConfigCollection, error) {
+ resp := &LoadBalancerConfigCollection{}
+ err := c.rancherClient.doList(LOAD_BALANCER_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *LoadBalancerConfigCollection) Next() (*LoadBalancerConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &LoadBalancerConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *LoadBalancerConfigClient) ById(id string) (*LoadBalancerConfig, error) {
+ resp := &LoadBalancerConfig{}
+ err := c.rancherClient.doById(LOAD_BALANCER_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *LoadBalancerConfigClient) Delete(container *LoadBalancerConfig) error {
+ return c.rancherClient.doResourceDelete(LOAD_BALANCER_CONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_cookie_stickiness_policy.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_cookie_stickiness_policy.go
new file mode 100644
index 00000000..4a8d6989
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_cookie_stickiness_policy.go
@@ -0,0 +1,91 @@
+package client
+
+const (
+ LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE = "loadBalancerCookieStickinessPolicy"
+)
+
+type LoadBalancerCookieStickinessPolicy struct {
+ Resource
+
+ Cookie string `json:"cookie,omitempty" yaml:"cookie,omitempty"`
+
+ Domain string `json:"domain,omitempty" yaml:"domain,omitempty"`
+
+ Indirect bool `json:"indirect,omitempty" yaml:"indirect,omitempty"`
+
+ Mode string `json:"mode,omitempty" yaml:"mode,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Nocache bool `json:"nocache,omitempty" yaml:"nocache,omitempty"`
+
+ Postonly bool `json:"postonly,omitempty" yaml:"postonly,omitempty"`
+}
+
+type LoadBalancerCookieStickinessPolicyCollection struct {
+ Collection
+ Data []LoadBalancerCookieStickinessPolicy `json:"data,omitempty"`
+ client *LoadBalancerCookieStickinessPolicyClient
+}
+
+type LoadBalancerCookieStickinessPolicyClient struct {
+ rancherClient *RancherClient
+}
+
+type LoadBalancerCookieStickinessPolicyOperations interface {
+ List(opts *ListOpts) (*LoadBalancerCookieStickinessPolicyCollection, error)
+ Create(opts *LoadBalancerCookieStickinessPolicy) (*LoadBalancerCookieStickinessPolicy, error)
+ Update(existing *LoadBalancerCookieStickinessPolicy, updates interface{}) (*LoadBalancerCookieStickinessPolicy, error)
+ ById(id string) (*LoadBalancerCookieStickinessPolicy, error)
+ Delete(container *LoadBalancerCookieStickinessPolicy) error
+}
+
+func newLoadBalancerCookieStickinessPolicyClient(rancherClient *RancherClient) *LoadBalancerCookieStickinessPolicyClient {
+ return &LoadBalancerCookieStickinessPolicyClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *LoadBalancerCookieStickinessPolicyClient) Create(container *LoadBalancerCookieStickinessPolicy) (*LoadBalancerCookieStickinessPolicy, error) {
+ resp := &LoadBalancerCookieStickinessPolicy{}
+ err := c.rancherClient.doCreate(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *LoadBalancerCookieStickinessPolicyClient) Update(existing *LoadBalancerCookieStickinessPolicy, updates interface{}) (*LoadBalancerCookieStickinessPolicy, error) {
+ resp := &LoadBalancerCookieStickinessPolicy{}
+ err := c.rancherClient.doUpdate(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *LoadBalancerCookieStickinessPolicyClient) List(opts *ListOpts) (*LoadBalancerCookieStickinessPolicyCollection, error) {
+ resp := &LoadBalancerCookieStickinessPolicyCollection{}
+ err := c.rancherClient.doList(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *LoadBalancerCookieStickinessPolicyCollection) Next() (*LoadBalancerCookieStickinessPolicyCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &LoadBalancerCookieStickinessPolicyCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *LoadBalancerCookieStickinessPolicyClient) ById(id string) (*LoadBalancerCookieStickinessPolicy, error) {
+ resp := &LoadBalancerCookieStickinessPolicy{}
+ err := c.rancherClient.doById(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *LoadBalancerCookieStickinessPolicyClient) Delete(container *LoadBalancerCookieStickinessPolicy) error {
+ return c.rancherClient.doResourceDelete(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service.go
new file mode 100644
index 00000000..5aec4957
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service.go
@@ -0,0 +1,295 @@
+package client
+
+const (
+ LOAD_BALANCER_SERVICE_TYPE = "loadBalancerService"
+)
+
+type LoadBalancerService struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ AssignServiceIpAddress bool `json:"assignServiceIpAddress,omitempty" yaml:"assign_service_ip_address,omitempty"`
+
+ CertificateIds []string `json:"certificateIds,omitempty" yaml:"certificate_ids,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ CurrentScale int64 `json:"currentScale,omitempty" yaml:"current_scale,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ DefaultCertificateId string `json:"defaultCertificateId,omitempty" yaml:"default_certificate_id,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"`
+
+ HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"`
+
+ LoadBalancerConfig *LoadBalancerConfig `json:"loadBalancerConfig,omitempty" yaml:"load_balancer_config,omitempty"`
+
+ Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ RetainIp bool `json:"retainIp,omitempty" yaml:"retain_ip,omitempty"`
+
+ Scale int64 `json:"scale,omitempty" yaml:"scale,omitempty"`
+
+ ScalePolicy *ScalePolicy `json:"scalePolicy,omitempty" yaml:"scale_policy,omitempty"`
+
+ SelectorLink string `json:"selectorLink,omitempty" yaml:"selector_link,omitempty"`
+
+ StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Upgrade *ServiceUpgrade `json:"upgrade,omitempty" yaml:"upgrade,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ Vip string `json:"vip,omitempty" yaml:"vip,omitempty"`
+}
+
+type LoadBalancerServiceCollection struct {
+ Collection
+ Data []LoadBalancerService `json:"data,omitempty"`
+ client *LoadBalancerServiceClient
+}
+
+type LoadBalancerServiceClient struct {
+ rancherClient *RancherClient
+}
+
+type LoadBalancerServiceOperations interface {
+ List(opts *ListOpts) (*LoadBalancerServiceCollection, error)
+ Create(opts *LoadBalancerService) (*LoadBalancerService, error)
+ Update(existing *LoadBalancerService, updates interface{}) (*LoadBalancerService, error)
+ ById(id string) (*LoadBalancerService, error)
+ Delete(container *LoadBalancerService) error
+
+ ActionActivate(*LoadBalancerService) (*Service, error)
+
+ ActionAddservicelink(*LoadBalancerService, *AddRemoveLoadBalancerServiceLinkInput) (*Service, error)
+
+ ActionCancelrollback(*LoadBalancerService) (*Service, error)
+
+ ActionCancelupgrade(*LoadBalancerService) (*Service, error)
+
+ ActionCreate(*LoadBalancerService) (*Service, error)
+
+ ActionDeactivate(*LoadBalancerService) (*Service, error)
+
+ ActionFinishupgrade(*LoadBalancerService) (*Service, error)
+
+ ActionRemove(*LoadBalancerService) (*Service, error)
+
+ ActionRemoveservicelink(*LoadBalancerService, *AddRemoveLoadBalancerServiceLinkInput) (*Service, error)
+
+ ActionRestart(*LoadBalancerService, *ServiceRestart) (*Service, error)
+
+ ActionRollback(*LoadBalancerService) (*Service, error)
+
+ ActionSetservicelinks(*LoadBalancerService, *SetLoadBalancerServiceLinksInput) (*Service, error)
+
+ ActionUpdate(*LoadBalancerService) (*Service, error)
+
+ ActionUpgrade(*LoadBalancerService, *ServiceUpgrade) (*Service, error)
+}
+
+func newLoadBalancerServiceClient(rancherClient *RancherClient) *LoadBalancerServiceClient {
+ return &LoadBalancerServiceClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *LoadBalancerServiceClient) Create(container *LoadBalancerService) (*LoadBalancerService, error) {
+ resp := &LoadBalancerService{}
+ err := c.rancherClient.doCreate(LOAD_BALANCER_SERVICE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) Update(existing *LoadBalancerService, updates interface{}) (*LoadBalancerService, error) {
+ resp := &LoadBalancerService{}
+ err := c.rancherClient.doUpdate(LOAD_BALANCER_SERVICE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) List(opts *ListOpts) (*LoadBalancerServiceCollection, error) {
+ resp := &LoadBalancerServiceCollection{}
+ err := c.rancherClient.doList(LOAD_BALANCER_SERVICE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *LoadBalancerServiceCollection) Next() (*LoadBalancerServiceCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &LoadBalancerServiceCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *LoadBalancerServiceClient) ById(id string) (*LoadBalancerService, error) {
+ resp := &LoadBalancerService{}
+ err := c.rancherClient.doById(LOAD_BALANCER_SERVICE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) Delete(container *LoadBalancerService) error {
+ return c.rancherClient.doResourceDelete(LOAD_BALANCER_SERVICE_TYPE, &container.Resource)
+}
+
+func (c *LoadBalancerServiceClient) ActionActivate(resource *LoadBalancerService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) ActionAddservicelink(resource *LoadBalancerService, input *AddRemoveLoadBalancerServiceLinkInput) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "addservicelink", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) ActionCancelrollback(resource *LoadBalancerService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) ActionCancelupgrade(resource *LoadBalancerService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) ActionCreate(resource *LoadBalancerService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) ActionDeactivate(resource *LoadBalancerService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) ActionFinishupgrade(resource *LoadBalancerService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) ActionRemove(resource *LoadBalancerService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) ActionRemoveservicelink(resource *LoadBalancerService, input *AddRemoveLoadBalancerServiceLinkInput) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "removeservicelink", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) ActionRestart(resource *LoadBalancerService, input *ServiceRestart) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "restart", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) ActionRollback(resource *LoadBalancerService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) ActionSetservicelinks(resource *LoadBalancerService, input *SetLoadBalancerServiceLinksInput) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "setservicelinks", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) ActionUpdate(resource *LoadBalancerService) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *LoadBalancerServiceClient) ActionUpgrade(resource *LoadBalancerService, input *ServiceUpgrade) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "upgrade", &resource.Resource, input, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service_link.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service_link.go
new file mode 100644
index 00000000..87b74c3d
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service_link.go
@@ -0,0 +1,83 @@
+package client
+
+const (
+ LOAD_BALANCER_SERVICE_LINK_TYPE = "loadBalancerServiceLink"
+)
+
+type LoadBalancerServiceLink struct {
+ Resource
+
+ Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"`
+
+ ServiceId string `json:"serviceId,omitempty" yaml:"service_id,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type LoadBalancerServiceLinkCollection struct {
+ Collection
+ Data []LoadBalancerServiceLink `json:"data,omitempty"`
+ client *LoadBalancerServiceLinkClient
+}
+
+type LoadBalancerServiceLinkClient struct {
+ rancherClient *RancherClient
+}
+
+type LoadBalancerServiceLinkOperations interface {
+ List(opts *ListOpts) (*LoadBalancerServiceLinkCollection, error)
+ Create(opts *LoadBalancerServiceLink) (*LoadBalancerServiceLink, error)
+ Update(existing *LoadBalancerServiceLink, updates interface{}) (*LoadBalancerServiceLink, error)
+ ById(id string) (*LoadBalancerServiceLink, error)
+ Delete(container *LoadBalancerServiceLink) error
+}
+
+func newLoadBalancerServiceLinkClient(rancherClient *RancherClient) *LoadBalancerServiceLinkClient {
+ return &LoadBalancerServiceLinkClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *LoadBalancerServiceLinkClient) Create(container *LoadBalancerServiceLink) (*LoadBalancerServiceLink, error) {
+ resp := &LoadBalancerServiceLink{}
+ err := c.rancherClient.doCreate(LOAD_BALANCER_SERVICE_LINK_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *LoadBalancerServiceLinkClient) Update(existing *LoadBalancerServiceLink, updates interface{}) (*LoadBalancerServiceLink, error) {
+ resp := &LoadBalancerServiceLink{}
+ err := c.rancherClient.doUpdate(LOAD_BALANCER_SERVICE_LINK_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *LoadBalancerServiceLinkClient) List(opts *ListOpts) (*LoadBalancerServiceLinkCollection, error) {
+ resp := &LoadBalancerServiceLinkCollection{}
+ err := c.rancherClient.doList(LOAD_BALANCER_SERVICE_LINK_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *LoadBalancerServiceLinkCollection) Next() (*LoadBalancerServiceLinkCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &LoadBalancerServiceLinkCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *LoadBalancerServiceLinkClient) ById(id string) (*LoadBalancerServiceLink, error) {
+ resp := &LoadBalancerServiceLink{}
+ err := c.rancherClient.doById(LOAD_BALANCER_SERVICE_LINK_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *LoadBalancerServiceLinkClient) Delete(container *LoadBalancerServiceLink) error {
+ return c.rancherClient.doResourceDelete(LOAD_BALANCER_SERVICE_LINK_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_local_auth_config.go b/vendor/github.com/rancher/go-rancher/client/generated_local_auth_config.go
new file mode 100644
index 00000000..664f137c
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_local_auth_config.go
@@ -0,0 +1,87 @@
+package client
+
+const (
+ LOCAL_AUTH_CONFIG_TYPE = "localAuthConfig"
+)
+
+type LocalAuthConfig struct {
+ Resource
+
+ AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"`
+
+ Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Password string `json:"password,omitempty" yaml:"password,omitempty"`
+
+ Username string `json:"username,omitempty" yaml:"username,omitempty"`
+}
+
+type LocalAuthConfigCollection struct {
+ Collection
+ Data []LocalAuthConfig `json:"data,omitempty"`
+ client *LocalAuthConfigClient
+}
+
+type LocalAuthConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type LocalAuthConfigOperations interface {
+ List(opts *ListOpts) (*LocalAuthConfigCollection, error)
+ Create(opts *LocalAuthConfig) (*LocalAuthConfig, error)
+ Update(existing *LocalAuthConfig, updates interface{}) (*LocalAuthConfig, error)
+ ById(id string) (*LocalAuthConfig, error)
+ Delete(container *LocalAuthConfig) error
+}
+
+func newLocalAuthConfigClient(rancherClient *RancherClient) *LocalAuthConfigClient {
+ return &LocalAuthConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *LocalAuthConfigClient) Create(container *LocalAuthConfig) (*LocalAuthConfig, error) {
+ resp := &LocalAuthConfig{}
+ err := c.rancherClient.doCreate(LOCAL_AUTH_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *LocalAuthConfigClient) Update(existing *LocalAuthConfig, updates interface{}) (*LocalAuthConfig, error) {
+ resp := &LocalAuthConfig{}
+ err := c.rancherClient.doUpdate(LOCAL_AUTH_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *LocalAuthConfigClient) List(opts *ListOpts) (*LocalAuthConfigCollection, error) {
+ resp := &LocalAuthConfigCollection{}
+ err := c.rancherClient.doList(LOCAL_AUTH_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *LocalAuthConfigCollection) Next() (*LocalAuthConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &LocalAuthConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *LocalAuthConfigClient) ById(id string) (*LocalAuthConfig, error) {
+ resp := &LocalAuthConfig{}
+ err := c.rancherClient.doById(LOCAL_AUTH_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *LocalAuthConfigClient) Delete(container *LocalAuthConfig) error {
+ return c.rancherClient.doResourceDelete(LOCAL_AUTH_CONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_log_config.go b/vendor/github.com/rancher/go-rancher/client/generated_log_config.go
new file mode 100644
index 00000000..3f799aac
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_log_config.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ LOG_CONFIG_TYPE = "logConfig"
+)
+
+type LogConfig struct {
+ Resource
+
+ Config map[string]interface{} `json:"config,omitempty" yaml:"config,omitempty"`
+
+ Driver string `json:"driver,omitempty" yaml:"driver,omitempty"`
+}
+
+type LogConfigCollection struct {
+ Collection
+ Data []LogConfig `json:"data,omitempty"`
+ client *LogConfigClient
+}
+
+type LogConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type LogConfigOperations interface {
+ List(opts *ListOpts) (*LogConfigCollection, error)
+ Create(opts *LogConfig) (*LogConfig, error)
+ Update(existing *LogConfig, updates interface{}) (*LogConfig, error)
+ ById(id string) (*LogConfig, error)
+ Delete(container *LogConfig) error
+}
+
+func newLogConfigClient(rancherClient *RancherClient) *LogConfigClient {
+ return &LogConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *LogConfigClient) Create(container *LogConfig) (*LogConfig, error) {
+ resp := &LogConfig{}
+ err := c.rancherClient.doCreate(LOG_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *LogConfigClient) Update(existing *LogConfig, updates interface{}) (*LogConfig, error) {
+ resp := &LogConfig{}
+ err := c.rancherClient.doUpdate(LOG_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *LogConfigClient) List(opts *ListOpts) (*LogConfigCollection, error) {
+ resp := &LogConfigCollection{}
+ err := c.rancherClient.doList(LOG_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *LogConfigCollection) Next() (*LogConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &LogConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *LogConfigClient) ById(id string) (*LogConfig, error) {
+ resp := &LogConfig{}
+ err := c.rancherClient.doById(LOG_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *LogConfigClient) Delete(container *LogConfig) error {
+ return c.rancherClient.doResourceDelete(LOG_CONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_machine.go b/vendor/github.com/rancher/go-rancher/client/generated_machine.go
new file mode 100644
index 00000000..be7be96b
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_machine.go
@@ -0,0 +1,194 @@
+package client
+
+const (
+ MACHINE_TYPE = "machine"
+)
+
+type Machine struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Amazonec2Config *Amazonec2Config `json:"amazonec2Config,omitempty" yaml:"amazonec2config,omitempty"`
+
+ AuthCertificateAuthority string `json:"authCertificateAuthority,omitempty" yaml:"auth_certificate_authority,omitempty"`
+
+ AuthKey string `json:"authKey,omitempty" yaml:"auth_key,omitempty"`
+
+ AzureConfig *AzureConfig `json:"azureConfig,omitempty" yaml:"azure_config,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ DigitaloceanConfig *DigitaloceanConfig `json:"digitaloceanConfig,omitempty" yaml:"digitalocean_config,omitempty"`
+
+ DockerVersion string `json:"dockerVersion,omitempty" yaml:"docker_version,omitempty"`
+
+ Driver string `json:"driver,omitempty" yaml:"driver,omitempty"`
+
+ EngineEnv map[string]interface{} `json:"engineEnv,omitempty" yaml:"engine_env,omitempty"`
+
+ EngineInsecureRegistry []string `json:"engineInsecureRegistry,omitempty" yaml:"engine_insecure_registry,omitempty"`
+
+ EngineInstallUrl string `json:"engineInstallUrl,omitempty" yaml:"engine_install_url,omitempty"`
+
+ EngineLabel map[string]interface{} `json:"engineLabel,omitempty" yaml:"engine_label,omitempty"`
+
+ EngineOpt map[string]interface{} `json:"engineOpt,omitempty" yaml:"engine_opt,omitempty"`
+
+ EngineRegistryMirror []string `json:"engineRegistryMirror,omitempty" yaml:"engine_registry_mirror,omitempty"`
+
+ EngineStorageDriver string `json:"engineStorageDriver,omitempty" yaml:"engine_storage_driver,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ ExtractedConfig string `json:"extractedConfig,omitempty" yaml:"extracted_config,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ PacketConfig *PacketConfig `json:"packetConfig,omitempty" yaml:"packet_config,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type MachineCollection struct {
+ Collection
+ Data []Machine `json:"data,omitempty"`
+ client *MachineClient
+}
+
+type MachineClient struct {
+ rancherClient *RancherClient
+}
+
+type MachineOperations interface {
+ List(opts *ListOpts) (*MachineCollection, error)
+ Create(opts *Machine) (*Machine, error)
+ Update(existing *Machine, updates interface{}) (*Machine, error)
+ ById(id string) (*Machine, error)
+ Delete(container *Machine) error
+
+ ActionBootstrap(*Machine) (*PhysicalHost, error)
+
+ ActionCreate(*Machine) (*PhysicalHost, error)
+
+ ActionError(*Machine) (*PhysicalHost, error)
+
+ ActionRemove(*Machine) (*PhysicalHost, error)
+
+ ActionUpdate(*Machine) (*PhysicalHost, error)
+}
+
+func newMachineClient(rancherClient *RancherClient) *MachineClient {
+ return &MachineClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *MachineClient) Create(container *Machine) (*Machine, error) {
+ resp := &Machine{}
+ err := c.rancherClient.doCreate(MACHINE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *MachineClient) Update(existing *Machine, updates interface{}) (*Machine, error) {
+ resp := &Machine{}
+ err := c.rancherClient.doUpdate(MACHINE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *MachineClient) List(opts *ListOpts) (*MachineCollection, error) {
+ resp := &MachineCollection{}
+ err := c.rancherClient.doList(MACHINE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *MachineCollection) Next() (*MachineCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &MachineCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *MachineClient) ById(id string) (*Machine, error) {
+ resp := &Machine{}
+ err := c.rancherClient.doById(MACHINE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *MachineClient) Delete(container *Machine) error {
+ return c.rancherClient.doResourceDelete(MACHINE_TYPE, &container.Resource)
+}
+
+func (c *MachineClient) ActionBootstrap(resource *Machine) (*PhysicalHost, error) {
+
+ resp := &PhysicalHost{}
+
+ err := c.rancherClient.doAction(MACHINE_TYPE, "bootstrap", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *MachineClient) ActionCreate(resource *Machine) (*PhysicalHost, error) {
+
+ resp := &PhysicalHost{}
+
+ err := c.rancherClient.doAction(MACHINE_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *MachineClient) ActionError(resource *Machine) (*PhysicalHost, error) {
+
+ resp := &PhysicalHost{}
+
+ err := c.rancherClient.doAction(MACHINE_TYPE, "error", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *MachineClient) ActionRemove(resource *Machine) (*PhysicalHost, error) {
+
+ resp := &PhysicalHost{}
+
+ err := c.rancherClient.doAction(MACHINE_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *MachineClient) ActionUpdate(resource *Machine) (*PhysicalHost, error) {
+
+ resp := &PhysicalHost{}
+
+ err := c.rancherClient.doAction(MACHINE_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_machine_driver.go b/vendor/github.com/rancher/go-rancher/client/generated_machine_driver.go
new file mode 100644
index 00000000..d7bb94b2
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_machine_driver.go
@@ -0,0 +1,181 @@
+package client
+
+const (
+ MACHINE_DRIVER_TYPE = "machineDriver"
+)
+
+type MachineDriver struct {
+ Resource
+
+ ActivateOnCreate bool `json:"activateOnCreate,omitempty" yaml:"activate_on_create,omitempty"`
+
+ Builtin bool `json:"builtin,omitempty" yaml:"builtin,omitempty"`
+
+ Checksum string `json:"checksum,omitempty" yaml:"checksum,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ DefaultActive bool `json:"defaultActive,omitempty" yaml:"default_active,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ UiUrl string `json:"uiUrl,omitempty" yaml:"ui_url,omitempty"`
+
+ Url string `json:"url,omitempty" yaml:"url,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type MachineDriverCollection struct {
+ Collection
+ Data []MachineDriver `json:"data,omitempty"`
+ client *MachineDriverClient
+}
+
+type MachineDriverClient struct {
+ rancherClient *RancherClient
+}
+
+type MachineDriverOperations interface {
+ List(opts *ListOpts) (*MachineDriverCollection, error)
+ Create(opts *MachineDriver) (*MachineDriver, error)
+ Update(existing *MachineDriver, updates interface{}) (*MachineDriver, error)
+ ById(id string) (*MachineDriver, error)
+ Delete(container *MachineDriver) error
+
+ ActionActivate(*MachineDriver) (*MachineDriver, error)
+
+ ActionDeactivate(*MachineDriver) (*MachineDriver, error)
+
+ ActionError(*MachineDriver) (*MachineDriver, error)
+
+ ActionReactivate(*MachineDriver) (*MachineDriver, error)
+
+ ActionRemove(*MachineDriver) (*MachineDriver, error)
+
+ ActionUpdate(*MachineDriver) (*MachineDriver, error)
+}
+
+func newMachineDriverClient(rancherClient *RancherClient) *MachineDriverClient {
+ return &MachineDriverClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *MachineDriverClient) Create(container *MachineDriver) (*MachineDriver, error) {
+ resp := &MachineDriver{}
+ err := c.rancherClient.doCreate(MACHINE_DRIVER_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *MachineDriverClient) Update(existing *MachineDriver, updates interface{}) (*MachineDriver, error) {
+ resp := &MachineDriver{}
+ err := c.rancherClient.doUpdate(MACHINE_DRIVER_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *MachineDriverClient) List(opts *ListOpts) (*MachineDriverCollection, error) {
+ resp := &MachineDriverCollection{}
+ err := c.rancherClient.doList(MACHINE_DRIVER_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *MachineDriverCollection) Next() (*MachineDriverCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &MachineDriverCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *MachineDriverClient) ById(id string) (*MachineDriver, error) {
+ resp := &MachineDriver{}
+ err := c.rancherClient.doById(MACHINE_DRIVER_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *MachineDriverClient) Delete(container *MachineDriver) error {
+ return c.rancherClient.doResourceDelete(MACHINE_DRIVER_TYPE, &container.Resource)
+}
+
+func (c *MachineDriverClient) ActionActivate(resource *MachineDriver) (*MachineDriver, error) {
+
+ resp := &MachineDriver{}
+
+ err := c.rancherClient.doAction(MACHINE_DRIVER_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *MachineDriverClient) ActionDeactivate(resource *MachineDriver) (*MachineDriver, error) {
+
+ resp := &MachineDriver{}
+
+ err := c.rancherClient.doAction(MACHINE_DRIVER_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *MachineDriverClient) ActionError(resource *MachineDriver) (*MachineDriver, error) {
+
+ resp := &MachineDriver{}
+
+ err := c.rancherClient.doAction(MACHINE_DRIVER_TYPE, "error", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *MachineDriverClient) ActionReactivate(resource *MachineDriver) (*MachineDriver, error) {
+
+ resp := &MachineDriver{}
+
+ err := c.rancherClient.doAction(MACHINE_DRIVER_TYPE, "reactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *MachineDriverClient) ActionRemove(resource *MachineDriver) (*MachineDriver, error) {
+
+ resp := &MachineDriver{}
+
+ err := c.rancherClient.doAction(MACHINE_DRIVER_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *MachineDriverClient) ActionUpdate(resource *MachineDriver) (*MachineDriver, error) {
+
+ resp := &MachineDriver{}
+
+ err := c.rancherClient.doAction(MACHINE_DRIVER_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_mount.go b/vendor/github.com/rancher/go-rancher/client/generated_mount.go
new file mode 100644
index 00000000..efa68a50
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_mount.go
@@ -0,0 +1,144 @@
+package client
+
+const (
+ MOUNT_TYPE = "mount"
+)
+
+type Mount struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Path string `json:"path,omitempty" yaml:"path,omitempty"`
+
+ Permissions string `json:"permissions,omitempty" yaml:"permissions,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ VolumeId string `json:"volumeId,omitempty" yaml:"volume_id,omitempty"`
+}
+
+type MountCollection struct {
+ Collection
+ Data []Mount `json:"data,omitempty"`
+ client *MountClient
+}
+
+type MountClient struct {
+ rancherClient *RancherClient
+}
+
+type MountOperations interface {
+ List(opts *ListOpts) (*MountCollection, error)
+ Create(opts *Mount) (*Mount, error)
+ Update(existing *Mount, updates interface{}) (*Mount, error)
+ ById(id string) (*Mount, error)
+ Delete(container *Mount) error
+
+ ActionCreate(*Mount) (*Mount, error)
+
+ ActionDeactivate(*Mount) (*Mount, error)
+
+ ActionRemove(*Mount) (*Mount, error)
+}
+
+func newMountClient(rancherClient *RancherClient) *MountClient {
+ return &MountClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *MountClient) Create(container *Mount) (*Mount, error) {
+ resp := &Mount{}
+ err := c.rancherClient.doCreate(MOUNT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *MountClient) Update(existing *Mount, updates interface{}) (*Mount, error) {
+ resp := &Mount{}
+ err := c.rancherClient.doUpdate(MOUNT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *MountClient) List(opts *ListOpts) (*MountCollection, error) {
+ resp := &MountCollection{}
+ err := c.rancherClient.doList(MOUNT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *MountCollection) Next() (*MountCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &MountCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *MountClient) ById(id string) (*Mount, error) {
+ resp := &Mount{}
+ err := c.rancherClient.doById(MOUNT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *MountClient) Delete(container *Mount) error {
+ return c.rancherClient.doResourceDelete(MOUNT_TYPE, &container.Resource)
+}
+
+func (c *MountClient) ActionCreate(resource *Mount) (*Mount, error) {
+
+ resp := &Mount{}
+
+ err := c.rancherClient.doAction(MOUNT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *MountClient) ActionDeactivate(resource *Mount) (*Mount, error) {
+
+ resp := &Mount{}
+
+ err := c.rancherClient.doAction(MOUNT_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *MountClient) ActionRemove(resource *Mount) (*Mount, error) {
+
+ resp := &Mount{}
+
+ err := c.rancherClient.doAction(MOUNT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_network.go b/vendor/github.com/rancher/go-rancher/client/generated_network.go
new file mode 100644
index 00000000..3147d9f4
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_network.go
@@ -0,0 +1,180 @@
+package client
+
+const (
+ NETWORK_TYPE = "network"
+)
+
+type Network struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type NetworkCollection struct {
+ Collection
+ Data []Network `json:"data,omitempty"`
+ client *NetworkClient
+}
+
+type NetworkClient struct {
+ rancherClient *RancherClient
+}
+
+type NetworkOperations interface {
+ List(opts *ListOpts) (*NetworkCollection, error)
+ Create(opts *Network) (*Network, error)
+ Update(existing *Network, updates interface{}) (*Network, error)
+ ById(id string) (*Network, error)
+ Delete(container *Network) error
+
+ ActionActivate(*Network) (*Network, error)
+
+ ActionCreate(*Network) (*Network, error)
+
+ ActionDeactivate(*Network) (*Network, error)
+
+ ActionPurge(*Network) (*Network, error)
+
+ ActionRemove(*Network) (*Network, error)
+
+ ActionRestore(*Network) (*Network, error)
+
+ ActionUpdate(*Network) (*Network, error)
+}
+
+func newNetworkClient(rancherClient *RancherClient) *NetworkClient {
+ return &NetworkClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *NetworkClient) Create(container *Network) (*Network, error) {
+ resp := &Network{}
+ err := c.rancherClient.doCreate(NETWORK_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *NetworkClient) Update(existing *Network, updates interface{}) (*Network, error) {
+ resp := &Network{}
+ err := c.rancherClient.doUpdate(NETWORK_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *NetworkClient) List(opts *ListOpts) (*NetworkCollection, error) {
+ resp := &NetworkCollection{}
+ err := c.rancherClient.doList(NETWORK_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *NetworkCollection) Next() (*NetworkCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &NetworkCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *NetworkClient) ById(id string) (*Network, error) {
+ resp := &Network{}
+ err := c.rancherClient.doById(NETWORK_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *NetworkClient) Delete(container *Network) error {
+ return c.rancherClient.doResourceDelete(NETWORK_TYPE, &container.Resource)
+}
+
+func (c *NetworkClient) ActionActivate(resource *Network) (*Network, error) {
+
+ resp := &Network{}
+
+ err := c.rancherClient.doAction(NETWORK_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *NetworkClient) ActionCreate(resource *Network) (*Network, error) {
+
+ resp := &Network{}
+
+ err := c.rancherClient.doAction(NETWORK_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *NetworkClient) ActionDeactivate(resource *Network) (*Network, error) {
+
+ resp := &Network{}
+
+ err := c.rancherClient.doAction(NETWORK_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *NetworkClient) ActionPurge(resource *Network) (*Network, error) {
+
+ resp := &Network{}
+
+ err := c.rancherClient.doAction(NETWORK_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *NetworkClient) ActionRemove(resource *Network) (*Network, error) {
+
+ resp := &Network{}
+
+ err := c.rancherClient.doAction(NETWORK_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *NetworkClient) ActionRestore(resource *Network) (*Network, error) {
+
+ resp := &Network{}
+
+ err := c.rancherClient.doAction(NETWORK_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *NetworkClient) ActionUpdate(resource *Network) (*Network, error) {
+
+ resp := &Network{}
+
+ err := c.rancherClient.doAction(NETWORK_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_nfs_config.go b/vendor/github.com/rancher/go-rancher/client/generated_nfs_config.go
new file mode 100644
index 00000000..1c0143fb
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_nfs_config.go
@@ -0,0 +1,83 @@
+package client
+
+const (
+ NFS_CONFIG_TYPE = "nfsConfig"
+)
+
+type NfsConfig struct {
+ Resource
+
+ MountOptions string `json:"mountOptions,omitempty" yaml:"mount_options,omitempty"`
+
+ Server string `json:"server,omitempty" yaml:"server,omitempty"`
+
+ Share string `json:"share,omitempty" yaml:"share,omitempty"`
+}
+
+type NfsConfigCollection struct {
+ Collection
+ Data []NfsConfig `json:"data,omitempty"`
+ client *NfsConfigClient
+}
+
+type NfsConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type NfsConfigOperations interface {
+ List(opts *ListOpts) (*NfsConfigCollection, error)
+ Create(opts *NfsConfig) (*NfsConfig, error)
+ Update(existing *NfsConfig, updates interface{}) (*NfsConfig, error)
+ ById(id string) (*NfsConfig, error)
+ Delete(container *NfsConfig) error
+}
+
+func newNfsConfigClient(rancherClient *RancherClient) *NfsConfigClient {
+ return &NfsConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *NfsConfigClient) Create(container *NfsConfig) (*NfsConfig, error) {
+ resp := &NfsConfig{}
+ err := c.rancherClient.doCreate(NFS_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *NfsConfigClient) Update(existing *NfsConfig, updates interface{}) (*NfsConfig, error) {
+ resp := &NfsConfig{}
+ err := c.rancherClient.doUpdate(NFS_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *NfsConfigClient) List(opts *ListOpts) (*NfsConfigCollection, error) {
+ resp := &NfsConfigCollection{}
+ err := c.rancherClient.doList(NFS_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *NfsConfigCollection) Next() (*NfsConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &NfsConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *NfsConfigClient) ById(id string) (*NfsConfig, error) {
+ resp := &NfsConfig{}
+ err := c.rancherClient.doById(NFS_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *NfsConfigClient) Delete(container *NfsConfig) error {
+ return c.rancherClient.doResourceDelete(NFS_CONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_openldapconfig.go b/vendor/github.com/rancher/go-rancher/client/generated_openldapconfig.go
new file mode 100644
index 00000000..0f69016f
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_openldapconfig.go
@@ -0,0 +1,121 @@
+package client
+
+const (
+ OPENLDAPCONFIG_TYPE = "openldapconfig"
+)
+
+type Openldapconfig struct {
+ Resource
+
+ AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"`
+
+ ConnectionTimeout int64 `json:"connectionTimeout,omitempty" yaml:"connection_timeout,omitempty"`
+
+ Domain string `json:"domain,omitempty" yaml:"domain,omitempty"`
+
+ Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
+
+ GroupMemberMappingAttribute string `json:"groupMemberMappingAttribute,omitempty" yaml:"group_member_mapping_attribute,omitempty"`
+
+ GroupNameField string `json:"groupNameField,omitempty" yaml:"group_name_field,omitempty"`
+
+ GroupObjectClass string `json:"groupObjectClass,omitempty" yaml:"group_object_class,omitempty"`
+
+ GroupSearchField string `json:"groupSearchField,omitempty" yaml:"group_search_field,omitempty"`
+
+ LoginDomain string `json:"loginDomain,omitempty" yaml:"login_domain,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Port int64 `json:"port,omitempty" yaml:"port,omitempty"`
+
+ Server string `json:"server,omitempty" yaml:"server,omitempty"`
+
+ ServiceAccountPassword string `json:"serviceAccountPassword,omitempty" yaml:"service_account_password,omitempty"`
+
+ ServiceAccountUsername string `json:"serviceAccountUsername,omitempty" yaml:"service_account_username,omitempty"`
+
+ Tls bool `json:"tls,omitempty" yaml:"tls,omitempty"`
+
+ UserDisabledBitMask int64 `json:"userDisabledBitMask,omitempty" yaml:"user_disabled_bit_mask,omitempty"`
+
+ UserEnabledAttribute string `json:"userEnabledAttribute,omitempty" yaml:"user_enabled_attribute,omitempty"`
+
+ UserLoginField string `json:"userLoginField,omitempty" yaml:"user_login_field,omitempty"`
+
+ UserMemberAttribute string `json:"userMemberAttribute,omitempty" yaml:"user_member_attribute,omitempty"`
+
+ UserNameField string `json:"userNameField,omitempty" yaml:"user_name_field,omitempty"`
+
+ UserObjectClass string `json:"userObjectClass,omitempty" yaml:"user_object_class,omitempty"`
+
+ UserSearchField string `json:"userSearchField,omitempty" yaml:"user_search_field,omitempty"`
+}
+
+type OpenldapconfigCollection struct {
+ Collection
+ Data []Openldapconfig `json:"data,omitempty"`
+ client *OpenldapconfigClient
+}
+
+type OpenldapconfigClient struct {
+ rancherClient *RancherClient
+}
+
+type OpenldapconfigOperations interface {
+ List(opts *ListOpts) (*OpenldapconfigCollection, error)
+ Create(opts *Openldapconfig) (*Openldapconfig, error)
+ Update(existing *Openldapconfig, updates interface{}) (*Openldapconfig, error)
+ ById(id string) (*Openldapconfig, error)
+ Delete(container *Openldapconfig) error
+}
+
+func newOpenldapconfigClient(rancherClient *RancherClient) *OpenldapconfigClient {
+ return &OpenldapconfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *OpenldapconfigClient) Create(container *Openldapconfig) (*Openldapconfig, error) {
+ resp := &Openldapconfig{}
+ err := c.rancherClient.doCreate(OPENLDAPCONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *OpenldapconfigClient) Update(existing *Openldapconfig, updates interface{}) (*Openldapconfig, error) {
+ resp := &Openldapconfig{}
+ err := c.rancherClient.doUpdate(OPENLDAPCONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *OpenldapconfigClient) List(opts *ListOpts) (*OpenldapconfigCollection, error) {
+ resp := &OpenldapconfigCollection{}
+ err := c.rancherClient.doList(OPENLDAPCONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *OpenldapconfigCollection) Next() (*OpenldapconfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &OpenldapconfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *OpenldapconfigClient) ById(id string) (*Openldapconfig, error) {
+ resp := &Openldapconfig{}
+ err := c.rancherClient.doById(OPENLDAPCONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *OpenldapconfigClient) Delete(container *Openldapconfig) error {
+ return c.rancherClient.doResourceDelete(OPENLDAPCONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_packet_config.go b/vendor/github.com/rancher/go-rancher/client/generated_packet_config.go
new file mode 100644
index 00000000..3f3c4ff3
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_packet_config.go
@@ -0,0 +1,89 @@
+package client
+
+const (
+ PACKET_CONFIG_TYPE = "packetConfig"
+)
+
+type PacketConfig struct {
+ Resource
+
+ ApiKey string `json:"apiKey,omitempty" yaml:"api_key,omitempty"`
+
+ BillingCycle string `json:"billingCycle,omitempty" yaml:"billing_cycle,omitempty"`
+
+ FacilityCode string `json:"facilityCode,omitempty" yaml:"facility_code,omitempty"`
+
+ Os string `json:"os,omitempty" yaml:"os,omitempty"`
+
+ Plan string `json:"plan,omitempty" yaml:"plan,omitempty"`
+
+ ProjectId string `json:"projectId,omitempty" yaml:"project_id,omitempty"`
+}
+
+type PacketConfigCollection struct {
+ Collection
+ Data []PacketConfig `json:"data,omitempty"`
+ client *PacketConfigClient
+}
+
+type PacketConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type PacketConfigOperations interface {
+ List(opts *ListOpts) (*PacketConfigCollection, error)
+ Create(opts *PacketConfig) (*PacketConfig, error)
+ Update(existing *PacketConfig, updates interface{}) (*PacketConfig, error)
+ ById(id string) (*PacketConfig, error)
+ Delete(container *PacketConfig) error
+}
+
+func newPacketConfigClient(rancherClient *RancherClient) *PacketConfigClient {
+ return &PacketConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *PacketConfigClient) Create(container *PacketConfig) (*PacketConfig, error) {
+ resp := &PacketConfig{}
+ err := c.rancherClient.doCreate(PACKET_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *PacketConfigClient) Update(existing *PacketConfig, updates interface{}) (*PacketConfig, error) {
+ resp := &PacketConfig{}
+ err := c.rancherClient.doUpdate(PACKET_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *PacketConfigClient) List(opts *ListOpts) (*PacketConfigCollection, error) {
+ resp := &PacketConfigCollection{}
+ err := c.rancherClient.doList(PACKET_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *PacketConfigCollection) Next() (*PacketConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &PacketConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *PacketConfigClient) ById(id string) (*PacketConfig, error) {
+ resp := &PacketConfig{}
+ err := c.rancherClient.doById(PACKET_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *PacketConfigClient) Delete(container *PacketConfig) error {
+ return c.rancherClient.doResourceDelete(PACKET_CONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_password.go b/vendor/github.com/rancher/go-rancher/client/generated_password.go
new file mode 100644
index 00000000..5fb0d358
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_password.go
@@ -0,0 +1,184 @@
+package client
+
+const (
+ PASSWORD_TYPE = "password"
+)
+
+type Password struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ PublicValue string `json:"publicValue,omitempty" yaml:"public_value,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ SecretValue string `json:"secretValue,omitempty" yaml:"secret_value,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type PasswordCollection struct {
+ Collection
+ Data []Password `json:"data,omitempty"`
+ client *PasswordClient
+}
+
+type PasswordClient struct {
+ rancherClient *RancherClient
+}
+
+type PasswordOperations interface {
+ List(opts *ListOpts) (*PasswordCollection, error)
+ Create(opts *Password) (*Password, error)
+ Update(existing *Password, updates interface{}) (*Password, error)
+ ById(id string) (*Password, error)
+ Delete(container *Password) error
+
+ ActionActivate(*Password) (*Credential, error)
+
+ ActionChangesecret(*Password, *ChangeSecretInput) (*ChangeSecretInput, error)
+
+ ActionCreate(*Password) (*Credential, error)
+
+ ActionDeactivate(*Password) (*Credential, error)
+
+ ActionPurge(*Password) (*Credential, error)
+
+ ActionRemove(*Password) (*Credential, error)
+
+ ActionUpdate(*Password) (*Credential, error)
+}
+
+func newPasswordClient(rancherClient *RancherClient) *PasswordClient {
+ return &PasswordClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *PasswordClient) Create(container *Password) (*Password, error) {
+ resp := &Password{}
+ err := c.rancherClient.doCreate(PASSWORD_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *PasswordClient) Update(existing *Password, updates interface{}) (*Password, error) {
+ resp := &Password{}
+ err := c.rancherClient.doUpdate(PASSWORD_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *PasswordClient) List(opts *ListOpts) (*PasswordCollection, error) {
+ resp := &PasswordCollection{}
+ err := c.rancherClient.doList(PASSWORD_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *PasswordCollection) Next() (*PasswordCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &PasswordCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *PasswordClient) ById(id string) (*Password, error) {
+ resp := &Password{}
+ err := c.rancherClient.doById(PASSWORD_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *PasswordClient) Delete(container *Password) error {
+ return c.rancherClient.doResourceDelete(PASSWORD_TYPE, &container.Resource)
+}
+
+func (c *PasswordClient) ActionActivate(resource *Password) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(PASSWORD_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PasswordClient) ActionChangesecret(resource *Password, input *ChangeSecretInput) (*ChangeSecretInput, error) {
+
+ resp := &ChangeSecretInput{}
+
+ err := c.rancherClient.doAction(PASSWORD_TYPE, "changesecret", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *PasswordClient) ActionCreate(resource *Password) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(PASSWORD_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PasswordClient) ActionDeactivate(resource *Password) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(PASSWORD_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PasswordClient) ActionPurge(resource *Password) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(PASSWORD_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PasswordClient) ActionRemove(resource *Password) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(PASSWORD_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PasswordClient) ActionUpdate(resource *Password) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(PASSWORD_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_physical_host.go b/vendor/github.com/rancher/go-rancher/client/generated_physical_host.go
new file mode 100644
index 00000000..30039c49
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_physical_host.go
@@ -0,0 +1,162 @@
+package client
+
+const (
+ PHYSICAL_HOST_TYPE = "physicalHost"
+)
+
+type PhysicalHost struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Driver string `json:"driver,omitempty" yaml:"driver,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type PhysicalHostCollection struct {
+ Collection
+ Data []PhysicalHost `json:"data,omitempty"`
+ client *PhysicalHostClient
+}
+
+type PhysicalHostClient struct {
+ rancherClient *RancherClient
+}
+
+type PhysicalHostOperations interface {
+ List(opts *ListOpts) (*PhysicalHostCollection, error)
+ Create(opts *PhysicalHost) (*PhysicalHost, error)
+ Update(existing *PhysicalHost, updates interface{}) (*PhysicalHost, error)
+ ById(id string) (*PhysicalHost, error)
+ Delete(container *PhysicalHost) error
+
+ ActionBootstrap(*PhysicalHost) (*PhysicalHost, error)
+
+ ActionCreate(*PhysicalHost) (*PhysicalHost, error)
+
+ ActionError(*PhysicalHost) (*PhysicalHost, error)
+
+ ActionRemove(*PhysicalHost) (*PhysicalHost, error)
+
+ ActionUpdate(*PhysicalHost) (*PhysicalHost, error)
+}
+
+func newPhysicalHostClient(rancherClient *RancherClient) *PhysicalHostClient {
+ return &PhysicalHostClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *PhysicalHostClient) Create(container *PhysicalHost) (*PhysicalHost, error) {
+ resp := &PhysicalHost{}
+ err := c.rancherClient.doCreate(PHYSICAL_HOST_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *PhysicalHostClient) Update(existing *PhysicalHost, updates interface{}) (*PhysicalHost, error) {
+ resp := &PhysicalHost{}
+ err := c.rancherClient.doUpdate(PHYSICAL_HOST_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *PhysicalHostClient) List(opts *ListOpts) (*PhysicalHostCollection, error) {
+ resp := &PhysicalHostCollection{}
+ err := c.rancherClient.doList(PHYSICAL_HOST_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *PhysicalHostCollection) Next() (*PhysicalHostCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &PhysicalHostCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *PhysicalHostClient) ById(id string) (*PhysicalHost, error) {
+ resp := &PhysicalHost{}
+ err := c.rancherClient.doById(PHYSICAL_HOST_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *PhysicalHostClient) Delete(container *PhysicalHost) error {
+ return c.rancherClient.doResourceDelete(PHYSICAL_HOST_TYPE, &container.Resource)
+}
+
+func (c *PhysicalHostClient) ActionBootstrap(resource *PhysicalHost) (*PhysicalHost, error) {
+
+ resp := &PhysicalHost{}
+
+ err := c.rancherClient.doAction(PHYSICAL_HOST_TYPE, "bootstrap", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PhysicalHostClient) ActionCreate(resource *PhysicalHost) (*PhysicalHost, error) {
+
+ resp := &PhysicalHost{}
+
+ err := c.rancherClient.doAction(PHYSICAL_HOST_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PhysicalHostClient) ActionError(resource *PhysicalHost) (*PhysicalHost, error) {
+
+ resp := &PhysicalHost{}
+
+ err := c.rancherClient.doAction(PHYSICAL_HOST_TYPE, "error", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PhysicalHostClient) ActionRemove(resource *PhysicalHost) (*PhysicalHost, error) {
+
+ resp := &PhysicalHost{}
+
+ err := c.rancherClient.doAction(PHYSICAL_HOST_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PhysicalHostClient) ActionUpdate(resource *PhysicalHost) (*PhysicalHost, error) {
+
+ resp := &PhysicalHost{}
+
+ err := c.rancherClient.doAction(PHYSICAL_HOST_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_port.go b/vendor/github.com/rancher/go-rancher/client/generated_port.go
new file mode 100644
index 00000000..04261f77
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_port.go
@@ -0,0 +1,194 @@
+package client
+
+const (
+ PORT_TYPE = "port"
+)
+
+type Port struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ BindAddress string `json:"bindAddress,omitempty" yaml:"bind_address,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ PrivateIpAddressId string `json:"privateIpAddressId,omitempty" yaml:"private_ip_address_id,omitempty"`
+
+ PrivatePort int64 `json:"privatePort,omitempty" yaml:"private_port,omitempty"`
+
+ Protocol string `json:"protocol,omitempty" yaml:"protocol,omitempty"`
+
+ PublicIpAddressId string `json:"publicIpAddressId,omitempty" yaml:"public_ip_address_id,omitempty"`
+
+ PublicPort int64 `json:"publicPort,omitempty" yaml:"public_port,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type PortCollection struct {
+ Collection
+ Data []Port `json:"data,omitempty"`
+ client *PortClient
+}
+
+type PortClient struct {
+ rancherClient *RancherClient
+}
+
+type PortOperations interface {
+ List(opts *ListOpts) (*PortCollection, error)
+ Create(opts *Port) (*Port, error)
+ Update(existing *Port, updates interface{}) (*Port, error)
+ ById(id string) (*Port, error)
+ Delete(container *Port) error
+
+ ActionActivate(*Port) (*Port, error)
+
+ ActionCreate(*Port) (*Port, error)
+
+ ActionDeactivate(*Port) (*Port, error)
+
+ ActionPurge(*Port) (*Port, error)
+
+ ActionRemove(*Port) (*Port, error)
+
+ ActionRestore(*Port) (*Port, error)
+
+ ActionUpdate(*Port) (*Port, error)
+}
+
+func newPortClient(rancherClient *RancherClient) *PortClient {
+ return &PortClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *PortClient) Create(container *Port) (*Port, error) {
+ resp := &Port{}
+ err := c.rancherClient.doCreate(PORT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *PortClient) Update(existing *Port, updates interface{}) (*Port, error) {
+ resp := &Port{}
+ err := c.rancherClient.doUpdate(PORT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *PortClient) List(opts *ListOpts) (*PortCollection, error) {
+ resp := &PortCollection{}
+ err := c.rancherClient.doList(PORT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *PortCollection) Next() (*PortCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &PortCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *PortClient) ById(id string) (*Port, error) {
+ resp := &Port{}
+ err := c.rancherClient.doById(PORT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *PortClient) Delete(container *Port) error {
+ return c.rancherClient.doResourceDelete(PORT_TYPE, &container.Resource)
+}
+
+func (c *PortClient) ActionActivate(resource *Port) (*Port, error) {
+
+ resp := &Port{}
+
+ err := c.rancherClient.doAction(PORT_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PortClient) ActionCreate(resource *Port) (*Port, error) {
+
+ resp := &Port{}
+
+ err := c.rancherClient.doAction(PORT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PortClient) ActionDeactivate(resource *Port) (*Port, error) {
+
+ resp := &Port{}
+
+ err := c.rancherClient.doAction(PORT_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PortClient) ActionPurge(resource *Port) (*Port, error) {
+
+ resp := &Port{}
+
+ err := c.rancherClient.doAction(PORT_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PortClient) ActionRemove(resource *Port) (*Port, error) {
+
+ resp := &Port{}
+
+ err := c.rancherClient.doAction(PORT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PortClient) ActionRestore(resource *Port) (*Port, error) {
+
+ resp := &Port{}
+
+ err := c.rancherClient.doAction(PORT_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *PortClient) ActionUpdate(resource *Port) (*Port, error) {
+
+ resp := &Port{}
+
+ err := c.rancherClient.doAction(PORT_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_process_definition.go b/vendor/github.com/rancher/go-rancher/client/generated_process_definition.go
new file mode 100644
index 00000000..b6c9d94a
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_process_definition.go
@@ -0,0 +1,91 @@
+package client
+
+const (
+ PROCESS_DEFINITION_TYPE = "processDefinition"
+)
+
+type ProcessDefinition struct {
+ Resource
+
+ ExtensionBased bool `json:"extensionBased,omitempty" yaml:"extension_based,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ PostProcessListeners interface{} `json:"postProcessListeners,omitempty" yaml:"post_process_listeners,omitempty"`
+
+ PreProcessListeners interface{} `json:"preProcessListeners,omitempty" yaml:"pre_process_listeners,omitempty"`
+
+ ProcessHandlers interface{} `json:"processHandlers,omitempty" yaml:"process_handlers,omitempty"`
+
+ ResourceType string `json:"resourceType,omitempty" yaml:"resource_type,omitempty"`
+
+ StateTransitions []interface{} `json:"stateTransitions,omitempty" yaml:"state_transitions,omitempty"`
+}
+
+type ProcessDefinitionCollection struct {
+ Collection
+ Data []ProcessDefinition `json:"data,omitempty"`
+ client *ProcessDefinitionClient
+}
+
+type ProcessDefinitionClient struct {
+ rancherClient *RancherClient
+}
+
+type ProcessDefinitionOperations interface {
+ List(opts *ListOpts) (*ProcessDefinitionCollection, error)
+ Create(opts *ProcessDefinition) (*ProcessDefinition, error)
+ Update(existing *ProcessDefinition, updates interface{}) (*ProcessDefinition, error)
+ ById(id string) (*ProcessDefinition, error)
+ Delete(container *ProcessDefinition) error
+}
+
+func newProcessDefinitionClient(rancherClient *RancherClient) *ProcessDefinitionClient {
+ return &ProcessDefinitionClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ProcessDefinitionClient) Create(container *ProcessDefinition) (*ProcessDefinition, error) {
+ resp := &ProcessDefinition{}
+ err := c.rancherClient.doCreate(PROCESS_DEFINITION_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ProcessDefinitionClient) Update(existing *ProcessDefinition, updates interface{}) (*ProcessDefinition, error) {
+ resp := &ProcessDefinition{}
+ err := c.rancherClient.doUpdate(PROCESS_DEFINITION_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ProcessDefinitionClient) List(opts *ListOpts) (*ProcessDefinitionCollection, error) {
+ resp := &ProcessDefinitionCollection{}
+ err := c.rancherClient.doList(PROCESS_DEFINITION_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ProcessDefinitionCollection) Next() (*ProcessDefinitionCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ProcessDefinitionCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ProcessDefinitionClient) ById(id string) (*ProcessDefinition, error) {
+ resp := &ProcessDefinition{}
+ err := c.rancherClient.doById(PROCESS_DEFINITION_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ProcessDefinitionClient) Delete(container *ProcessDefinition) error {
+ return c.rancherClient.doResourceDelete(PROCESS_DEFINITION_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_process_execution.go b/vendor/github.com/rancher/go-rancher/client/generated_process_execution.go
new file mode 100644
index 00000000..7356dce8
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_process_execution.go
@@ -0,0 +1,85 @@
+package client
+
+const (
+ PROCESS_EXECUTION_TYPE = "processExecution"
+)
+
+type ProcessExecution struct {
+ Resource
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Log map[string]interface{} `json:"log,omitempty" yaml:"log,omitempty"`
+
+ ProcessInstanceId string `json:"processInstanceId,omitempty" yaml:"process_instance_id,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ProcessExecutionCollection struct {
+ Collection
+ Data []ProcessExecution `json:"data,omitempty"`
+ client *ProcessExecutionClient
+}
+
+type ProcessExecutionClient struct {
+ rancherClient *RancherClient
+}
+
+type ProcessExecutionOperations interface {
+ List(opts *ListOpts) (*ProcessExecutionCollection, error)
+ Create(opts *ProcessExecution) (*ProcessExecution, error)
+ Update(existing *ProcessExecution, updates interface{}) (*ProcessExecution, error)
+ ById(id string) (*ProcessExecution, error)
+ Delete(container *ProcessExecution) error
+}
+
+func newProcessExecutionClient(rancherClient *RancherClient) *ProcessExecutionClient {
+ return &ProcessExecutionClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ProcessExecutionClient) Create(container *ProcessExecution) (*ProcessExecution, error) {
+ resp := &ProcessExecution{}
+ err := c.rancherClient.doCreate(PROCESS_EXECUTION_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ProcessExecutionClient) Update(existing *ProcessExecution, updates interface{}) (*ProcessExecution, error) {
+ resp := &ProcessExecution{}
+ err := c.rancherClient.doUpdate(PROCESS_EXECUTION_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ProcessExecutionClient) List(opts *ListOpts) (*ProcessExecutionCollection, error) {
+ resp := &ProcessExecutionCollection{}
+ err := c.rancherClient.doList(PROCESS_EXECUTION_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ProcessExecutionCollection) Next() (*ProcessExecutionCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ProcessExecutionCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ProcessExecutionClient) ById(id string) (*ProcessExecution, error) {
+ resp := &ProcessExecution{}
+ err := c.rancherClient.doById(PROCESS_EXECUTION_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ProcessExecutionClient) Delete(container *ProcessExecution) error {
+ return c.rancherClient.doResourceDelete(PROCESS_EXECUTION_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_process_instance.go b/vendor/github.com/rancher/go-rancher/client/generated_process_instance.go
new file mode 100644
index 00000000..7dc874a7
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_process_instance.go
@@ -0,0 +1,101 @@
+package client
+
+const (
+ PROCESS_INSTANCE_TYPE = "processInstance"
+)
+
+type ProcessInstance struct {
+ Resource
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ EndTime string `json:"endTime,omitempty" yaml:"end_time,omitempty"`
+
+ ExitReason string `json:"exitReason,omitempty" yaml:"exit_reason,omitempty"`
+
+ Phase string `json:"phase,omitempty" yaml:"phase,omitempty"`
+
+ Priority int64 `json:"priority,omitempty" yaml:"priority,omitempty"`
+
+ ProcessName string `json:"processName,omitempty" yaml:"process_name,omitempty"`
+
+ ResourceId string `json:"resourceId,omitempty" yaml:"resource_id,omitempty"`
+
+ ResourceType string `json:"resourceType,omitempty" yaml:"resource_type,omitempty"`
+
+ Result string `json:"result,omitempty" yaml:"result,omitempty"`
+
+ RunningProcessServerId string `json:"runningProcessServerId,omitempty" yaml:"running_process_server_id,omitempty"`
+
+ StartProcessServerId string `json:"startProcessServerId,omitempty" yaml:"start_process_server_id,omitempty"`
+
+ StartTime string `json:"startTime,omitempty" yaml:"start_time,omitempty"`
+}
+
+type ProcessInstanceCollection struct {
+ Collection
+ Data []ProcessInstance `json:"data,omitempty"`
+ client *ProcessInstanceClient
+}
+
+type ProcessInstanceClient struct {
+ rancherClient *RancherClient
+}
+
+type ProcessInstanceOperations interface {
+ List(opts *ListOpts) (*ProcessInstanceCollection, error)
+ Create(opts *ProcessInstance) (*ProcessInstance, error)
+ Update(existing *ProcessInstance, updates interface{}) (*ProcessInstance, error)
+ ById(id string) (*ProcessInstance, error)
+ Delete(container *ProcessInstance) error
+}
+
+func newProcessInstanceClient(rancherClient *RancherClient) *ProcessInstanceClient {
+ return &ProcessInstanceClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ProcessInstanceClient) Create(container *ProcessInstance) (*ProcessInstance, error) {
+ resp := &ProcessInstance{}
+ err := c.rancherClient.doCreate(PROCESS_INSTANCE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ProcessInstanceClient) Update(existing *ProcessInstance, updates interface{}) (*ProcessInstance, error) {
+ resp := &ProcessInstance{}
+ err := c.rancherClient.doUpdate(PROCESS_INSTANCE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ProcessInstanceClient) List(opts *ListOpts) (*ProcessInstanceCollection, error) {
+ resp := &ProcessInstanceCollection{}
+ err := c.rancherClient.doList(PROCESS_INSTANCE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ProcessInstanceCollection) Next() (*ProcessInstanceCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ProcessInstanceCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ProcessInstanceClient) ById(id string) (*ProcessInstance, error) {
+ resp := &ProcessInstance{}
+ err := c.rancherClient.doById(PROCESS_INSTANCE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ProcessInstanceClient) Delete(container *ProcessInstance) error {
+ return c.rancherClient.doResourceDelete(PROCESS_INSTANCE_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_project.go b/vendor/github.com/rancher/go-rancher/client/generated_project.go
new file mode 100644
index 00000000..b8986a70
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_project.go
@@ -0,0 +1,205 @@
+package client
+
+const (
+ PROJECT_TYPE = "project"
+)
+
+type Project struct {
+ Resource
+
+ AllowSystemRole bool `json:"allowSystemRole,omitempty" yaml:"allow_system_role,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Kubernetes bool `json:"kubernetes,omitempty" yaml:"kubernetes,omitempty"`
+
+ Members []interface{} `json:"members,omitempty" yaml:"members,omitempty"`
+
+ Mesos bool `json:"mesos,omitempty" yaml:"mesos,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ PublicDns bool `json:"publicDns,omitempty" yaml:"public_dns,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ ServicesPortRange *ServicesPortRange `json:"servicesPortRange,omitempty" yaml:"services_port_range,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Swarm bool `json:"swarm,omitempty" yaml:"swarm,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ VirtualMachine bool `json:"virtualMachine,omitempty" yaml:"virtual_machine,omitempty"`
+}
+
+type ProjectCollection struct {
+ Collection
+ Data []Project `json:"data,omitempty"`
+ client *ProjectClient
+}
+
+type ProjectClient struct {
+ rancherClient *RancherClient
+}
+
+type ProjectOperations interface {
+ List(opts *ListOpts) (*ProjectCollection, error)
+ Create(opts *Project) (*Project, error)
+ Update(existing *Project, updates interface{}) (*Project, error)
+ ById(id string) (*Project, error)
+ Delete(container *Project) error
+
+ ActionActivate(*Project) (*Account, error)
+
+ ActionCreate(*Project) (*Account, error)
+
+ ActionDeactivate(*Project) (*Account, error)
+
+ ActionPurge(*Project) (*Account, error)
+
+ ActionRemove(*Project) (*Account, error)
+
+ ActionRestore(*Project) (*Account, error)
+
+ ActionSetmembers(*Project, *SetProjectMembersInput) (*SetProjectMembersInput, error)
+
+ ActionUpdate(*Project) (*Account, error)
+}
+
+func newProjectClient(rancherClient *RancherClient) *ProjectClient {
+ return &ProjectClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ProjectClient) Create(container *Project) (*Project, error) {
+ resp := &Project{}
+ err := c.rancherClient.doCreate(PROJECT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ProjectClient) Update(existing *Project, updates interface{}) (*Project, error) {
+ resp := &Project{}
+ err := c.rancherClient.doUpdate(PROJECT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ProjectClient) List(opts *ListOpts) (*ProjectCollection, error) {
+ resp := &ProjectCollection{}
+ err := c.rancherClient.doList(PROJECT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ProjectCollection) Next() (*ProjectCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ProjectCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ProjectClient) ById(id string) (*Project, error) {
+ resp := &Project{}
+ err := c.rancherClient.doById(PROJECT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ProjectClient) Delete(container *Project) error {
+ return c.rancherClient.doResourceDelete(PROJECT_TYPE, &container.Resource)
+}
+
+func (c *ProjectClient) ActionActivate(resource *Project) (*Account, error) {
+
+ resp := &Account{}
+
+ err := c.rancherClient.doAction(PROJECT_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ProjectClient) ActionCreate(resource *Project) (*Account, error) {
+
+ resp := &Account{}
+
+ err := c.rancherClient.doAction(PROJECT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ProjectClient) ActionDeactivate(resource *Project) (*Account, error) {
+
+ resp := &Account{}
+
+ err := c.rancherClient.doAction(PROJECT_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ProjectClient) ActionPurge(resource *Project) (*Account, error) {
+
+ resp := &Account{}
+
+ err := c.rancherClient.doAction(PROJECT_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ProjectClient) ActionRemove(resource *Project) (*Account, error) {
+
+ resp := &Account{}
+
+ err := c.rancherClient.doAction(PROJECT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ProjectClient) ActionRestore(resource *Project) (*Account, error) {
+
+ resp := &Account{}
+
+ err := c.rancherClient.doAction(PROJECT_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ProjectClient) ActionSetmembers(resource *Project, input *SetProjectMembersInput) (*SetProjectMembersInput, error) {
+
+ resp := &SetProjectMembersInput{}
+
+ err := c.rancherClient.doAction(PROJECT_TYPE, "setmembers", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *ProjectClient) ActionUpdate(resource *Project) (*Account, error) {
+
+ resp := &Account{}
+
+ err := c.rancherClient.doAction(PROJECT_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_project_member.go b/vendor/github.com/rancher/go-rancher/client/generated_project_member.go
new file mode 100644
index 00000000..96c6a771
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_project_member.go
@@ -0,0 +1,186 @@
+package client
+
+const (
+ PROJECT_MEMBER_TYPE = "projectMember"
+)
+
+type ProjectMember struct {
+ Resource
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ ExternalIdType string `json:"externalIdType,omitempty" yaml:"external_id_type,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ ProjectId string `json:"projectId,omitempty" yaml:"project_id,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ Role string `json:"role,omitempty" yaml:"role,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ProjectMemberCollection struct {
+ Collection
+ Data []ProjectMember `json:"data,omitempty"`
+ client *ProjectMemberClient
+}
+
+type ProjectMemberClient struct {
+ rancherClient *RancherClient
+}
+
+type ProjectMemberOperations interface {
+ List(opts *ListOpts) (*ProjectMemberCollection, error)
+ Create(opts *ProjectMember) (*ProjectMember, error)
+ Update(existing *ProjectMember, updates interface{}) (*ProjectMember, error)
+ ById(id string) (*ProjectMember, error)
+ Delete(container *ProjectMember) error
+
+ ActionActivate(*ProjectMember) (*ProjectMember, error)
+
+ ActionCreate(*ProjectMember) (*ProjectMember, error)
+
+ ActionDeactivate(*ProjectMember) (*ProjectMember, error)
+
+ ActionPurge(*ProjectMember) (*ProjectMember, error)
+
+ ActionRemove(*ProjectMember) (*ProjectMember, error)
+
+ ActionRestore(*ProjectMember) (*ProjectMember, error)
+
+ ActionUpdate(*ProjectMember) (*ProjectMember, error)
+}
+
+func newProjectMemberClient(rancherClient *RancherClient) *ProjectMemberClient {
+ return &ProjectMemberClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ProjectMemberClient) Create(container *ProjectMember) (*ProjectMember, error) {
+ resp := &ProjectMember{}
+ err := c.rancherClient.doCreate(PROJECT_MEMBER_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ProjectMemberClient) Update(existing *ProjectMember, updates interface{}) (*ProjectMember, error) {
+ resp := &ProjectMember{}
+ err := c.rancherClient.doUpdate(PROJECT_MEMBER_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ProjectMemberClient) List(opts *ListOpts) (*ProjectMemberCollection, error) {
+ resp := &ProjectMemberCollection{}
+ err := c.rancherClient.doList(PROJECT_MEMBER_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ProjectMemberCollection) Next() (*ProjectMemberCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ProjectMemberCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ProjectMemberClient) ById(id string) (*ProjectMember, error) {
+ resp := &ProjectMember{}
+ err := c.rancherClient.doById(PROJECT_MEMBER_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ProjectMemberClient) Delete(container *ProjectMember) error {
+ return c.rancherClient.doResourceDelete(PROJECT_MEMBER_TYPE, &container.Resource)
+}
+
+func (c *ProjectMemberClient) ActionActivate(resource *ProjectMember) (*ProjectMember, error) {
+
+ resp := &ProjectMember{}
+
+ err := c.rancherClient.doAction(PROJECT_MEMBER_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ProjectMemberClient) ActionCreate(resource *ProjectMember) (*ProjectMember, error) {
+
+ resp := &ProjectMember{}
+
+ err := c.rancherClient.doAction(PROJECT_MEMBER_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ProjectMemberClient) ActionDeactivate(resource *ProjectMember) (*ProjectMember, error) {
+
+ resp := &ProjectMember{}
+
+ err := c.rancherClient.doAction(PROJECT_MEMBER_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ProjectMemberClient) ActionPurge(resource *ProjectMember) (*ProjectMember, error) {
+
+ resp := &ProjectMember{}
+
+ err := c.rancherClient.doAction(PROJECT_MEMBER_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ProjectMemberClient) ActionRemove(resource *ProjectMember) (*ProjectMember, error) {
+
+ resp := &ProjectMember{}
+
+ err := c.rancherClient.doAction(PROJECT_MEMBER_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ProjectMemberClient) ActionRestore(resource *ProjectMember) (*ProjectMember, error) {
+
+ resp := &ProjectMember{}
+
+ err := c.rancherClient.doAction(PROJECT_MEMBER_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ProjectMemberClient) ActionUpdate(resource *ProjectMember) (*ProjectMember, error) {
+
+ resp := &ProjectMember{}
+
+ err := c.rancherClient.doAction(PROJECT_MEMBER_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_public_endpoint.go b/vendor/github.com/rancher/go-rancher/client/generated_public_endpoint.go
new file mode 100644
index 00000000..14898e49
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_public_endpoint.go
@@ -0,0 +1,87 @@
+package client
+
+const (
+ PUBLIC_ENDPOINT_TYPE = "publicEndpoint"
+)
+
+type PublicEndpoint struct {
+ Resource
+
+ HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
+
+ InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"`
+
+ IpAddress string `json:"ipAddress,omitempty" yaml:"ip_address,omitempty"`
+
+ Port int64 `json:"port,omitempty" yaml:"port,omitempty"`
+
+ ServiceId string `json:"serviceId,omitempty" yaml:"service_id,omitempty"`
+}
+
+type PublicEndpointCollection struct {
+ Collection
+ Data []PublicEndpoint `json:"data,omitempty"`
+ client *PublicEndpointClient
+}
+
+type PublicEndpointClient struct {
+ rancherClient *RancherClient
+}
+
+type PublicEndpointOperations interface {
+ List(opts *ListOpts) (*PublicEndpointCollection, error)
+ Create(opts *PublicEndpoint) (*PublicEndpoint, error)
+ Update(existing *PublicEndpoint, updates interface{}) (*PublicEndpoint, error)
+ ById(id string) (*PublicEndpoint, error)
+ Delete(container *PublicEndpoint) error
+}
+
+func newPublicEndpointClient(rancherClient *RancherClient) *PublicEndpointClient {
+ return &PublicEndpointClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *PublicEndpointClient) Create(container *PublicEndpoint) (*PublicEndpoint, error) {
+ resp := &PublicEndpoint{}
+ err := c.rancherClient.doCreate(PUBLIC_ENDPOINT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *PublicEndpointClient) Update(existing *PublicEndpoint, updates interface{}) (*PublicEndpoint, error) {
+ resp := &PublicEndpoint{}
+ err := c.rancherClient.doUpdate(PUBLIC_ENDPOINT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *PublicEndpointClient) List(opts *ListOpts) (*PublicEndpointCollection, error) {
+ resp := &PublicEndpointCollection{}
+ err := c.rancherClient.doList(PUBLIC_ENDPOINT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *PublicEndpointCollection) Next() (*PublicEndpointCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &PublicEndpointCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *PublicEndpointClient) ById(id string) (*PublicEndpoint, error) {
+ resp := &PublicEndpoint{}
+ err := c.rancherClient.doById(PUBLIC_ENDPOINT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *PublicEndpointClient) Delete(container *PublicEndpoint) error {
+ return c.rancherClient.doResourceDelete(PUBLIC_ENDPOINT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_publish.go b/vendor/github.com/rancher/go-rancher/client/generated_publish.go
new file mode 100644
index 00000000..af7f7cd5
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_publish.go
@@ -0,0 +1,99 @@
+package client
+
+const (
+ PUBLISH_TYPE = "publish"
+)
+
+type Publish struct {
+ Resource
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ PreviousIds []string `json:"previousIds,omitempty" yaml:"previous_ids,omitempty"`
+
+ Publisher string `json:"publisher,omitempty" yaml:"publisher,omitempty"`
+
+ ResourceId string `json:"resourceId,omitempty" yaml:"resource_id,omitempty"`
+
+ ResourceType string `json:"resourceType,omitempty" yaml:"resource_type,omitempty"`
+
+ Time int64 `json:"time,omitempty" yaml:"time,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningInternalMessage string `json:"transitioningInternalMessage,omitempty" yaml:"transitioning_internal_message,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+}
+
+type PublishCollection struct {
+ Collection
+ Data []Publish `json:"data,omitempty"`
+ client *PublishClient
+}
+
+type PublishClient struct {
+ rancherClient *RancherClient
+}
+
+type PublishOperations interface {
+ List(opts *ListOpts) (*PublishCollection, error)
+ Create(opts *Publish) (*Publish, error)
+ Update(existing *Publish, updates interface{}) (*Publish, error)
+ ById(id string) (*Publish, error)
+ Delete(container *Publish) error
+}
+
+func newPublishClient(rancherClient *RancherClient) *PublishClient {
+ return &PublishClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *PublishClient) Create(container *Publish) (*Publish, error) {
+ resp := &Publish{}
+ err := c.rancherClient.doCreate(PUBLISH_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *PublishClient) Update(existing *Publish, updates interface{}) (*Publish, error) {
+ resp := &Publish{}
+ err := c.rancherClient.doUpdate(PUBLISH_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *PublishClient) List(opts *ListOpts) (*PublishCollection, error) {
+ resp := &PublishCollection{}
+ err := c.rancherClient.doList(PUBLISH_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *PublishCollection) Next() (*PublishCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &PublishCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *PublishClient) ById(id string) (*Publish, error) {
+ resp := &Publish{}
+ err := c.rancherClient.doById(PUBLISH_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *PublishClient) Delete(container *Publish) error {
+ return c.rancherClient.doResourceDelete(PUBLISH_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_pull_task.go b/vendor/github.com/rancher/go-rancher/client/generated_pull_task.go
new file mode 100644
index 00000000..d7fd5814
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_pull_task.go
@@ -0,0 +1,111 @@
+package client
+
+const (
+ PULL_TASK_TYPE = "pullTask"
+)
+
+type PullTask struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Image string `json:"image,omitempty" yaml:"image,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"`
+
+ Mode string `json:"mode,omitempty" yaml:"mode,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Status map[string]interface{} `json:"status,omitempty" yaml:"status,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type PullTaskCollection struct {
+ Collection
+ Data []PullTask `json:"data,omitempty"`
+ client *PullTaskClient
+}
+
+type PullTaskClient struct {
+ rancherClient *RancherClient
+}
+
+type PullTaskOperations interface {
+ List(opts *ListOpts) (*PullTaskCollection, error)
+ Create(opts *PullTask) (*PullTask, error)
+ Update(existing *PullTask, updates interface{}) (*PullTask, error)
+ ById(id string) (*PullTask, error)
+ Delete(container *PullTask) error
+}
+
+func newPullTaskClient(rancherClient *RancherClient) *PullTaskClient {
+ return &PullTaskClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *PullTaskClient) Create(container *PullTask) (*PullTask, error) {
+ resp := &PullTask{}
+ err := c.rancherClient.doCreate(PULL_TASK_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *PullTaskClient) Update(existing *PullTask, updates interface{}) (*PullTask, error) {
+ resp := &PullTask{}
+ err := c.rancherClient.doUpdate(PULL_TASK_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *PullTaskClient) List(opts *ListOpts) (*PullTaskCollection, error) {
+ resp := &PullTaskCollection{}
+ err := c.rancherClient.doList(PULL_TASK_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *PullTaskCollection) Next() (*PullTaskCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &PullTaskCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *PullTaskClient) ById(id string) (*PullTask, error) {
+ resp := &PullTask{}
+ err := c.rancherClient.doById(PULL_TASK_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *PullTaskClient) Delete(container *PullTask) error {
+ return c.rancherClient.doResourceDelete(PULL_TASK_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_recreate_on_quorum_strategy_config.go b/vendor/github.com/rancher/go-rancher/client/generated_recreate_on_quorum_strategy_config.go
new file mode 100644
index 00000000..ad1e7189
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_recreate_on_quorum_strategy_config.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE = "recreateOnQuorumStrategyConfig"
+)
+
+type RecreateOnQuorumStrategyConfig struct {
+ Resource
+
+ Quorum int64 `json:"quorum,omitempty" yaml:"quorum,omitempty"`
+}
+
+type RecreateOnQuorumStrategyConfigCollection struct {
+ Collection
+ Data []RecreateOnQuorumStrategyConfig `json:"data,omitempty"`
+ client *RecreateOnQuorumStrategyConfigClient
+}
+
+type RecreateOnQuorumStrategyConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type RecreateOnQuorumStrategyConfigOperations interface {
+ List(opts *ListOpts) (*RecreateOnQuorumStrategyConfigCollection, error)
+ Create(opts *RecreateOnQuorumStrategyConfig) (*RecreateOnQuorumStrategyConfig, error)
+ Update(existing *RecreateOnQuorumStrategyConfig, updates interface{}) (*RecreateOnQuorumStrategyConfig, error)
+ ById(id string) (*RecreateOnQuorumStrategyConfig, error)
+ Delete(container *RecreateOnQuorumStrategyConfig) error
+}
+
+func newRecreateOnQuorumStrategyConfigClient(rancherClient *RancherClient) *RecreateOnQuorumStrategyConfigClient {
+ return &RecreateOnQuorumStrategyConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *RecreateOnQuorumStrategyConfigClient) Create(container *RecreateOnQuorumStrategyConfig) (*RecreateOnQuorumStrategyConfig, error) {
+ resp := &RecreateOnQuorumStrategyConfig{}
+ err := c.rancherClient.doCreate(RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *RecreateOnQuorumStrategyConfigClient) Update(existing *RecreateOnQuorumStrategyConfig, updates interface{}) (*RecreateOnQuorumStrategyConfig, error) {
+ resp := &RecreateOnQuorumStrategyConfig{}
+ err := c.rancherClient.doUpdate(RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *RecreateOnQuorumStrategyConfigClient) List(opts *ListOpts) (*RecreateOnQuorumStrategyConfigCollection, error) {
+ resp := &RecreateOnQuorumStrategyConfigCollection{}
+ err := c.rancherClient.doList(RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *RecreateOnQuorumStrategyConfigCollection) Next() (*RecreateOnQuorumStrategyConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &RecreateOnQuorumStrategyConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *RecreateOnQuorumStrategyConfigClient) ById(id string) (*RecreateOnQuorumStrategyConfig, error) {
+ resp := &RecreateOnQuorumStrategyConfig{}
+ err := c.rancherClient.doById(RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *RecreateOnQuorumStrategyConfigClient) Delete(container *RecreateOnQuorumStrategyConfig) error {
+ return c.rancherClient.doResourceDelete(RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_register.go b/vendor/github.com/rancher/go-rancher/client/generated_register.go
new file mode 100644
index 00000000..3e180b8e
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_register.go
@@ -0,0 +1,120 @@
+package client
+
+const (
+ REGISTER_TYPE = "register"
+)
+
+type Register struct {
+ Resource
+
+ AccessKey string `json:"accessKey,omitempty" yaml:"access_key,omitempty"`
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Key string `json:"key,omitempty" yaml:"key,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ SecretKey string `json:"secretKey,omitempty" yaml:"secret_key,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type RegisterCollection struct {
+ Collection
+ Data []Register `json:"data,omitempty"`
+ client *RegisterClient
+}
+
+type RegisterClient struct {
+ rancherClient *RancherClient
+}
+
+type RegisterOperations interface {
+ List(opts *ListOpts) (*RegisterCollection, error)
+ Create(opts *Register) (*Register, error)
+ Update(existing *Register, updates interface{}) (*Register, error)
+ ById(id string) (*Register, error)
+ Delete(container *Register) error
+
+ ActionStop(*Register, *InstanceStop) (*Instance, error)
+}
+
+func newRegisterClient(rancherClient *RancherClient) *RegisterClient {
+ return &RegisterClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *RegisterClient) Create(container *Register) (*Register, error) {
+ resp := &Register{}
+ err := c.rancherClient.doCreate(REGISTER_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *RegisterClient) Update(existing *Register, updates interface{}) (*Register, error) {
+ resp := &Register{}
+ err := c.rancherClient.doUpdate(REGISTER_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *RegisterClient) List(opts *ListOpts) (*RegisterCollection, error) {
+ resp := &RegisterCollection{}
+ err := c.rancherClient.doList(REGISTER_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *RegisterCollection) Next() (*RegisterCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &RegisterCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *RegisterClient) ById(id string) (*Register, error) {
+ resp := &Register{}
+ err := c.rancherClient.doById(REGISTER_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *RegisterClient) Delete(container *Register) error {
+ return c.rancherClient.doResourceDelete(REGISTER_TYPE, &container.Resource)
+}
+
+func (c *RegisterClient) ActionStop(resource *Register, input *InstanceStop) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(REGISTER_TYPE, "stop", &resource.Resource, input, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_registration_token.go b/vendor/github.com/rancher/go-rancher/client/generated_registration_token.go
new file mode 100644
index 00000000..1cbf178a
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_registration_token.go
@@ -0,0 +1,177 @@
+package client
+
+const (
+ REGISTRATION_TOKEN_TYPE = "registrationToken"
+)
+
+type RegistrationToken struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Command string `json:"command,omitempty" yaml:"command,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Image string `json:"image,omitempty" yaml:"image,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RegistrationUrl string `json:"registrationUrl,omitempty" yaml:"registration_url,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Token string `json:"token,omitempty" yaml:"token,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type RegistrationTokenCollection struct {
+ Collection
+ Data []RegistrationToken `json:"data,omitempty"`
+ client *RegistrationTokenClient
+}
+
+type RegistrationTokenClient struct {
+ rancherClient *RancherClient
+}
+
+type RegistrationTokenOperations interface {
+ List(opts *ListOpts) (*RegistrationTokenCollection, error)
+ Create(opts *RegistrationToken) (*RegistrationToken, error)
+ Update(existing *RegistrationToken, updates interface{}) (*RegistrationToken, error)
+ ById(id string) (*RegistrationToken, error)
+ Delete(container *RegistrationToken) error
+
+ ActionActivate(*RegistrationToken) (*Credential, error)
+
+ ActionCreate(*RegistrationToken) (*Credential, error)
+
+ ActionDeactivate(*RegistrationToken) (*Credential, error)
+
+ ActionPurge(*RegistrationToken) (*Credential, error)
+
+ ActionRemove(*RegistrationToken) (*Credential, error)
+
+ ActionUpdate(*RegistrationToken) (*Credential, error)
+}
+
+func newRegistrationTokenClient(rancherClient *RancherClient) *RegistrationTokenClient {
+ return &RegistrationTokenClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *RegistrationTokenClient) Create(container *RegistrationToken) (*RegistrationToken, error) {
+ resp := &RegistrationToken{}
+ err := c.rancherClient.doCreate(REGISTRATION_TOKEN_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *RegistrationTokenClient) Update(existing *RegistrationToken, updates interface{}) (*RegistrationToken, error) {
+ resp := &RegistrationToken{}
+ err := c.rancherClient.doUpdate(REGISTRATION_TOKEN_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *RegistrationTokenClient) List(opts *ListOpts) (*RegistrationTokenCollection, error) {
+ resp := &RegistrationTokenCollection{}
+ err := c.rancherClient.doList(REGISTRATION_TOKEN_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *RegistrationTokenCollection) Next() (*RegistrationTokenCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &RegistrationTokenCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *RegistrationTokenClient) ById(id string) (*RegistrationToken, error) {
+ resp := &RegistrationToken{}
+ err := c.rancherClient.doById(REGISTRATION_TOKEN_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *RegistrationTokenClient) Delete(container *RegistrationToken) error {
+ return c.rancherClient.doResourceDelete(REGISTRATION_TOKEN_TYPE, &container.Resource)
+}
+
+func (c *RegistrationTokenClient) ActionActivate(resource *RegistrationToken) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(REGISTRATION_TOKEN_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistrationTokenClient) ActionCreate(resource *RegistrationToken) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(REGISTRATION_TOKEN_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistrationTokenClient) ActionDeactivate(resource *RegistrationToken) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(REGISTRATION_TOKEN_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistrationTokenClient) ActionPurge(resource *RegistrationToken) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(REGISTRATION_TOKEN_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistrationTokenClient) ActionRemove(resource *RegistrationToken) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(REGISTRATION_TOKEN_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistrationTokenClient) ActionUpdate(resource *RegistrationToken) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(REGISTRATION_TOKEN_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_registry.go b/vendor/github.com/rancher/go-rancher/client/generated_registry.go
new file mode 100644
index 00000000..e5dae985
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_registry.go
@@ -0,0 +1,192 @@
+package client
+
+const (
+ REGISTRY_TYPE = "registry"
+)
+
+type Registry struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ BlockDevicePath string `json:"blockDevicePath,omitempty" yaml:"block_device_path,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ DriverName string `json:"driverName,omitempty" yaml:"driver_name,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ ServerAddress string `json:"serverAddress,omitempty" yaml:"server_address,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ VolumeAccessMode string `json:"volumeAccessMode,omitempty" yaml:"volume_access_mode,omitempty"`
+
+ VolumeCapabilities []string `json:"volumeCapabilities,omitempty" yaml:"volume_capabilities,omitempty"`
+}
+
+type RegistryCollection struct {
+ Collection
+ Data []Registry `json:"data,omitempty"`
+ client *RegistryClient
+}
+
+type RegistryClient struct {
+ rancherClient *RancherClient
+}
+
+type RegistryOperations interface {
+ List(opts *ListOpts) (*RegistryCollection, error)
+ Create(opts *Registry) (*Registry, error)
+ Update(existing *Registry, updates interface{}) (*Registry, error)
+ ById(id string) (*Registry, error)
+ Delete(container *Registry) error
+
+ ActionActivate(*Registry) (*StoragePool, error)
+
+ ActionCreate(*Registry) (*StoragePool, error)
+
+ ActionDeactivate(*Registry) (*StoragePool, error)
+
+ ActionPurge(*Registry) (*StoragePool, error)
+
+ ActionRemove(*Registry) (*StoragePool, error)
+
+ ActionRestore(*Registry) (*StoragePool, error)
+
+ ActionUpdate(*Registry) (*StoragePool, error)
+}
+
+func newRegistryClient(rancherClient *RancherClient) *RegistryClient {
+ return &RegistryClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *RegistryClient) Create(container *Registry) (*Registry, error) {
+ resp := &Registry{}
+ err := c.rancherClient.doCreate(REGISTRY_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *RegistryClient) Update(existing *Registry, updates interface{}) (*Registry, error) {
+ resp := &Registry{}
+ err := c.rancherClient.doUpdate(REGISTRY_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *RegistryClient) List(opts *ListOpts) (*RegistryCollection, error) {
+ resp := &RegistryCollection{}
+ err := c.rancherClient.doList(REGISTRY_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *RegistryCollection) Next() (*RegistryCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &RegistryCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *RegistryClient) ById(id string) (*Registry, error) {
+ resp := &Registry{}
+ err := c.rancherClient.doById(REGISTRY_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *RegistryClient) Delete(container *Registry) error {
+ return c.rancherClient.doResourceDelete(REGISTRY_TYPE, &container.Resource)
+}
+
+func (c *RegistryClient) ActionActivate(resource *Registry) (*StoragePool, error) {
+
+ resp := &StoragePool{}
+
+ err := c.rancherClient.doAction(REGISTRY_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistryClient) ActionCreate(resource *Registry) (*StoragePool, error) {
+
+ resp := &StoragePool{}
+
+ err := c.rancherClient.doAction(REGISTRY_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistryClient) ActionDeactivate(resource *Registry) (*StoragePool, error) {
+
+ resp := &StoragePool{}
+
+ err := c.rancherClient.doAction(REGISTRY_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistryClient) ActionPurge(resource *Registry) (*StoragePool, error) {
+
+ resp := &StoragePool{}
+
+ err := c.rancherClient.doAction(REGISTRY_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistryClient) ActionRemove(resource *Registry) (*StoragePool, error) {
+
+ resp := &StoragePool{}
+
+ err := c.rancherClient.doAction(REGISTRY_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistryClient) ActionRestore(resource *Registry) (*StoragePool, error) {
+
+ resp := &StoragePool{}
+
+ err := c.rancherClient.doAction(REGISTRY_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistryClient) ActionUpdate(resource *Registry) (*StoragePool, error) {
+
+ resp := &StoragePool{}
+
+ err := c.rancherClient.doAction(REGISTRY_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_registry_credential.go b/vendor/github.com/rancher/go-rancher/client/generated_registry_credential.go
new file mode 100644
index 00000000..59bd5f82
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_registry_credential.go
@@ -0,0 +1,177 @@
+package client
+
+const (
+ REGISTRY_CREDENTIAL_TYPE = "registryCredential"
+)
+
+type RegistryCredential struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Email string `json:"email,omitempty" yaml:"email,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ PublicValue string `json:"publicValue,omitempty" yaml:"public_value,omitempty"`
+
+ RegistryId string `json:"registryId,omitempty" yaml:"registry_id,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ SecretValue string `json:"secretValue,omitempty" yaml:"secret_value,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type RegistryCredentialCollection struct {
+ Collection
+ Data []RegistryCredential `json:"data,omitempty"`
+ client *RegistryCredentialClient
+}
+
+type RegistryCredentialClient struct {
+ rancherClient *RancherClient
+}
+
+type RegistryCredentialOperations interface {
+ List(opts *ListOpts) (*RegistryCredentialCollection, error)
+ Create(opts *RegistryCredential) (*RegistryCredential, error)
+ Update(existing *RegistryCredential, updates interface{}) (*RegistryCredential, error)
+ ById(id string) (*RegistryCredential, error)
+ Delete(container *RegistryCredential) error
+
+ ActionActivate(*RegistryCredential) (*Credential, error)
+
+ ActionCreate(*RegistryCredential) (*Credential, error)
+
+ ActionDeactivate(*RegistryCredential) (*Credential, error)
+
+ ActionPurge(*RegistryCredential) (*Credential, error)
+
+ ActionRemove(*RegistryCredential) (*Credential, error)
+
+ ActionUpdate(*RegistryCredential) (*Credential, error)
+}
+
+func newRegistryCredentialClient(rancherClient *RancherClient) *RegistryCredentialClient {
+ return &RegistryCredentialClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *RegistryCredentialClient) Create(container *RegistryCredential) (*RegistryCredential, error) {
+ resp := &RegistryCredential{}
+ err := c.rancherClient.doCreate(REGISTRY_CREDENTIAL_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *RegistryCredentialClient) Update(existing *RegistryCredential, updates interface{}) (*RegistryCredential, error) {
+ resp := &RegistryCredential{}
+ err := c.rancherClient.doUpdate(REGISTRY_CREDENTIAL_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *RegistryCredentialClient) List(opts *ListOpts) (*RegistryCredentialCollection, error) {
+ resp := &RegistryCredentialCollection{}
+ err := c.rancherClient.doList(REGISTRY_CREDENTIAL_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *RegistryCredentialCollection) Next() (*RegistryCredentialCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &RegistryCredentialCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *RegistryCredentialClient) ById(id string) (*RegistryCredential, error) {
+ resp := &RegistryCredential{}
+ err := c.rancherClient.doById(REGISTRY_CREDENTIAL_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *RegistryCredentialClient) Delete(container *RegistryCredential) error {
+ return c.rancherClient.doResourceDelete(REGISTRY_CREDENTIAL_TYPE, &container.Resource)
+}
+
+func (c *RegistryCredentialClient) ActionActivate(resource *RegistryCredential) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(REGISTRY_CREDENTIAL_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistryCredentialClient) ActionCreate(resource *RegistryCredential) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(REGISTRY_CREDENTIAL_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistryCredentialClient) ActionDeactivate(resource *RegistryCredential) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(REGISTRY_CREDENTIAL_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistryCredentialClient) ActionPurge(resource *RegistryCredential) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(REGISTRY_CREDENTIAL_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistryCredentialClient) ActionRemove(resource *RegistryCredential) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(REGISTRY_CREDENTIAL_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *RegistryCredentialClient) ActionUpdate(resource *RegistryCredential) (*Credential, error) {
+
+ resp := &Credential{}
+
+ err := c.rancherClient.doAction(REGISTRY_CREDENTIAL_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_resource_definition.go b/vendor/github.com/rancher/go-rancher/client/generated_resource_definition.go
new file mode 100644
index 00000000..bc65daab
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_resource_definition.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ RESOURCE_DEFINITION_TYPE = "resourceDefinition"
+)
+
+type ResourceDefinition struct {
+ Resource
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+}
+
+type ResourceDefinitionCollection struct {
+ Collection
+ Data []ResourceDefinition `json:"data,omitempty"`
+ client *ResourceDefinitionClient
+}
+
+type ResourceDefinitionClient struct {
+ rancherClient *RancherClient
+}
+
+type ResourceDefinitionOperations interface {
+ List(opts *ListOpts) (*ResourceDefinitionCollection, error)
+ Create(opts *ResourceDefinition) (*ResourceDefinition, error)
+ Update(existing *ResourceDefinition, updates interface{}) (*ResourceDefinition, error)
+ ById(id string) (*ResourceDefinition, error)
+ Delete(container *ResourceDefinition) error
+}
+
+func newResourceDefinitionClient(rancherClient *RancherClient) *ResourceDefinitionClient {
+ return &ResourceDefinitionClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ResourceDefinitionClient) Create(container *ResourceDefinition) (*ResourceDefinition, error) {
+ resp := &ResourceDefinition{}
+ err := c.rancherClient.doCreate(RESOURCE_DEFINITION_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ResourceDefinitionClient) Update(existing *ResourceDefinition, updates interface{}) (*ResourceDefinition, error) {
+ resp := &ResourceDefinition{}
+ err := c.rancherClient.doUpdate(RESOURCE_DEFINITION_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ResourceDefinitionClient) List(opts *ListOpts) (*ResourceDefinitionCollection, error) {
+ resp := &ResourceDefinitionCollection{}
+ err := c.rancherClient.doList(RESOURCE_DEFINITION_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ResourceDefinitionCollection) Next() (*ResourceDefinitionCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ResourceDefinitionCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ResourceDefinitionClient) ById(id string) (*ResourceDefinition, error) {
+ resp := &ResourceDefinition{}
+ err := c.rancherClient.doById(RESOURCE_DEFINITION_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ResourceDefinitionClient) Delete(container *ResourceDefinition) error {
+ return c.rancherClient.doResourceDelete(RESOURCE_DEFINITION_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_restart_policy.go b/vendor/github.com/rancher/go-rancher/client/generated_restart_policy.go
new file mode 100644
index 00000000..23c4d81f
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_restart_policy.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ RESTART_POLICY_TYPE = "restartPolicy"
+)
+
+type RestartPolicy struct {
+ Resource
+
+ MaximumRetryCount int64 `json:"maximumRetryCount,omitempty" yaml:"maximum_retry_count,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+}
+
+type RestartPolicyCollection struct {
+ Collection
+ Data []RestartPolicy `json:"data,omitempty"`
+ client *RestartPolicyClient
+}
+
+type RestartPolicyClient struct {
+ rancherClient *RancherClient
+}
+
+type RestartPolicyOperations interface {
+ List(opts *ListOpts) (*RestartPolicyCollection, error)
+ Create(opts *RestartPolicy) (*RestartPolicy, error)
+ Update(existing *RestartPolicy, updates interface{}) (*RestartPolicy, error)
+ ById(id string) (*RestartPolicy, error)
+ Delete(container *RestartPolicy) error
+}
+
+func newRestartPolicyClient(rancherClient *RancherClient) *RestartPolicyClient {
+ return &RestartPolicyClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *RestartPolicyClient) Create(container *RestartPolicy) (*RestartPolicy, error) {
+ resp := &RestartPolicy{}
+ err := c.rancherClient.doCreate(RESTART_POLICY_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *RestartPolicyClient) Update(existing *RestartPolicy, updates interface{}) (*RestartPolicy, error) {
+ resp := &RestartPolicy{}
+ err := c.rancherClient.doUpdate(RESTART_POLICY_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *RestartPolicyClient) List(opts *ListOpts) (*RestartPolicyCollection, error) {
+ resp := &RestartPolicyCollection{}
+ err := c.rancherClient.doList(RESTART_POLICY_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *RestartPolicyCollection) Next() (*RestartPolicyCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &RestartPolicyCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *RestartPolicyClient) ById(id string) (*RestartPolicy, error) {
+ resp := &RestartPolicy{}
+ err := c.rancherClient.doById(RESTART_POLICY_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *RestartPolicyClient) Delete(container *RestartPolicy) error {
+ return c.rancherClient.doResourceDelete(RESTART_POLICY_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_restore_from_backup_input.go b/vendor/github.com/rancher/go-rancher/client/generated_restore_from_backup_input.go
new file mode 100644
index 00000000..f4178081
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_restore_from_backup_input.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ RESTORE_FROM_BACKUP_INPUT_TYPE = "restoreFromBackupInput"
+)
+
+type RestoreFromBackupInput struct {
+ Resource
+
+ BackupId string `json:"backupId,omitempty" yaml:"backup_id,omitempty"`
+}
+
+type RestoreFromBackupInputCollection struct {
+ Collection
+ Data []RestoreFromBackupInput `json:"data,omitempty"`
+ client *RestoreFromBackupInputClient
+}
+
+type RestoreFromBackupInputClient struct {
+ rancherClient *RancherClient
+}
+
+type RestoreFromBackupInputOperations interface {
+ List(opts *ListOpts) (*RestoreFromBackupInputCollection, error)
+ Create(opts *RestoreFromBackupInput) (*RestoreFromBackupInput, error)
+ Update(existing *RestoreFromBackupInput, updates interface{}) (*RestoreFromBackupInput, error)
+ ById(id string) (*RestoreFromBackupInput, error)
+ Delete(container *RestoreFromBackupInput) error
+}
+
+func newRestoreFromBackupInputClient(rancherClient *RancherClient) *RestoreFromBackupInputClient {
+ return &RestoreFromBackupInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *RestoreFromBackupInputClient) Create(container *RestoreFromBackupInput) (*RestoreFromBackupInput, error) {
+ resp := &RestoreFromBackupInput{}
+ err := c.rancherClient.doCreate(RESTORE_FROM_BACKUP_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *RestoreFromBackupInputClient) Update(existing *RestoreFromBackupInput, updates interface{}) (*RestoreFromBackupInput, error) {
+ resp := &RestoreFromBackupInput{}
+ err := c.rancherClient.doUpdate(RESTORE_FROM_BACKUP_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *RestoreFromBackupInputClient) List(opts *ListOpts) (*RestoreFromBackupInputCollection, error) {
+ resp := &RestoreFromBackupInputCollection{}
+ err := c.rancherClient.doList(RESTORE_FROM_BACKUP_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *RestoreFromBackupInputCollection) Next() (*RestoreFromBackupInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &RestoreFromBackupInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *RestoreFromBackupInputClient) ById(id string) (*RestoreFromBackupInput, error) {
+ resp := &RestoreFromBackupInput{}
+ err := c.rancherClient.doById(RESTORE_FROM_BACKUP_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *RestoreFromBackupInputClient) Delete(container *RestoreFromBackupInput) error {
+ return c.rancherClient.doResourceDelete(RESTORE_FROM_BACKUP_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_revert_to_snapshot_input.go b/vendor/github.com/rancher/go-rancher/client/generated_revert_to_snapshot_input.go
new file mode 100644
index 00000000..0612f818
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_revert_to_snapshot_input.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ REVERT_TO_SNAPSHOT_INPUT_TYPE = "revertToSnapshotInput"
+)
+
+type RevertToSnapshotInput struct {
+ Resource
+
+ SnapshotId string `json:"snapshotId,omitempty" yaml:"snapshot_id,omitempty"`
+}
+
+type RevertToSnapshotInputCollection struct {
+ Collection
+ Data []RevertToSnapshotInput `json:"data,omitempty"`
+ client *RevertToSnapshotInputClient
+}
+
+type RevertToSnapshotInputClient struct {
+ rancherClient *RancherClient
+}
+
+type RevertToSnapshotInputOperations interface {
+ List(opts *ListOpts) (*RevertToSnapshotInputCollection, error)
+ Create(opts *RevertToSnapshotInput) (*RevertToSnapshotInput, error)
+ Update(existing *RevertToSnapshotInput, updates interface{}) (*RevertToSnapshotInput, error)
+ ById(id string) (*RevertToSnapshotInput, error)
+ Delete(container *RevertToSnapshotInput) error
+}
+
+func newRevertToSnapshotInputClient(rancherClient *RancherClient) *RevertToSnapshotInputClient {
+ return &RevertToSnapshotInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *RevertToSnapshotInputClient) Create(container *RevertToSnapshotInput) (*RevertToSnapshotInput, error) {
+ resp := &RevertToSnapshotInput{}
+ err := c.rancherClient.doCreate(REVERT_TO_SNAPSHOT_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *RevertToSnapshotInputClient) Update(existing *RevertToSnapshotInput, updates interface{}) (*RevertToSnapshotInput, error) {
+ resp := &RevertToSnapshotInput{}
+ err := c.rancherClient.doUpdate(REVERT_TO_SNAPSHOT_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *RevertToSnapshotInputClient) List(opts *ListOpts) (*RevertToSnapshotInputCollection, error) {
+ resp := &RevertToSnapshotInputCollection{}
+ err := c.rancherClient.doList(REVERT_TO_SNAPSHOT_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *RevertToSnapshotInputCollection) Next() (*RevertToSnapshotInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &RevertToSnapshotInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *RevertToSnapshotInputClient) ById(id string) (*RevertToSnapshotInput, error) {
+ resp := &RevertToSnapshotInput{}
+ err := c.rancherClient.doById(REVERT_TO_SNAPSHOT_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *RevertToSnapshotInputClient) Delete(container *RevertToSnapshotInput) error {
+ return c.rancherClient.doResourceDelete(REVERT_TO_SNAPSHOT_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_rolling_restart_strategy.go b/vendor/github.com/rancher/go-rancher/client/generated_rolling_restart_strategy.go
new file mode 100644
index 00000000..f2384cde
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_rolling_restart_strategy.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ ROLLING_RESTART_STRATEGY_TYPE = "rollingRestartStrategy"
+)
+
+type RollingRestartStrategy struct {
+ Resource
+
+ BatchSize int64 `json:"batchSize,omitempty" yaml:"batch_size,omitempty"`
+
+ IntervalMillis int64 `json:"intervalMillis,omitempty" yaml:"interval_millis,omitempty"`
+}
+
+type RollingRestartStrategyCollection struct {
+ Collection
+ Data []RollingRestartStrategy `json:"data,omitempty"`
+ client *RollingRestartStrategyClient
+}
+
+type RollingRestartStrategyClient struct {
+ rancherClient *RancherClient
+}
+
+type RollingRestartStrategyOperations interface {
+ List(opts *ListOpts) (*RollingRestartStrategyCollection, error)
+ Create(opts *RollingRestartStrategy) (*RollingRestartStrategy, error)
+ Update(existing *RollingRestartStrategy, updates interface{}) (*RollingRestartStrategy, error)
+ ById(id string) (*RollingRestartStrategy, error)
+ Delete(container *RollingRestartStrategy) error
+}
+
+func newRollingRestartStrategyClient(rancherClient *RancherClient) *RollingRestartStrategyClient {
+ return &RollingRestartStrategyClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *RollingRestartStrategyClient) Create(container *RollingRestartStrategy) (*RollingRestartStrategy, error) {
+ resp := &RollingRestartStrategy{}
+ err := c.rancherClient.doCreate(ROLLING_RESTART_STRATEGY_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *RollingRestartStrategyClient) Update(existing *RollingRestartStrategy, updates interface{}) (*RollingRestartStrategy, error) {
+ resp := &RollingRestartStrategy{}
+ err := c.rancherClient.doUpdate(ROLLING_RESTART_STRATEGY_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *RollingRestartStrategyClient) List(opts *ListOpts) (*RollingRestartStrategyCollection, error) {
+ resp := &RollingRestartStrategyCollection{}
+ err := c.rancherClient.doList(ROLLING_RESTART_STRATEGY_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *RollingRestartStrategyCollection) Next() (*RollingRestartStrategyCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &RollingRestartStrategyCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *RollingRestartStrategyClient) ById(id string) (*RollingRestartStrategy, error) {
+ resp := &RollingRestartStrategy{}
+ err := c.rancherClient.doById(ROLLING_RESTART_STRATEGY_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *RollingRestartStrategyClient) Delete(container *RollingRestartStrategy) error {
+ return c.rancherClient.doResourceDelete(ROLLING_RESTART_STRATEGY_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_scale_policy.go b/vendor/github.com/rancher/go-rancher/client/generated_scale_policy.go
new file mode 100644
index 00000000..eb0ac83a
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_scale_policy.go
@@ -0,0 +1,83 @@
+package client
+
+const (
+ SCALE_POLICY_TYPE = "scalePolicy"
+)
+
+type ScalePolicy struct {
+ Resource
+
+ Increment int64 `json:"increment,omitempty" yaml:"increment,omitempty"`
+
+ Max int64 `json:"max,omitempty" yaml:"max,omitempty"`
+
+ Min int64 `json:"min,omitempty" yaml:"min,omitempty"`
+}
+
+type ScalePolicyCollection struct {
+ Collection
+ Data []ScalePolicy `json:"data,omitempty"`
+ client *ScalePolicyClient
+}
+
+type ScalePolicyClient struct {
+ rancherClient *RancherClient
+}
+
+type ScalePolicyOperations interface {
+ List(opts *ListOpts) (*ScalePolicyCollection, error)
+ Create(opts *ScalePolicy) (*ScalePolicy, error)
+ Update(existing *ScalePolicy, updates interface{}) (*ScalePolicy, error)
+ ById(id string) (*ScalePolicy, error)
+ Delete(container *ScalePolicy) error
+}
+
+func newScalePolicyClient(rancherClient *RancherClient) *ScalePolicyClient {
+ return &ScalePolicyClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ScalePolicyClient) Create(container *ScalePolicy) (*ScalePolicy, error) {
+ resp := &ScalePolicy{}
+ err := c.rancherClient.doCreate(SCALE_POLICY_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ScalePolicyClient) Update(existing *ScalePolicy, updates interface{}) (*ScalePolicy, error) {
+ resp := &ScalePolicy{}
+ err := c.rancherClient.doUpdate(SCALE_POLICY_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ScalePolicyClient) List(opts *ListOpts) (*ScalePolicyCollection, error) {
+ resp := &ScalePolicyCollection{}
+ err := c.rancherClient.doList(SCALE_POLICY_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ScalePolicyCollection) Next() (*ScalePolicyCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ScalePolicyCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ScalePolicyClient) ById(id string) (*ScalePolicy, error) {
+ resp := &ScalePolicy{}
+ err := c.rancherClient.doById(SCALE_POLICY_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ScalePolicyClient) Delete(container *ScalePolicy) error {
+ return c.rancherClient.doResourceDelete(SCALE_POLICY_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_secondary_launch_config.go b/vendor/github.com/rancher/go-rancher/client/generated_secondary_launch_config.go
new file mode 100644
index 00000000..5561fad8
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_secondary_launch_config.go
@@ -0,0 +1,444 @@
+package client
+
+const (
+ SECONDARY_LAUNCH_CONFIG_TYPE = "secondaryLaunchConfig"
+)
+
+type SecondaryLaunchConfig struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"`
+
+ AllocationState string `json:"allocationState,omitempty" yaml:"allocation_state,omitempty"`
+
+ BlkioDeviceOptions map[string]interface{} `json:"blkioDeviceOptions,omitempty" yaml:"blkio_device_options,omitempty"`
+
+ Build *DockerBuild `json:"build,omitempty" yaml:"build,omitempty"`
+
+ CapAdd []string `json:"capAdd,omitempty" yaml:"cap_add,omitempty"`
+
+ CapDrop []string `json:"capDrop,omitempty" yaml:"cap_drop,omitempty"`
+
+ Command []string `json:"command,omitempty" yaml:"command,omitempty"`
+
+ Count int64 `json:"count,omitempty" yaml:"count,omitempty"`
+
+ CpuSet string `json:"cpuSet,omitempty" yaml:"cpu_set,omitempty"`
+
+ CpuShares int64 `json:"cpuShares,omitempty" yaml:"cpu_shares,omitempty"`
+
+ CreateIndex int64 `json:"createIndex,omitempty" yaml:"create_index,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ DataVolumeMounts map[string]interface{} `json:"dataVolumeMounts,omitempty" yaml:"data_volume_mounts,omitempty"`
+
+ DataVolumes []string `json:"dataVolumes,omitempty" yaml:"data_volumes,omitempty"`
+
+ DataVolumesFrom []string `json:"dataVolumesFrom,omitempty" yaml:"data_volumes_from,omitempty"`
+
+ DataVolumesFromLaunchConfigs []string `json:"dataVolumesFromLaunchConfigs,omitempty" yaml:"data_volumes_from_launch_configs,omitempty"`
+
+ DeploymentUnitUuid string `json:"deploymentUnitUuid,omitempty" yaml:"deployment_unit_uuid,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Devices []string `json:"devices,omitempty" yaml:"devices,omitempty"`
+
+ Disks []interface{} `json:"disks,omitempty" yaml:"disks,omitempty"`
+
+ Dns []string `json:"dns,omitempty" yaml:"dns,omitempty"`
+
+ DnsSearch []string `json:"dnsSearch,omitempty" yaml:"dns_search,omitempty"`
+
+ DomainName string `json:"domainName,omitempty" yaml:"domain_name,omitempty"`
+
+ EntryPoint []string `json:"entryPoint,omitempty" yaml:"entry_point,omitempty"`
+
+ Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"`
+
+ Expose []string `json:"expose,omitempty" yaml:"expose,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ ExtraHosts []string `json:"extraHosts,omitempty" yaml:"extra_hosts,omitempty"`
+
+ FirstRunning string `json:"firstRunning,omitempty" yaml:"first_running,omitempty"`
+
+ HealthCheck *InstanceHealthCheck `json:"healthCheck,omitempty" yaml:"health_check,omitempty"`
+
+ HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
+
+ HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
+
+ Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
+
+ ImageUuid string `json:"imageUuid,omitempty" yaml:"image_uuid,omitempty"`
+
+ InstanceLinks map[string]interface{} `json:"instanceLinks,omitempty" yaml:"instance_links,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"`
+
+ LogConfig *LogConfig `json:"logConfig,omitempty" yaml:"log_config,omitempty"`
+
+ LxcConf map[string]interface{} `json:"lxcConf,omitempty" yaml:"lxc_conf,omitempty"`
+
+ Memory int64 `json:"memory,omitempty" yaml:"memory,omitempty"`
+
+ MemoryMb int64 `json:"memoryMb,omitempty" yaml:"memory_mb,omitempty"`
+
+ MemorySwap int64 `json:"memorySwap,omitempty" yaml:"memory_swap,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ NativeContainer bool `json:"nativeContainer,omitempty" yaml:"native_container,omitempty"`
+
+ NetworkContainerId string `json:"networkContainerId,omitempty" yaml:"network_container_id,omitempty"`
+
+ NetworkIds []string `json:"networkIds,omitempty" yaml:"network_ids,omitempty"`
+
+ NetworkLaunchConfig string `json:"networkLaunchConfig,omitempty" yaml:"network_launch_config,omitempty"`
+
+ NetworkMode string `json:"networkMode,omitempty" yaml:"network_mode,omitempty"`
+
+ PidMode string `json:"pidMode,omitempty" yaml:"pid_mode,omitempty"`
+
+ Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"`
+
+ PrimaryIpAddress string `json:"primaryIpAddress,omitempty" yaml:"primary_ip_address,omitempty"`
+
+ Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"`
+
+ PublishAllPorts bool `json:"publishAllPorts,omitempty" yaml:"publish_all_ports,omitempty"`
+
+ ReadOnly bool `json:"readOnly,omitempty" yaml:"read_only,omitempty"`
+
+ RegistryCredentialId string `json:"registryCredentialId,omitempty" yaml:"registry_credential_id,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ RequestedHostId string `json:"requestedHostId,omitempty" yaml:"requested_host_id,omitempty"`
+
+ RequestedIpAddress string `json:"requestedIpAddress,omitempty" yaml:"requested_ip_address,omitempty"`
+
+ SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"`
+
+ StartCount int64 `json:"startCount,omitempty" yaml:"start_count,omitempty"`
+
+ StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ StdinOpen bool `json:"stdinOpen,omitempty" yaml:"stdin_open,omitempty"`
+
+ SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"`
+
+ Token string `json:"token,omitempty" yaml:"token,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Tty bool `json:"tty,omitempty" yaml:"tty,omitempty"`
+
+ User string `json:"user,omitempty" yaml:"user,omitempty"`
+
+ Userdata string `json:"userdata,omitempty" yaml:"userdata,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ Vcpu int64 `json:"vcpu,omitempty" yaml:"vcpu,omitempty"`
+
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+
+ VolumeDriver string `json:"volumeDriver,omitempty" yaml:"volume_driver,omitempty"`
+
+ WorkingDir string `json:"workingDir,omitempty" yaml:"working_dir,omitempty"`
+}
+
+type SecondaryLaunchConfigCollection struct {
+ Collection
+ Data []SecondaryLaunchConfig `json:"data,omitempty"`
+ client *SecondaryLaunchConfigClient
+}
+
+type SecondaryLaunchConfigClient struct {
+ rancherClient *RancherClient
+}
+
+type SecondaryLaunchConfigOperations interface {
+ List(opts *ListOpts) (*SecondaryLaunchConfigCollection, error)
+ Create(opts *SecondaryLaunchConfig) (*SecondaryLaunchConfig, error)
+ Update(existing *SecondaryLaunchConfig, updates interface{}) (*SecondaryLaunchConfig, error)
+ ById(id string) (*SecondaryLaunchConfig, error)
+ Delete(container *SecondaryLaunchConfig) error
+
+ ActionAllocate(*SecondaryLaunchConfig) (*Instance, error)
+
+ ActionConsole(*SecondaryLaunchConfig, *InstanceConsoleInput) (*InstanceConsole, error)
+
+ ActionCreate(*SecondaryLaunchConfig) (*Instance, error)
+
+ ActionDeallocate(*SecondaryLaunchConfig) (*Instance, error)
+
+ ActionError(*SecondaryLaunchConfig) (*Instance, error)
+
+ ActionExecute(*SecondaryLaunchConfig, *ContainerExec) (*HostAccess, error)
+
+ ActionMigrate(*SecondaryLaunchConfig) (*Instance, error)
+
+ ActionProxy(*SecondaryLaunchConfig, *ContainerProxy) (*HostAccess, error)
+
+ ActionPurge(*SecondaryLaunchConfig) (*Instance, error)
+
+ ActionRemove(*SecondaryLaunchConfig) (*Instance, error)
+
+ ActionRestart(*SecondaryLaunchConfig) (*Instance, error)
+
+ ActionRestore(*SecondaryLaunchConfig) (*Instance, error)
+
+ ActionSetlabels(*SecondaryLaunchConfig, *SetLabelsInput) (*Container, error)
+
+ ActionStart(*SecondaryLaunchConfig) (*Instance, error)
+
+ ActionStop(*SecondaryLaunchConfig, *InstanceStop) (*Instance, error)
+
+ ActionUpdate(*SecondaryLaunchConfig) (*Instance, error)
+
+ ActionUpdatehealthy(*SecondaryLaunchConfig) (*Instance, error)
+
+ ActionUpdatereinitializing(*SecondaryLaunchConfig) (*Instance, error)
+
+ ActionUpdateunhealthy(*SecondaryLaunchConfig) (*Instance, error)
+}
+
+func newSecondaryLaunchConfigClient(rancherClient *RancherClient) *SecondaryLaunchConfigClient {
+ return &SecondaryLaunchConfigClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *SecondaryLaunchConfigClient) Create(container *SecondaryLaunchConfig) (*SecondaryLaunchConfig, error) {
+ resp := &SecondaryLaunchConfig{}
+ err := c.rancherClient.doCreate(SECONDARY_LAUNCH_CONFIG_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) Update(existing *SecondaryLaunchConfig, updates interface{}) (*SecondaryLaunchConfig, error) {
+ resp := &SecondaryLaunchConfig{}
+ err := c.rancherClient.doUpdate(SECONDARY_LAUNCH_CONFIG_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) List(opts *ListOpts) (*SecondaryLaunchConfigCollection, error) {
+ resp := &SecondaryLaunchConfigCollection{}
+ err := c.rancherClient.doList(SECONDARY_LAUNCH_CONFIG_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *SecondaryLaunchConfigCollection) Next() (*SecondaryLaunchConfigCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &SecondaryLaunchConfigCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *SecondaryLaunchConfigClient) ById(id string) (*SecondaryLaunchConfig, error) {
+ resp := &SecondaryLaunchConfig{}
+ err := c.rancherClient.doById(SECONDARY_LAUNCH_CONFIG_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) Delete(container *SecondaryLaunchConfig) error {
+ return c.rancherClient.doResourceDelete(SECONDARY_LAUNCH_CONFIG_TYPE, &container.Resource)
+}
+
+func (c *SecondaryLaunchConfigClient) ActionAllocate(resource *SecondaryLaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "allocate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionConsole(resource *SecondaryLaunchConfig, input *InstanceConsoleInput) (*InstanceConsole, error) {
+
+ resp := &InstanceConsole{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "console", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionCreate(resource *SecondaryLaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionDeallocate(resource *SecondaryLaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "deallocate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionError(resource *SecondaryLaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "error", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionExecute(resource *SecondaryLaunchConfig, input *ContainerExec) (*HostAccess, error) {
+
+ resp := &HostAccess{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "execute", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionMigrate(resource *SecondaryLaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "migrate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionProxy(resource *SecondaryLaunchConfig, input *ContainerProxy) (*HostAccess, error) {
+
+ resp := &HostAccess{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "proxy", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionPurge(resource *SecondaryLaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionRemove(resource *SecondaryLaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionRestart(resource *SecondaryLaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "restart", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionRestore(resource *SecondaryLaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionSetlabels(resource *SecondaryLaunchConfig, input *SetLabelsInput) (*Container, error) {
+
+ resp := &Container{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "setlabels", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionStart(resource *SecondaryLaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "start", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionStop(resource *SecondaryLaunchConfig, input *InstanceStop) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "stop", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionUpdate(resource *SecondaryLaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionUpdatehealthy(resource *SecondaryLaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "updatehealthy", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionUpdatereinitializing(resource *SecondaryLaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "updatereinitializing", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SecondaryLaunchConfigClient) ActionUpdateunhealthy(resource *SecondaryLaunchConfig) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "updateunhealthy", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service.go b/vendor/github.com/rancher/go-rancher/client/generated_service.go
new file mode 100644
index 00000000..0fd19891
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_service.go
@@ -0,0 +1,295 @@
+package client
+
+const (
+ SERVICE_TYPE = "service"
+)
+
+type Service struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ AssignServiceIpAddress bool `json:"assignServiceIpAddress,omitempty" yaml:"assign_service_ip_address,omitempty"`
+
+ CreateIndex int64 `json:"createIndex,omitempty" yaml:"create_index,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ CurrentScale int64 `json:"currentScale,omitempty" yaml:"current_scale,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"`
+
+ HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"`
+
+ Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ RetainIp bool `json:"retainIp,omitempty" yaml:"retain_ip,omitempty"`
+
+ Scale int64 `json:"scale,omitempty" yaml:"scale,omitempty"`
+
+ ScalePolicy *ScalePolicy `json:"scalePolicy,omitempty" yaml:"scale_policy,omitempty"`
+
+ SecondaryLaunchConfigs []interface{} `json:"secondaryLaunchConfigs,omitempty" yaml:"secondary_launch_configs,omitempty"`
+
+ SelectorContainer string `json:"selectorContainer,omitempty" yaml:"selector_container,omitempty"`
+
+ SelectorLink string `json:"selectorLink,omitempty" yaml:"selector_link,omitempty"`
+
+ StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Upgrade *ServiceUpgrade `json:"upgrade,omitempty" yaml:"upgrade,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ Vip string `json:"vip,omitempty" yaml:"vip,omitempty"`
+}
+
+type ServiceCollection struct {
+ Collection
+ Data []Service `json:"data,omitempty"`
+ client *ServiceClient
+}
+
+type ServiceClient struct {
+ rancherClient *RancherClient
+}
+
+type ServiceOperations interface {
+ List(opts *ListOpts) (*ServiceCollection, error)
+ Create(opts *Service) (*Service, error)
+ Update(existing *Service, updates interface{}) (*Service, error)
+ ById(id string) (*Service, error)
+ Delete(container *Service) error
+
+ ActionActivate(*Service) (*Service, error)
+
+ ActionAddservicelink(*Service, *AddRemoveServiceLinkInput) (*Service, error)
+
+ ActionCancelrollback(*Service) (*Service, error)
+
+ ActionCancelupgrade(*Service) (*Service, error)
+
+ ActionCreate(*Service) (*Service, error)
+
+ ActionDeactivate(*Service) (*Service, error)
+
+ ActionFinishupgrade(*Service) (*Service, error)
+
+ ActionRemove(*Service) (*Service, error)
+
+ ActionRemoveservicelink(*Service, *AddRemoveServiceLinkInput) (*Service, error)
+
+ ActionRestart(*Service, *ServiceRestart) (*Service, error)
+
+ ActionRollback(*Service) (*Service, error)
+
+ ActionSetservicelinks(*Service, *SetServiceLinksInput) (*Service, error)
+
+ ActionUpdate(*Service) (*Service, error)
+
+ ActionUpgrade(*Service, *ServiceUpgrade) (*Service, error)
+}
+
+func newServiceClient(rancherClient *RancherClient) *ServiceClient {
+ return &ServiceClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ServiceClient) Create(container *Service) (*Service, error) {
+ resp := &Service{}
+ err := c.rancherClient.doCreate(SERVICE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ServiceClient) Update(existing *Service, updates interface{}) (*Service, error) {
+ resp := &Service{}
+ err := c.rancherClient.doUpdate(SERVICE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ServiceClient) List(opts *ListOpts) (*ServiceCollection, error) {
+ resp := &ServiceCollection{}
+ err := c.rancherClient.doList(SERVICE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ServiceCollection) Next() (*ServiceCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ServiceCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ServiceClient) ById(id string) (*Service, error) {
+ resp := &Service{}
+ err := c.rancherClient.doById(SERVICE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ServiceClient) Delete(container *Service) error {
+ return c.rancherClient.doResourceDelete(SERVICE_TYPE, &container.Resource)
+}
+
+func (c *ServiceClient) ActionActivate(resource *Service) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(SERVICE_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ServiceClient) ActionAddservicelink(resource *Service, input *AddRemoveServiceLinkInput) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(SERVICE_TYPE, "addservicelink", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *ServiceClient) ActionCancelrollback(resource *Service) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ServiceClient) ActionCancelupgrade(resource *Service) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ServiceClient) ActionCreate(resource *Service) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(SERVICE_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ServiceClient) ActionDeactivate(resource *Service) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(SERVICE_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ServiceClient) ActionFinishupgrade(resource *Service) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ServiceClient) ActionRemove(resource *Service) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(SERVICE_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ServiceClient) ActionRemoveservicelink(resource *Service, input *AddRemoveServiceLinkInput) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(SERVICE_TYPE, "removeservicelink", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *ServiceClient) ActionRestart(resource *Service, input *ServiceRestart) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(SERVICE_TYPE, "restart", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *ServiceClient) ActionRollback(resource *Service) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(SERVICE_TYPE, "rollback", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ServiceClient) ActionSetservicelinks(resource *Service, input *SetServiceLinksInput) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(SERVICE_TYPE, "setservicelinks", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *ServiceClient) ActionUpdate(resource *Service) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(SERVICE_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ServiceClient) ActionUpgrade(resource *Service, input *ServiceUpgrade) (*Service, error) {
+
+ resp := &Service{}
+
+ err := c.rancherClient.doAction(SERVICE_TYPE, "upgrade", &resource.Resource, input, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_consume_map.go b/vendor/github.com/rancher/go-rancher/client/generated_service_consume_map.go
new file mode 100644
index 00000000..138afde3
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_service_consume_map.go
@@ -0,0 +1,142 @@
+package client
+
+const (
+ SERVICE_CONSUME_MAP_TYPE = "serviceConsumeMap"
+)
+
+type ServiceConsumeMap struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ ConsumedServiceId string `json:"consumedServiceId,omitempty" yaml:"consumed_service_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ ServiceId string `json:"serviceId,omitempty" yaml:"service_id,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ServiceConsumeMapCollection struct {
+ Collection
+ Data []ServiceConsumeMap `json:"data,omitempty"`
+ client *ServiceConsumeMapClient
+}
+
+type ServiceConsumeMapClient struct {
+ rancherClient *RancherClient
+}
+
+type ServiceConsumeMapOperations interface {
+ List(opts *ListOpts) (*ServiceConsumeMapCollection, error)
+ Create(opts *ServiceConsumeMap) (*ServiceConsumeMap, error)
+ Update(existing *ServiceConsumeMap, updates interface{}) (*ServiceConsumeMap, error)
+ ById(id string) (*ServiceConsumeMap, error)
+ Delete(container *ServiceConsumeMap) error
+
+ ActionCreate(*ServiceConsumeMap) (*ServiceConsumeMap, error)
+
+ ActionRemove(*ServiceConsumeMap) (*ServiceConsumeMap, error)
+
+ ActionUpdate(*ServiceConsumeMap) (*ServiceConsumeMap, error)
+}
+
+func newServiceConsumeMapClient(rancherClient *RancherClient) *ServiceConsumeMapClient {
+ return &ServiceConsumeMapClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ServiceConsumeMapClient) Create(container *ServiceConsumeMap) (*ServiceConsumeMap, error) {
+ resp := &ServiceConsumeMap{}
+ err := c.rancherClient.doCreate(SERVICE_CONSUME_MAP_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ServiceConsumeMapClient) Update(existing *ServiceConsumeMap, updates interface{}) (*ServiceConsumeMap, error) {
+ resp := &ServiceConsumeMap{}
+ err := c.rancherClient.doUpdate(SERVICE_CONSUME_MAP_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ServiceConsumeMapClient) List(opts *ListOpts) (*ServiceConsumeMapCollection, error) {
+ resp := &ServiceConsumeMapCollection{}
+ err := c.rancherClient.doList(SERVICE_CONSUME_MAP_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ServiceConsumeMapCollection) Next() (*ServiceConsumeMapCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ServiceConsumeMapCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ServiceConsumeMapClient) ById(id string) (*ServiceConsumeMap, error) {
+ resp := &ServiceConsumeMap{}
+ err := c.rancherClient.doById(SERVICE_CONSUME_MAP_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ServiceConsumeMapClient) Delete(container *ServiceConsumeMap) error {
+ return c.rancherClient.doResourceDelete(SERVICE_CONSUME_MAP_TYPE, &container.Resource)
+}
+
+func (c *ServiceConsumeMapClient) ActionCreate(resource *ServiceConsumeMap) (*ServiceConsumeMap, error) {
+
+ resp := &ServiceConsumeMap{}
+
+ err := c.rancherClient.doAction(SERVICE_CONSUME_MAP_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ServiceConsumeMapClient) ActionRemove(resource *ServiceConsumeMap) (*ServiceConsumeMap, error) {
+
+ resp := &ServiceConsumeMap{}
+
+ err := c.rancherClient.doAction(SERVICE_CONSUME_MAP_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ServiceConsumeMapClient) ActionUpdate(resource *ServiceConsumeMap) (*ServiceConsumeMap, error) {
+
+ resp := &ServiceConsumeMap{}
+
+ err := c.rancherClient.doAction(SERVICE_CONSUME_MAP_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_event.go b/vendor/github.com/rancher/go-rancher/client/generated_service_event.go
new file mode 100644
index 00000000..71b3082f
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_service_event.go
@@ -0,0 +1,135 @@
+package client
+
+const (
+ SERVICE_EVENT_TYPE = "serviceEvent"
+)
+
+type ServiceEvent struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ ExternalTimestamp int64 `json:"externalTimestamp,omitempty" yaml:"external_timestamp,omitempty"`
+
+ HealthcheckUuid string `json:"healthcheckUuid,omitempty" yaml:"healthcheck_uuid,omitempty"`
+
+ HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
+
+ InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ ReportedHealth string `json:"reportedHealth,omitempty" yaml:"reported_health,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ServiceEventCollection struct {
+ Collection
+ Data []ServiceEvent `json:"data,omitempty"`
+ client *ServiceEventClient
+}
+
+type ServiceEventClient struct {
+ rancherClient *RancherClient
+}
+
+type ServiceEventOperations interface {
+ List(opts *ListOpts) (*ServiceEventCollection, error)
+ Create(opts *ServiceEvent) (*ServiceEvent, error)
+ Update(existing *ServiceEvent, updates interface{}) (*ServiceEvent, error)
+ ById(id string) (*ServiceEvent, error)
+ Delete(container *ServiceEvent) error
+
+ ActionCreate(*ServiceEvent) (*ServiceEvent, error)
+
+ ActionRemove(*ServiceEvent) (*ServiceEvent, error)
+}
+
+func newServiceEventClient(rancherClient *RancherClient) *ServiceEventClient {
+ return &ServiceEventClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ServiceEventClient) Create(container *ServiceEvent) (*ServiceEvent, error) {
+ resp := &ServiceEvent{}
+ err := c.rancherClient.doCreate(SERVICE_EVENT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ServiceEventClient) Update(existing *ServiceEvent, updates interface{}) (*ServiceEvent, error) {
+ resp := &ServiceEvent{}
+ err := c.rancherClient.doUpdate(SERVICE_EVENT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ServiceEventClient) List(opts *ListOpts) (*ServiceEventCollection, error) {
+ resp := &ServiceEventCollection{}
+ err := c.rancherClient.doList(SERVICE_EVENT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ServiceEventCollection) Next() (*ServiceEventCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ServiceEventCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ServiceEventClient) ById(id string) (*ServiceEvent, error) {
+ resp := &ServiceEvent{}
+ err := c.rancherClient.doById(SERVICE_EVENT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ServiceEventClient) Delete(container *ServiceEvent) error {
+ return c.rancherClient.doResourceDelete(SERVICE_EVENT_TYPE, &container.Resource)
+}
+
+func (c *ServiceEventClient) ActionCreate(resource *ServiceEvent) (*ServiceEvent, error) {
+
+ resp := &ServiceEvent{}
+
+ err := c.rancherClient.doAction(SERVICE_EVENT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ServiceEventClient) ActionRemove(resource *ServiceEvent) (*ServiceEvent, error) {
+
+ resp := &ServiceEvent{}
+
+ err := c.rancherClient.doAction(SERVICE_EVENT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_expose_map.go b/vendor/github.com/rancher/go-rancher/client/generated_service_expose_map.go
new file mode 100644
index 00000000..06453bf4
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_service_expose_map.go
@@ -0,0 +1,133 @@
+package client
+
+const (
+ SERVICE_EXPOSE_MAP_TYPE = "serviceExposeMap"
+)
+
+type ServiceExposeMap struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"`
+
+ IpAddress string `json:"ipAddress,omitempty" yaml:"ip_address,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Managed bool `json:"managed,omitempty" yaml:"managed,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ ServiceId string `json:"serviceId,omitempty" yaml:"service_id,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ServiceExposeMapCollection struct {
+ Collection
+ Data []ServiceExposeMap `json:"data,omitempty"`
+ client *ServiceExposeMapClient
+}
+
+type ServiceExposeMapClient struct {
+ rancherClient *RancherClient
+}
+
+type ServiceExposeMapOperations interface {
+ List(opts *ListOpts) (*ServiceExposeMapCollection, error)
+ Create(opts *ServiceExposeMap) (*ServiceExposeMap, error)
+ Update(existing *ServiceExposeMap, updates interface{}) (*ServiceExposeMap, error)
+ ById(id string) (*ServiceExposeMap, error)
+ Delete(container *ServiceExposeMap) error
+
+ ActionCreate(*ServiceExposeMap) (*ServiceExposeMap, error)
+
+ ActionRemove(*ServiceExposeMap) (*ServiceExposeMap, error)
+}
+
+func newServiceExposeMapClient(rancherClient *RancherClient) *ServiceExposeMapClient {
+ return &ServiceExposeMapClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ServiceExposeMapClient) Create(container *ServiceExposeMap) (*ServiceExposeMap, error) {
+ resp := &ServiceExposeMap{}
+ err := c.rancherClient.doCreate(SERVICE_EXPOSE_MAP_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ServiceExposeMapClient) Update(existing *ServiceExposeMap, updates interface{}) (*ServiceExposeMap, error) {
+ resp := &ServiceExposeMap{}
+ err := c.rancherClient.doUpdate(SERVICE_EXPOSE_MAP_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ServiceExposeMapClient) List(opts *ListOpts) (*ServiceExposeMapCollection, error) {
+ resp := &ServiceExposeMapCollection{}
+ err := c.rancherClient.doList(SERVICE_EXPOSE_MAP_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ServiceExposeMapCollection) Next() (*ServiceExposeMapCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ServiceExposeMapCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ServiceExposeMapClient) ById(id string) (*ServiceExposeMap, error) {
+ resp := &ServiceExposeMap{}
+ err := c.rancherClient.doById(SERVICE_EXPOSE_MAP_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ServiceExposeMapClient) Delete(container *ServiceExposeMap) error {
+ return c.rancherClient.doResourceDelete(SERVICE_EXPOSE_MAP_TYPE, &container.Resource)
+}
+
+func (c *ServiceExposeMapClient) ActionCreate(resource *ServiceExposeMap) (*ServiceExposeMap, error) {
+
+ resp := &ServiceExposeMap{}
+
+ err := c.rancherClient.doAction(SERVICE_EXPOSE_MAP_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *ServiceExposeMapClient) ActionRemove(resource *ServiceExposeMap) (*ServiceExposeMap, error) {
+
+ resp := &ServiceExposeMap{}
+
+ err := c.rancherClient.doAction(SERVICE_EXPOSE_MAP_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_link.go b/vendor/github.com/rancher/go-rancher/client/generated_service_link.go
new file mode 100644
index 00000000..9532b2a3
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_service_link.go
@@ -0,0 +1,83 @@
+package client
+
+const (
+ SERVICE_LINK_TYPE = "serviceLink"
+)
+
+type ServiceLink struct {
+ Resource
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ ServiceId string `json:"serviceId,omitempty" yaml:"service_id,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type ServiceLinkCollection struct {
+ Collection
+ Data []ServiceLink `json:"data,omitempty"`
+ client *ServiceLinkClient
+}
+
+type ServiceLinkClient struct {
+ rancherClient *RancherClient
+}
+
+type ServiceLinkOperations interface {
+ List(opts *ListOpts) (*ServiceLinkCollection, error)
+ Create(opts *ServiceLink) (*ServiceLink, error)
+ Update(existing *ServiceLink, updates interface{}) (*ServiceLink, error)
+ ById(id string) (*ServiceLink, error)
+ Delete(container *ServiceLink) error
+}
+
+func newServiceLinkClient(rancherClient *RancherClient) *ServiceLinkClient {
+ return &ServiceLinkClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ServiceLinkClient) Create(container *ServiceLink) (*ServiceLink, error) {
+ resp := &ServiceLink{}
+ err := c.rancherClient.doCreate(SERVICE_LINK_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ServiceLinkClient) Update(existing *ServiceLink, updates interface{}) (*ServiceLink, error) {
+ resp := &ServiceLink{}
+ err := c.rancherClient.doUpdate(SERVICE_LINK_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ServiceLinkClient) List(opts *ListOpts) (*ServiceLinkCollection, error) {
+ resp := &ServiceLinkCollection{}
+ err := c.rancherClient.doList(SERVICE_LINK_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ServiceLinkCollection) Next() (*ServiceLinkCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ServiceLinkCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ServiceLinkClient) ById(id string) (*ServiceLink, error) {
+ resp := &ServiceLink{}
+ err := c.rancherClient.doById(SERVICE_LINK_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ServiceLinkClient) Delete(container *ServiceLink) error {
+ return c.rancherClient.doResourceDelete(SERVICE_LINK_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_proxy.go b/vendor/github.com/rancher/go-rancher/client/generated_service_proxy.go
new file mode 100644
index 00000000..2af160e9
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_service_proxy.go
@@ -0,0 +1,87 @@
+package client
+
+const (
+ SERVICE_PROXY_TYPE = "serviceProxy"
+)
+
+type ServiceProxy struct {
+ Resource
+
+ Port int64 `json:"port,omitempty" yaml:"port,omitempty"`
+
+ Scheme string `json:"scheme,omitempty" yaml:"scheme,omitempty"`
+
+ Service string `json:"service,omitempty" yaml:"service,omitempty"`
+
+ Token string `json:"token,omitempty" yaml:"token,omitempty"`
+
+ Url string `json:"url,omitempty" yaml:"url,omitempty"`
+}
+
+type ServiceProxyCollection struct {
+ Collection
+ Data []ServiceProxy `json:"data,omitempty"`
+ client *ServiceProxyClient
+}
+
+type ServiceProxyClient struct {
+ rancherClient *RancherClient
+}
+
+type ServiceProxyOperations interface {
+ List(opts *ListOpts) (*ServiceProxyCollection, error)
+ Create(opts *ServiceProxy) (*ServiceProxy, error)
+ Update(existing *ServiceProxy, updates interface{}) (*ServiceProxy, error)
+ ById(id string) (*ServiceProxy, error)
+ Delete(container *ServiceProxy) error
+}
+
+func newServiceProxyClient(rancherClient *RancherClient) *ServiceProxyClient {
+ return &ServiceProxyClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ServiceProxyClient) Create(container *ServiceProxy) (*ServiceProxy, error) {
+ resp := &ServiceProxy{}
+ err := c.rancherClient.doCreate(SERVICE_PROXY_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ServiceProxyClient) Update(existing *ServiceProxy, updates interface{}) (*ServiceProxy, error) {
+ resp := &ServiceProxy{}
+ err := c.rancherClient.doUpdate(SERVICE_PROXY_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ServiceProxyClient) List(opts *ListOpts) (*ServiceProxyCollection, error) {
+ resp := &ServiceProxyCollection{}
+ err := c.rancherClient.doList(SERVICE_PROXY_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ServiceProxyCollection) Next() (*ServiceProxyCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ServiceProxyCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ServiceProxyClient) ById(id string) (*ServiceProxy, error) {
+ resp := &ServiceProxy{}
+ err := c.rancherClient.doById(SERVICE_PROXY_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ServiceProxyClient) Delete(container *ServiceProxy) error {
+ return c.rancherClient.doResourceDelete(SERVICE_PROXY_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_restart.go b/vendor/github.com/rancher/go-rancher/client/generated_service_restart.go
new file mode 100644
index 00000000..5a470186
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_service_restart.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ SERVICE_RESTART_TYPE = "serviceRestart"
+)
+
+type ServiceRestart struct {
+ Resource
+
+ RollingRestartStrategy RollingRestartStrategy `json:"rollingRestartStrategy,omitempty" yaml:"rolling_restart_strategy,omitempty"`
+}
+
+type ServiceRestartCollection struct {
+ Collection
+ Data []ServiceRestart `json:"data,omitempty"`
+ client *ServiceRestartClient
+}
+
+type ServiceRestartClient struct {
+ rancherClient *RancherClient
+}
+
+type ServiceRestartOperations interface {
+ List(opts *ListOpts) (*ServiceRestartCollection, error)
+ Create(opts *ServiceRestart) (*ServiceRestart, error)
+ Update(existing *ServiceRestart, updates interface{}) (*ServiceRestart, error)
+ ById(id string) (*ServiceRestart, error)
+ Delete(container *ServiceRestart) error
+}
+
+func newServiceRestartClient(rancherClient *RancherClient) *ServiceRestartClient {
+ return &ServiceRestartClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ServiceRestartClient) Create(container *ServiceRestart) (*ServiceRestart, error) {
+ resp := &ServiceRestart{}
+ err := c.rancherClient.doCreate(SERVICE_RESTART_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ServiceRestartClient) Update(existing *ServiceRestart, updates interface{}) (*ServiceRestart, error) {
+ resp := &ServiceRestart{}
+ err := c.rancherClient.doUpdate(SERVICE_RESTART_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ServiceRestartClient) List(opts *ListOpts) (*ServiceRestartCollection, error) {
+ resp := &ServiceRestartCollection{}
+ err := c.rancherClient.doList(SERVICE_RESTART_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ServiceRestartCollection) Next() (*ServiceRestartCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ServiceRestartCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ServiceRestartClient) ById(id string) (*ServiceRestart, error) {
+ resp := &ServiceRestart{}
+ err := c.rancherClient.doById(SERVICE_RESTART_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ServiceRestartClient) Delete(container *ServiceRestart) error {
+ return c.rancherClient.doResourceDelete(SERVICE_RESTART_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_upgrade.go b/vendor/github.com/rancher/go-rancher/client/generated_service_upgrade.go
new file mode 100644
index 00000000..1c974816
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_service_upgrade.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ SERVICE_UPGRADE_TYPE = "serviceUpgrade"
+)
+
+type ServiceUpgrade struct {
+ Resource
+
+ InServiceStrategy *InServiceUpgradeStrategy `json:"inServiceStrategy,omitempty" yaml:"in_service_strategy,omitempty"`
+
+ ToServiceStrategy *ToServiceUpgradeStrategy `json:"toServiceStrategy,omitempty" yaml:"to_service_strategy,omitempty"`
+}
+
+type ServiceUpgradeCollection struct {
+ Collection
+ Data []ServiceUpgrade `json:"data,omitempty"`
+ client *ServiceUpgradeClient
+}
+
+type ServiceUpgradeClient struct {
+ rancherClient *RancherClient
+}
+
+type ServiceUpgradeOperations interface {
+ List(opts *ListOpts) (*ServiceUpgradeCollection, error)
+ Create(opts *ServiceUpgrade) (*ServiceUpgrade, error)
+ Update(existing *ServiceUpgrade, updates interface{}) (*ServiceUpgrade, error)
+ ById(id string) (*ServiceUpgrade, error)
+ Delete(container *ServiceUpgrade) error
+}
+
+func newServiceUpgradeClient(rancherClient *RancherClient) *ServiceUpgradeClient {
+ return &ServiceUpgradeClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ServiceUpgradeClient) Create(container *ServiceUpgrade) (*ServiceUpgrade, error) {
+ resp := &ServiceUpgrade{}
+ err := c.rancherClient.doCreate(SERVICE_UPGRADE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ServiceUpgradeClient) Update(existing *ServiceUpgrade, updates interface{}) (*ServiceUpgrade, error) {
+ resp := &ServiceUpgrade{}
+ err := c.rancherClient.doUpdate(SERVICE_UPGRADE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ServiceUpgradeClient) List(opts *ListOpts) (*ServiceUpgradeCollection, error) {
+ resp := &ServiceUpgradeCollection{}
+ err := c.rancherClient.doList(SERVICE_UPGRADE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ServiceUpgradeCollection) Next() (*ServiceUpgradeCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ServiceUpgradeCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ServiceUpgradeClient) ById(id string) (*ServiceUpgrade, error) {
+ resp := &ServiceUpgrade{}
+ err := c.rancherClient.doById(SERVICE_UPGRADE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ServiceUpgradeClient) Delete(container *ServiceUpgrade) error {
+ return c.rancherClient.doResourceDelete(SERVICE_UPGRADE_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_upgrade_strategy.go b/vendor/github.com/rancher/go-rancher/client/generated_service_upgrade_strategy.go
new file mode 100644
index 00000000..621403d3
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_service_upgrade_strategy.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ SERVICE_UPGRADE_STRATEGY_TYPE = "serviceUpgradeStrategy"
+)
+
+type ServiceUpgradeStrategy struct {
+ Resource
+
+ BatchSize int64 `json:"batchSize,omitempty" yaml:"batch_size,omitempty"`
+
+ IntervalMillis int64 `json:"intervalMillis,omitempty" yaml:"interval_millis,omitempty"`
+}
+
+type ServiceUpgradeStrategyCollection struct {
+ Collection
+ Data []ServiceUpgradeStrategy `json:"data,omitempty"`
+ client *ServiceUpgradeStrategyClient
+}
+
+type ServiceUpgradeStrategyClient struct {
+ rancherClient *RancherClient
+}
+
+type ServiceUpgradeStrategyOperations interface {
+ List(opts *ListOpts) (*ServiceUpgradeStrategyCollection, error)
+ Create(opts *ServiceUpgradeStrategy) (*ServiceUpgradeStrategy, error)
+ Update(existing *ServiceUpgradeStrategy, updates interface{}) (*ServiceUpgradeStrategy, error)
+ ById(id string) (*ServiceUpgradeStrategy, error)
+ Delete(container *ServiceUpgradeStrategy) error
+}
+
+func newServiceUpgradeStrategyClient(rancherClient *RancherClient) *ServiceUpgradeStrategyClient {
+ return &ServiceUpgradeStrategyClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ServiceUpgradeStrategyClient) Create(container *ServiceUpgradeStrategy) (*ServiceUpgradeStrategy, error) {
+ resp := &ServiceUpgradeStrategy{}
+ err := c.rancherClient.doCreate(SERVICE_UPGRADE_STRATEGY_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ServiceUpgradeStrategyClient) Update(existing *ServiceUpgradeStrategy, updates interface{}) (*ServiceUpgradeStrategy, error) {
+ resp := &ServiceUpgradeStrategy{}
+ err := c.rancherClient.doUpdate(SERVICE_UPGRADE_STRATEGY_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ServiceUpgradeStrategyClient) List(opts *ListOpts) (*ServiceUpgradeStrategyCollection, error) {
+ resp := &ServiceUpgradeStrategyCollection{}
+ err := c.rancherClient.doList(SERVICE_UPGRADE_STRATEGY_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ServiceUpgradeStrategyCollection) Next() (*ServiceUpgradeStrategyCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ServiceUpgradeStrategyCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ServiceUpgradeStrategyClient) ById(id string) (*ServiceUpgradeStrategy, error) {
+ resp := &ServiceUpgradeStrategy{}
+ err := c.rancherClient.doById(SERVICE_UPGRADE_STRATEGY_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ServiceUpgradeStrategyClient) Delete(container *ServiceUpgradeStrategy) error {
+ return c.rancherClient.doResourceDelete(SERVICE_UPGRADE_STRATEGY_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_services_port_range.go b/vendor/github.com/rancher/go-rancher/client/generated_services_port_range.go
new file mode 100644
index 00000000..1d112c7a
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_services_port_range.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ SERVICES_PORT_RANGE_TYPE = "servicesPortRange"
+)
+
+type ServicesPortRange struct {
+ Resource
+
+ EndPort int64 `json:"endPort,omitempty" yaml:"end_port,omitempty"`
+
+ StartPort int64 `json:"startPort,omitempty" yaml:"start_port,omitempty"`
+}
+
+type ServicesPortRangeCollection struct {
+ Collection
+ Data []ServicesPortRange `json:"data,omitempty"`
+ client *ServicesPortRangeClient
+}
+
+type ServicesPortRangeClient struct {
+ rancherClient *RancherClient
+}
+
+type ServicesPortRangeOperations interface {
+ List(opts *ListOpts) (*ServicesPortRangeCollection, error)
+ Create(opts *ServicesPortRange) (*ServicesPortRange, error)
+ Update(existing *ServicesPortRange, updates interface{}) (*ServicesPortRange, error)
+ ById(id string) (*ServicesPortRange, error)
+ Delete(container *ServicesPortRange) error
+}
+
+func newServicesPortRangeClient(rancherClient *RancherClient) *ServicesPortRangeClient {
+ return &ServicesPortRangeClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ServicesPortRangeClient) Create(container *ServicesPortRange) (*ServicesPortRange, error) {
+ resp := &ServicesPortRange{}
+ err := c.rancherClient.doCreate(SERVICES_PORT_RANGE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ServicesPortRangeClient) Update(existing *ServicesPortRange, updates interface{}) (*ServicesPortRange, error) {
+ resp := &ServicesPortRange{}
+ err := c.rancherClient.doUpdate(SERVICES_PORT_RANGE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ServicesPortRangeClient) List(opts *ListOpts) (*ServicesPortRangeCollection, error) {
+ resp := &ServicesPortRangeCollection{}
+ err := c.rancherClient.doList(SERVICES_PORT_RANGE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ServicesPortRangeCollection) Next() (*ServicesPortRangeCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ServicesPortRangeCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ServicesPortRangeClient) ById(id string) (*ServicesPortRange, error) {
+ resp := &ServicesPortRange{}
+ err := c.rancherClient.doById(SERVICES_PORT_RANGE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ServicesPortRangeClient) Delete(container *ServicesPortRange) error {
+ return c.rancherClient.doResourceDelete(SERVICES_PORT_RANGE_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_set_labels_input.go b/vendor/github.com/rancher/go-rancher/client/generated_set_labels_input.go
new file mode 100644
index 00000000..55d2e311
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_set_labels_input.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ SET_LABELS_INPUT_TYPE = "setLabelsInput"
+)
+
+type SetLabelsInput struct {
+ Resource
+
+ Labels interface{} `json:"labels,omitempty" yaml:"labels,omitempty"`
+}
+
+type SetLabelsInputCollection struct {
+ Collection
+ Data []SetLabelsInput `json:"data,omitempty"`
+ client *SetLabelsInputClient
+}
+
+type SetLabelsInputClient struct {
+ rancherClient *RancherClient
+}
+
+type SetLabelsInputOperations interface {
+ List(opts *ListOpts) (*SetLabelsInputCollection, error)
+ Create(opts *SetLabelsInput) (*SetLabelsInput, error)
+ Update(existing *SetLabelsInput, updates interface{}) (*SetLabelsInput, error)
+ ById(id string) (*SetLabelsInput, error)
+ Delete(container *SetLabelsInput) error
+}
+
+func newSetLabelsInputClient(rancherClient *RancherClient) *SetLabelsInputClient {
+ return &SetLabelsInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *SetLabelsInputClient) Create(container *SetLabelsInput) (*SetLabelsInput, error) {
+ resp := &SetLabelsInput{}
+ err := c.rancherClient.doCreate(SET_LABELS_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *SetLabelsInputClient) Update(existing *SetLabelsInput, updates interface{}) (*SetLabelsInput, error) {
+ resp := &SetLabelsInput{}
+ err := c.rancherClient.doUpdate(SET_LABELS_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *SetLabelsInputClient) List(opts *ListOpts) (*SetLabelsInputCollection, error) {
+ resp := &SetLabelsInputCollection{}
+ err := c.rancherClient.doList(SET_LABELS_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *SetLabelsInputCollection) Next() (*SetLabelsInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &SetLabelsInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *SetLabelsInputClient) ById(id string) (*SetLabelsInput, error) {
+ resp := &SetLabelsInput{}
+ err := c.rancherClient.doById(SET_LABELS_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *SetLabelsInputClient) Delete(container *SetLabelsInput) error {
+ return c.rancherClient.doResourceDelete(SET_LABELS_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_service_links_input.go b/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_service_links_input.go
new file mode 100644
index 00000000..dd57f60c
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_service_links_input.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE = "setLoadBalancerServiceLinksInput"
+)
+
+type SetLoadBalancerServiceLinksInput struct {
+ Resource
+
+ ServiceLinks []interface{} `json:"serviceLinks,omitempty" yaml:"service_links,omitempty"`
+}
+
+type SetLoadBalancerServiceLinksInputCollection struct {
+ Collection
+ Data []SetLoadBalancerServiceLinksInput `json:"data,omitempty"`
+ client *SetLoadBalancerServiceLinksInputClient
+}
+
+type SetLoadBalancerServiceLinksInputClient struct {
+ rancherClient *RancherClient
+}
+
+type SetLoadBalancerServiceLinksInputOperations interface {
+ List(opts *ListOpts) (*SetLoadBalancerServiceLinksInputCollection, error)
+ Create(opts *SetLoadBalancerServiceLinksInput) (*SetLoadBalancerServiceLinksInput, error)
+ Update(existing *SetLoadBalancerServiceLinksInput, updates interface{}) (*SetLoadBalancerServiceLinksInput, error)
+ ById(id string) (*SetLoadBalancerServiceLinksInput, error)
+ Delete(container *SetLoadBalancerServiceLinksInput) error
+}
+
+func newSetLoadBalancerServiceLinksInputClient(rancherClient *RancherClient) *SetLoadBalancerServiceLinksInputClient {
+ return &SetLoadBalancerServiceLinksInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *SetLoadBalancerServiceLinksInputClient) Create(container *SetLoadBalancerServiceLinksInput) (*SetLoadBalancerServiceLinksInput, error) {
+ resp := &SetLoadBalancerServiceLinksInput{}
+ err := c.rancherClient.doCreate(SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *SetLoadBalancerServiceLinksInputClient) Update(existing *SetLoadBalancerServiceLinksInput, updates interface{}) (*SetLoadBalancerServiceLinksInput, error) {
+ resp := &SetLoadBalancerServiceLinksInput{}
+ err := c.rancherClient.doUpdate(SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *SetLoadBalancerServiceLinksInputClient) List(opts *ListOpts) (*SetLoadBalancerServiceLinksInputCollection, error) {
+ resp := &SetLoadBalancerServiceLinksInputCollection{}
+ err := c.rancherClient.doList(SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *SetLoadBalancerServiceLinksInputCollection) Next() (*SetLoadBalancerServiceLinksInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &SetLoadBalancerServiceLinksInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *SetLoadBalancerServiceLinksInputClient) ById(id string) (*SetLoadBalancerServiceLinksInput, error) {
+ resp := &SetLoadBalancerServiceLinksInput{}
+ err := c.rancherClient.doById(SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *SetLoadBalancerServiceLinksInputClient) Delete(container *SetLoadBalancerServiceLinksInput) error {
+ return c.rancherClient.doResourceDelete(SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_set_project_members_input.go b/vendor/github.com/rancher/go-rancher/client/generated_set_project_members_input.go
new file mode 100644
index 00000000..29cbc786
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_set_project_members_input.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ SET_PROJECT_MEMBERS_INPUT_TYPE = "setProjectMembersInput"
+)
+
+type SetProjectMembersInput struct {
+ Resource
+
+ Members []interface{} `json:"members,omitempty" yaml:"members,omitempty"`
+}
+
+type SetProjectMembersInputCollection struct {
+ Collection
+ Data []SetProjectMembersInput `json:"data,omitempty"`
+ client *SetProjectMembersInputClient
+}
+
+type SetProjectMembersInputClient struct {
+ rancherClient *RancherClient
+}
+
+type SetProjectMembersInputOperations interface {
+ List(opts *ListOpts) (*SetProjectMembersInputCollection, error)
+ Create(opts *SetProjectMembersInput) (*SetProjectMembersInput, error)
+ Update(existing *SetProjectMembersInput, updates interface{}) (*SetProjectMembersInput, error)
+ ById(id string) (*SetProjectMembersInput, error)
+ Delete(container *SetProjectMembersInput) error
+}
+
+func newSetProjectMembersInputClient(rancherClient *RancherClient) *SetProjectMembersInputClient {
+ return &SetProjectMembersInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *SetProjectMembersInputClient) Create(container *SetProjectMembersInput) (*SetProjectMembersInput, error) {
+ resp := &SetProjectMembersInput{}
+ err := c.rancherClient.doCreate(SET_PROJECT_MEMBERS_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *SetProjectMembersInputClient) Update(existing *SetProjectMembersInput, updates interface{}) (*SetProjectMembersInput, error) {
+ resp := &SetProjectMembersInput{}
+ err := c.rancherClient.doUpdate(SET_PROJECT_MEMBERS_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *SetProjectMembersInputClient) List(opts *ListOpts) (*SetProjectMembersInputCollection, error) {
+ resp := &SetProjectMembersInputCollection{}
+ err := c.rancherClient.doList(SET_PROJECT_MEMBERS_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *SetProjectMembersInputCollection) Next() (*SetProjectMembersInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &SetProjectMembersInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *SetProjectMembersInputClient) ById(id string) (*SetProjectMembersInput, error) {
+ resp := &SetProjectMembersInput{}
+ err := c.rancherClient.doById(SET_PROJECT_MEMBERS_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *SetProjectMembersInputClient) Delete(container *SetProjectMembersInput) error {
+ return c.rancherClient.doResourceDelete(SET_PROJECT_MEMBERS_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_set_service_links_input.go b/vendor/github.com/rancher/go-rancher/client/generated_set_service_links_input.go
new file mode 100644
index 00000000..9ee69531
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_set_service_links_input.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ SET_SERVICE_LINKS_INPUT_TYPE = "setServiceLinksInput"
+)
+
+type SetServiceLinksInput struct {
+ Resource
+
+ ServiceLinks []interface{} `json:"serviceLinks,omitempty" yaml:"service_links,omitempty"`
+}
+
+type SetServiceLinksInputCollection struct {
+ Collection
+ Data []SetServiceLinksInput `json:"data,omitempty"`
+ client *SetServiceLinksInputClient
+}
+
+type SetServiceLinksInputClient struct {
+ rancherClient *RancherClient
+}
+
+type SetServiceLinksInputOperations interface {
+ List(opts *ListOpts) (*SetServiceLinksInputCollection, error)
+ Create(opts *SetServiceLinksInput) (*SetServiceLinksInput, error)
+ Update(existing *SetServiceLinksInput, updates interface{}) (*SetServiceLinksInput, error)
+ ById(id string) (*SetServiceLinksInput, error)
+ Delete(container *SetServiceLinksInput) error
+}
+
+func newSetServiceLinksInputClient(rancherClient *RancherClient) *SetServiceLinksInputClient {
+ return &SetServiceLinksInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *SetServiceLinksInputClient) Create(container *SetServiceLinksInput) (*SetServiceLinksInput, error) {
+ resp := &SetServiceLinksInput{}
+ err := c.rancherClient.doCreate(SET_SERVICE_LINKS_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *SetServiceLinksInputClient) Update(existing *SetServiceLinksInput, updates interface{}) (*SetServiceLinksInput, error) {
+ resp := &SetServiceLinksInput{}
+ err := c.rancherClient.doUpdate(SET_SERVICE_LINKS_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *SetServiceLinksInputClient) List(opts *ListOpts) (*SetServiceLinksInputCollection, error) {
+ resp := &SetServiceLinksInputCollection{}
+ err := c.rancherClient.doList(SET_SERVICE_LINKS_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *SetServiceLinksInputCollection) Next() (*SetServiceLinksInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &SetServiceLinksInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *SetServiceLinksInputClient) ById(id string) (*SetServiceLinksInput, error) {
+ resp := &SetServiceLinksInput{}
+ err := c.rancherClient.doById(SET_SERVICE_LINKS_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *SetServiceLinksInputClient) Delete(container *SetServiceLinksInput) error {
+ return c.rancherClient.doResourceDelete(SET_SERVICE_LINKS_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_setting.go b/vendor/github.com/rancher/go-rancher/client/generated_setting.go
new file mode 100644
index 00000000..02dd2df9
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_setting.go
@@ -0,0 +1,87 @@
+package client
+
+const (
+ SETTING_TYPE = "setting"
+)
+
+type Setting struct {
+ Resource
+
+ ActiveValue string `json:"activeValue,omitempty" yaml:"active_value,omitempty"`
+
+ InDb bool `json:"inDb,omitempty" yaml:"in_db,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Source string `json:"source,omitempty" yaml:"source,omitempty"`
+
+ Value string `json:"value,omitempty" yaml:"value,omitempty"`
+}
+
+type SettingCollection struct {
+ Collection
+ Data []Setting `json:"data,omitempty"`
+ client *SettingClient
+}
+
+type SettingClient struct {
+ rancherClient *RancherClient
+}
+
+type SettingOperations interface {
+ List(opts *ListOpts) (*SettingCollection, error)
+ Create(opts *Setting) (*Setting, error)
+ Update(existing *Setting, updates interface{}) (*Setting, error)
+ ById(id string) (*Setting, error)
+ Delete(container *Setting) error
+}
+
+func newSettingClient(rancherClient *RancherClient) *SettingClient {
+ return &SettingClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *SettingClient) Create(container *Setting) (*Setting, error) {
+ resp := &Setting{}
+ err := c.rancherClient.doCreate(SETTING_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *SettingClient) Update(existing *Setting, updates interface{}) (*Setting, error) {
+ resp := &Setting{}
+ err := c.rancherClient.doUpdate(SETTING_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *SettingClient) List(opts *ListOpts) (*SettingCollection, error) {
+ resp := &SettingCollection{}
+ err := c.rancherClient.doList(SETTING_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *SettingCollection) Next() (*SettingCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &SettingCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *SettingClient) ById(id string) (*Setting, error) {
+ resp := &Setting{}
+ err := c.rancherClient.doById(SETTING_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *SettingClient) Delete(container *Setting) error {
+ return c.rancherClient.doResourceDelete(SETTING_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_snapshot.go b/vendor/github.com/rancher/go-rancher/client/generated_snapshot.go
new file mode 100644
index 00000000..1c4ea033
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_snapshot.go
@@ -0,0 +1,138 @@
+package client
+
+const (
+ SNAPSHOT_TYPE = "snapshot"
+)
+
+type Snapshot struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ VolumeId string `json:"volumeId,omitempty" yaml:"volume_id,omitempty"`
+}
+
+type SnapshotCollection struct {
+ Collection
+ Data []Snapshot `json:"data,omitempty"`
+ client *SnapshotClient
+}
+
+type SnapshotClient struct {
+ rancherClient *RancherClient
+}
+
+type SnapshotOperations interface {
+ List(opts *ListOpts) (*SnapshotCollection, error)
+ Create(opts *Snapshot) (*Snapshot, error)
+ Update(existing *Snapshot, updates interface{}) (*Snapshot, error)
+ ById(id string) (*Snapshot, error)
+ Delete(container *Snapshot) error
+
+ ActionBackup(*Snapshot, *SnapshotBackupInput) (*Backup, error)
+
+ ActionCreate(*Snapshot) (*Snapshot, error)
+
+ ActionRemove(*Snapshot) (*Snapshot, error)
+}
+
+func newSnapshotClient(rancherClient *RancherClient) *SnapshotClient {
+ return &SnapshotClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *SnapshotClient) Create(container *Snapshot) (*Snapshot, error) {
+ resp := &Snapshot{}
+ err := c.rancherClient.doCreate(SNAPSHOT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *SnapshotClient) Update(existing *Snapshot, updates interface{}) (*Snapshot, error) {
+ resp := &Snapshot{}
+ err := c.rancherClient.doUpdate(SNAPSHOT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *SnapshotClient) List(opts *ListOpts) (*SnapshotCollection, error) {
+ resp := &SnapshotCollection{}
+ err := c.rancherClient.doList(SNAPSHOT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *SnapshotCollection) Next() (*SnapshotCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &SnapshotCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *SnapshotClient) ById(id string) (*Snapshot, error) {
+ resp := &Snapshot{}
+ err := c.rancherClient.doById(SNAPSHOT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *SnapshotClient) Delete(container *Snapshot) error {
+ return c.rancherClient.doResourceDelete(SNAPSHOT_TYPE, &container.Resource)
+}
+
+func (c *SnapshotClient) ActionBackup(resource *Snapshot, input *SnapshotBackupInput) (*Backup, error) {
+
+ resp := &Backup{}
+
+ err := c.rancherClient.doAction(SNAPSHOT_TYPE, "backup", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *SnapshotClient) ActionCreate(resource *Snapshot) (*Snapshot, error) {
+
+ resp := &Snapshot{}
+
+ err := c.rancherClient.doAction(SNAPSHOT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SnapshotClient) ActionRemove(resource *Snapshot) (*Snapshot, error) {
+
+ resp := &Snapshot{}
+
+ err := c.rancherClient.doAction(SNAPSHOT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_snapshot_backup_input.go b/vendor/github.com/rancher/go-rancher/client/generated_snapshot_backup_input.go
new file mode 100644
index 00000000..9577ee6f
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_snapshot_backup_input.go
@@ -0,0 +1,107 @@
+package client
+
+const (
+ SNAPSHOT_BACKUP_INPUT_TYPE = "snapshotBackupInput"
+)
+
+type SnapshotBackupInput struct {
+ Resource
+
+ BackupTargetId string `json:"backupTargetId,omitempty" yaml:"backup_target_id,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+}
+
+type SnapshotBackupInputCollection struct {
+ Collection
+ Data []SnapshotBackupInput `json:"data,omitempty"`
+ client *SnapshotBackupInputClient
+}
+
+type SnapshotBackupInputClient struct {
+ rancherClient *RancherClient
+}
+
+type SnapshotBackupInputOperations interface {
+ List(opts *ListOpts) (*SnapshotBackupInputCollection, error)
+ Create(opts *SnapshotBackupInput) (*SnapshotBackupInput, error)
+ Update(existing *SnapshotBackupInput, updates interface{}) (*SnapshotBackupInput, error)
+ ById(id string) (*SnapshotBackupInput, error)
+ Delete(container *SnapshotBackupInput) error
+
+ ActionCreate(*SnapshotBackupInput) (*Backup, error)
+
+ ActionRemove(*SnapshotBackupInput) (*Backup, error)
+}
+
+func newSnapshotBackupInputClient(rancherClient *RancherClient) *SnapshotBackupInputClient {
+ return &SnapshotBackupInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *SnapshotBackupInputClient) Create(container *SnapshotBackupInput) (*SnapshotBackupInput, error) {
+ resp := &SnapshotBackupInput{}
+ err := c.rancherClient.doCreate(SNAPSHOT_BACKUP_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *SnapshotBackupInputClient) Update(existing *SnapshotBackupInput, updates interface{}) (*SnapshotBackupInput, error) {
+ resp := &SnapshotBackupInput{}
+ err := c.rancherClient.doUpdate(SNAPSHOT_BACKUP_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *SnapshotBackupInputClient) List(opts *ListOpts) (*SnapshotBackupInputCollection, error) {
+ resp := &SnapshotBackupInputCollection{}
+ err := c.rancherClient.doList(SNAPSHOT_BACKUP_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *SnapshotBackupInputCollection) Next() (*SnapshotBackupInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &SnapshotBackupInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *SnapshotBackupInputClient) ById(id string) (*SnapshotBackupInput, error) {
+ resp := &SnapshotBackupInput{}
+ err := c.rancherClient.doById(SNAPSHOT_BACKUP_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *SnapshotBackupInputClient) Delete(container *SnapshotBackupInput) error {
+ return c.rancherClient.doResourceDelete(SNAPSHOT_BACKUP_INPUT_TYPE, &container.Resource)
+}
+
+func (c *SnapshotBackupInputClient) ActionCreate(resource *SnapshotBackupInput) (*Backup, error) {
+
+ resp := &Backup{}
+
+ err := c.rancherClient.doAction(SNAPSHOT_BACKUP_INPUT_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *SnapshotBackupInputClient) ActionRemove(resource *SnapshotBackupInput) (*Backup, error) {
+
+ resp := &Backup{}
+
+ err := c.rancherClient.doAction(SNAPSHOT_BACKUP_INPUT_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_state_transition.go b/vendor/github.com/rancher/go-rancher/client/generated_state_transition.go
new file mode 100644
index 00000000..4fb56553
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_state_transition.go
@@ -0,0 +1,77 @@
+package client
+
+const (
+ STATE_TRANSITION_TYPE = "stateTransition"
+)
+
+type StateTransition struct {
+ Resource
+}
+
+type StateTransitionCollection struct {
+ Collection
+ Data []StateTransition `json:"data,omitempty"`
+ client *StateTransitionClient
+}
+
+type StateTransitionClient struct {
+ rancherClient *RancherClient
+}
+
+type StateTransitionOperations interface {
+ List(opts *ListOpts) (*StateTransitionCollection, error)
+ Create(opts *StateTransition) (*StateTransition, error)
+ Update(existing *StateTransition, updates interface{}) (*StateTransition, error)
+ ById(id string) (*StateTransition, error)
+ Delete(container *StateTransition) error
+}
+
+func newStateTransitionClient(rancherClient *RancherClient) *StateTransitionClient {
+ return &StateTransitionClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *StateTransitionClient) Create(container *StateTransition) (*StateTransition, error) {
+ resp := &StateTransition{}
+ err := c.rancherClient.doCreate(STATE_TRANSITION_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *StateTransitionClient) Update(existing *StateTransition, updates interface{}) (*StateTransition, error) {
+ resp := &StateTransition{}
+ err := c.rancherClient.doUpdate(STATE_TRANSITION_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *StateTransitionClient) List(opts *ListOpts) (*StateTransitionCollection, error) {
+ resp := &StateTransitionCollection{}
+ err := c.rancherClient.doList(STATE_TRANSITION_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *StateTransitionCollection) Next() (*StateTransitionCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &StateTransitionCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *StateTransitionClient) ById(id string) (*StateTransition, error) {
+ resp := &StateTransition{}
+ err := c.rancherClient.doById(STATE_TRANSITION_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *StateTransitionClient) Delete(container *StateTransition) error {
+ return c.rancherClient.doResourceDelete(STATE_TRANSITION_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_stats_access.go b/vendor/github.com/rancher/go-rancher/client/generated_stats_access.go
new file mode 100644
index 00000000..1b7d814f
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_stats_access.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ STATS_ACCESS_TYPE = "statsAccess"
+)
+
+type StatsAccess struct {
+ Resource
+
+ Token string `json:"token,omitempty" yaml:"token,omitempty"`
+
+ Url string `json:"url,omitempty" yaml:"url,omitempty"`
+}
+
+type StatsAccessCollection struct {
+ Collection
+ Data []StatsAccess `json:"data,omitempty"`
+ client *StatsAccessClient
+}
+
+type StatsAccessClient struct {
+ rancherClient *RancherClient
+}
+
+type StatsAccessOperations interface {
+ List(opts *ListOpts) (*StatsAccessCollection, error)
+ Create(opts *StatsAccess) (*StatsAccess, error)
+ Update(existing *StatsAccess, updates interface{}) (*StatsAccess, error)
+ ById(id string) (*StatsAccess, error)
+ Delete(container *StatsAccess) error
+}
+
+func newStatsAccessClient(rancherClient *RancherClient) *StatsAccessClient {
+ return &StatsAccessClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *StatsAccessClient) Create(container *StatsAccess) (*StatsAccess, error) {
+ resp := &StatsAccess{}
+ err := c.rancherClient.doCreate(STATS_ACCESS_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *StatsAccessClient) Update(existing *StatsAccess, updates interface{}) (*StatsAccess, error) {
+ resp := &StatsAccess{}
+ err := c.rancherClient.doUpdate(STATS_ACCESS_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *StatsAccessClient) List(opts *ListOpts) (*StatsAccessCollection, error) {
+ resp := &StatsAccessCollection{}
+ err := c.rancherClient.doList(STATS_ACCESS_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *StatsAccessCollection) Next() (*StatsAccessCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &StatsAccessCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *StatsAccessClient) ById(id string) (*StatsAccess, error) {
+ resp := &StatsAccess{}
+ err := c.rancherClient.doById(STATS_ACCESS_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *StatsAccessClient) Delete(container *StatsAccess) error {
+ return c.rancherClient.doResourceDelete(STATS_ACCESS_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_storage_pool.go b/vendor/github.com/rancher/go-rancher/client/generated_storage_pool.go
new file mode 100644
index 00000000..92448ded
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_storage_pool.go
@@ -0,0 +1,190 @@
+package client
+
+const (
+ STORAGE_POOL_TYPE = "storagePool"
+)
+
+type StoragePool struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ BlockDevicePath string `json:"blockDevicePath,omitempty" yaml:"block_device_path,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ DriverName string `json:"driverName,omitempty" yaml:"driver_name,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ VolumeAccessMode string `json:"volumeAccessMode,omitempty" yaml:"volume_access_mode,omitempty"`
+
+ VolumeCapabilities []string `json:"volumeCapabilities,omitempty" yaml:"volume_capabilities,omitempty"`
+}
+
+type StoragePoolCollection struct {
+ Collection
+ Data []StoragePool `json:"data,omitempty"`
+ client *StoragePoolClient
+}
+
+type StoragePoolClient struct {
+ rancherClient *RancherClient
+}
+
+type StoragePoolOperations interface {
+ List(opts *ListOpts) (*StoragePoolCollection, error)
+ Create(opts *StoragePool) (*StoragePool, error)
+ Update(existing *StoragePool, updates interface{}) (*StoragePool, error)
+ ById(id string) (*StoragePool, error)
+ Delete(container *StoragePool) error
+
+ ActionActivate(*StoragePool) (*StoragePool, error)
+
+ ActionCreate(*StoragePool) (*StoragePool, error)
+
+ ActionDeactivate(*StoragePool) (*StoragePool, error)
+
+ ActionPurge(*StoragePool) (*StoragePool, error)
+
+ ActionRemove(*StoragePool) (*StoragePool, error)
+
+ ActionRestore(*StoragePool) (*StoragePool, error)
+
+ ActionUpdate(*StoragePool) (*StoragePool, error)
+}
+
+func newStoragePoolClient(rancherClient *RancherClient) *StoragePoolClient {
+ return &StoragePoolClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *StoragePoolClient) Create(container *StoragePool) (*StoragePool, error) {
+ resp := &StoragePool{}
+ err := c.rancherClient.doCreate(STORAGE_POOL_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *StoragePoolClient) Update(existing *StoragePool, updates interface{}) (*StoragePool, error) {
+ resp := &StoragePool{}
+ err := c.rancherClient.doUpdate(STORAGE_POOL_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *StoragePoolClient) List(opts *ListOpts) (*StoragePoolCollection, error) {
+ resp := &StoragePoolCollection{}
+ err := c.rancherClient.doList(STORAGE_POOL_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *StoragePoolCollection) Next() (*StoragePoolCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &StoragePoolCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *StoragePoolClient) ById(id string) (*StoragePool, error) {
+ resp := &StoragePool{}
+ err := c.rancherClient.doById(STORAGE_POOL_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *StoragePoolClient) Delete(container *StoragePool) error {
+ return c.rancherClient.doResourceDelete(STORAGE_POOL_TYPE, &container.Resource)
+}
+
+func (c *StoragePoolClient) ActionActivate(resource *StoragePool) (*StoragePool, error) {
+
+ resp := &StoragePool{}
+
+ err := c.rancherClient.doAction(STORAGE_POOL_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *StoragePoolClient) ActionCreate(resource *StoragePool) (*StoragePool, error) {
+
+ resp := &StoragePool{}
+
+ err := c.rancherClient.doAction(STORAGE_POOL_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *StoragePoolClient) ActionDeactivate(resource *StoragePool) (*StoragePool, error) {
+
+ resp := &StoragePool{}
+
+ err := c.rancherClient.doAction(STORAGE_POOL_TYPE, "deactivate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *StoragePoolClient) ActionPurge(resource *StoragePool) (*StoragePool, error) {
+
+ resp := &StoragePool{}
+
+ err := c.rancherClient.doAction(STORAGE_POOL_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *StoragePoolClient) ActionRemove(resource *StoragePool) (*StoragePool, error) {
+
+ resp := &StoragePool{}
+
+ err := c.rancherClient.doAction(STORAGE_POOL_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *StoragePoolClient) ActionRestore(resource *StoragePool) (*StoragePool, error) {
+
+ resp := &StoragePool{}
+
+ err := c.rancherClient.doAction(STORAGE_POOL_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *StoragePoolClient) ActionUpdate(resource *StoragePool) (*StoragePool, error) {
+
+ resp := &StoragePool{}
+
+ err := c.rancherClient.doAction(STORAGE_POOL_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_subscribe.go b/vendor/github.com/rancher/go-rancher/client/generated_subscribe.go
new file mode 100644
index 00000000..ec908982
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_subscribe.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ SUBSCRIBE_TYPE = "subscribe"
+)
+
+type Subscribe struct {
+ Resource
+
+ AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"`
+
+ EventNames []string `json:"eventNames,omitempty" yaml:"event_names,omitempty"`
+}
+
+type SubscribeCollection struct {
+ Collection
+ Data []Subscribe `json:"data,omitempty"`
+ client *SubscribeClient
+}
+
+type SubscribeClient struct {
+ rancherClient *RancherClient
+}
+
+type SubscribeOperations interface {
+ List(opts *ListOpts) (*SubscribeCollection, error)
+ Create(opts *Subscribe) (*Subscribe, error)
+ Update(existing *Subscribe, updates interface{}) (*Subscribe, error)
+ ById(id string) (*Subscribe, error)
+ Delete(container *Subscribe) error
+}
+
+func newSubscribeClient(rancherClient *RancherClient) *SubscribeClient {
+ return &SubscribeClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *SubscribeClient) Create(container *Subscribe) (*Subscribe, error) {
+ resp := &Subscribe{}
+ err := c.rancherClient.doCreate(SUBSCRIBE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *SubscribeClient) Update(existing *Subscribe, updates interface{}) (*Subscribe, error) {
+ resp := &Subscribe{}
+ err := c.rancherClient.doUpdate(SUBSCRIBE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *SubscribeClient) List(opts *ListOpts) (*SubscribeCollection, error) {
+ resp := &SubscribeCollection{}
+ err := c.rancherClient.doList(SUBSCRIBE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *SubscribeCollection) Next() (*SubscribeCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &SubscribeCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *SubscribeClient) ById(id string) (*Subscribe, error) {
+ resp := &Subscribe{}
+ err := c.rancherClient.doById(SUBSCRIBE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *SubscribeClient) Delete(container *Subscribe) error {
+ return c.rancherClient.doResourceDelete(SUBSCRIBE_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_task.go b/vendor/github.com/rancher/go-rancher/client/generated_task.go
new file mode 100644
index 00000000..8fa65e2d
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_task.go
@@ -0,0 +1,90 @@
+package client
+
+const (
+ TASK_TYPE = "task"
+)
+
+type Task struct {
+ Resource
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+}
+
+type TaskCollection struct {
+ Collection
+ Data []Task `json:"data,omitempty"`
+ client *TaskClient
+}
+
+type TaskClient struct {
+ rancherClient *RancherClient
+}
+
+type TaskOperations interface {
+ List(opts *ListOpts) (*TaskCollection, error)
+ Create(opts *Task) (*Task, error)
+ Update(existing *Task, updates interface{}) (*Task, error)
+ ById(id string) (*Task, error)
+ Delete(container *Task) error
+
+ ActionExecute(*Task) (*Task, error)
+}
+
+func newTaskClient(rancherClient *RancherClient) *TaskClient {
+ return &TaskClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *TaskClient) Create(container *Task) (*Task, error) {
+ resp := &Task{}
+ err := c.rancherClient.doCreate(TASK_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *TaskClient) Update(existing *Task, updates interface{}) (*Task, error) {
+ resp := &Task{}
+ err := c.rancherClient.doUpdate(TASK_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *TaskClient) List(opts *ListOpts) (*TaskCollection, error) {
+ resp := &TaskCollection{}
+ err := c.rancherClient.doList(TASK_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *TaskCollection) Next() (*TaskCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &TaskCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *TaskClient) ById(id string) (*Task, error) {
+ resp := &Task{}
+ err := c.rancherClient.doById(TASK_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *TaskClient) Delete(container *Task) error {
+ return c.rancherClient.doResourceDelete(TASK_TYPE, &container.Resource)
+}
+
+func (c *TaskClient) ActionExecute(resource *Task) (*Task, error) {
+
+ resp := &Task{}
+
+ err := c.rancherClient.doAction(TASK_TYPE, "execute", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_task_instance.go b/vendor/github.com/rancher/go-rancher/client/generated_task_instance.go
new file mode 100644
index 00000000..5bb58273
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_task_instance.go
@@ -0,0 +1,89 @@
+package client
+
+const (
+ TASK_INSTANCE_TYPE = "taskInstance"
+)
+
+type TaskInstance struct {
+ Resource
+
+ EndTime string `json:"endTime,omitempty" yaml:"end_time,omitempty"`
+
+ Exception string `json:"exception,omitempty" yaml:"exception,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ ServerId string `json:"serverId,omitempty" yaml:"server_id,omitempty"`
+
+ StartTime string `json:"startTime,omitempty" yaml:"start_time,omitempty"`
+
+ TaskId string `json:"taskId,omitempty" yaml:"task_id,omitempty"`
+}
+
+type TaskInstanceCollection struct {
+ Collection
+ Data []TaskInstance `json:"data,omitempty"`
+ client *TaskInstanceClient
+}
+
+type TaskInstanceClient struct {
+ rancherClient *RancherClient
+}
+
+type TaskInstanceOperations interface {
+ List(opts *ListOpts) (*TaskInstanceCollection, error)
+ Create(opts *TaskInstance) (*TaskInstance, error)
+ Update(existing *TaskInstance, updates interface{}) (*TaskInstance, error)
+ ById(id string) (*TaskInstance, error)
+ Delete(container *TaskInstance) error
+}
+
+func newTaskInstanceClient(rancherClient *RancherClient) *TaskInstanceClient {
+ return &TaskInstanceClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *TaskInstanceClient) Create(container *TaskInstance) (*TaskInstance, error) {
+ resp := &TaskInstance{}
+ err := c.rancherClient.doCreate(TASK_INSTANCE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *TaskInstanceClient) Update(existing *TaskInstance, updates interface{}) (*TaskInstance, error) {
+ resp := &TaskInstance{}
+ err := c.rancherClient.doUpdate(TASK_INSTANCE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *TaskInstanceClient) List(opts *ListOpts) (*TaskInstanceCollection, error) {
+ resp := &TaskInstanceCollection{}
+ err := c.rancherClient.doList(TASK_INSTANCE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *TaskInstanceCollection) Next() (*TaskInstanceCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &TaskInstanceCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *TaskInstanceClient) ById(id string) (*TaskInstance, error) {
+ resp := &TaskInstance{}
+ err := c.rancherClient.doById(TASK_INSTANCE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *TaskInstanceClient) Delete(container *TaskInstance) error {
+ return c.rancherClient.doResourceDelete(TASK_INSTANCE_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_to_service_upgrade_strategy.go b/vendor/github.com/rancher/go-rancher/client/generated_to_service_upgrade_strategy.go
new file mode 100644
index 00000000..3ed74115
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_to_service_upgrade_strategy.go
@@ -0,0 +1,87 @@
+package client
+
+const (
+ TO_SERVICE_UPGRADE_STRATEGY_TYPE = "toServiceUpgradeStrategy"
+)
+
+type ToServiceUpgradeStrategy struct {
+ Resource
+
+ BatchSize int64 `json:"batchSize,omitempty" yaml:"batch_size,omitempty"`
+
+ FinalScale int64 `json:"finalScale,omitempty" yaml:"final_scale,omitempty"`
+
+ IntervalMillis int64 `json:"intervalMillis,omitempty" yaml:"interval_millis,omitempty"`
+
+ ToServiceId string `json:"toServiceId,omitempty" yaml:"to_service_id,omitempty"`
+
+ UpdateLinks bool `json:"updateLinks,omitempty" yaml:"update_links,omitempty"`
+}
+
+type ToServiceUpgradeStrategyCollection struct {
+ Collection
+ Data []ToServiceUpgradeStrategy `json:"data,omitempty"`
+ client *ToServiceUpgradeStrategyClient
+}
+
+type ToServiceUpgradeStrategyClient struct {
+ rancherClient *RancherClient
+}
+
+type ToServiceUpgradeStrategyOperations interface {
+ List(opts *ListOpts) (*ToServiceUpgradeStrategyCollection, error)
+ Create(opts *ToServiceUpgradeStrategy) (*ToServiceUpgradeStrategy, error)
+ Update(existing *ToServiceUpgradeStrategy, updates interface{}) (*ToServiceUpgradeStrategy, error)
+ ById(id string) (*ToServiceUpgradeStrategy, error)
+ Delete(container *ToServiceUpgradeStrategy) error
+}
+
+func newToServiceUpgradeStrategyClient(rancherClient *RancherClient) *ToServiceUpgradeStrategyClient {
+ return &ToServiceUpgradeStrategyClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *ToServiceUpgradeStrategyClient) Create(container *ToServiceUpgradeStrategy) (*ToServiceUpgradeStrategy, error) {
+ resp := &ToServiceUpgradeStrategy{}
+ err := c.rancherClient.doCreate(TO_SERVICE_UPGRADE_STRATEGY_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *ToServiceUpgradeStrategyClient) Update(existing *ToServiceUpgradeStrategy, updates interface{}) (*ToServiceUpgradeStrategy, error) {
+ resp := &ToServiceUpgradeStrategy{}
+ err := c.rancherClient.doUpdate(TO_SERVICE_UPGRADE_STRATEGY_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *ToServiceUpgradeStrategyClient) List(opts *ListOpts) (*ToServiceUpgradeStrategyCollection, error) {
+ resp := &ToServiceUpgradeStrategyCollection{}
+ err := c.rancherClient.doList(TO_SERVICE_UPGRADE_STRATEGY_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *ToServiceUpgradeStrategyCollection) Next() (*ToServiceUpgradeStrategyCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &ToServiceUpgradeStrategyCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *ToServiceUpgradeStrategyClient) ById(id string) (*ToServiceUpgradeStrategy, error) {
+ resp := &ToServiceUpgradeStrategy{}
+ err := c.rancherClient.doById(TO_SERVICE_UPGRADE_STRATEGY_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *ToServiceUpgradeStrategyClient) Delete(container *ToServiceUpgradeStrategy) error {
+ return c.rancherClient.doResourceDelete(TO_SERVICE_UPGRADE_STRATEGY_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_type_documentation.go b/vendor/github.com/rancher/go-rancher/client/generated_type_documentation.go
new file mode 100644
index 00000000..cdfe1864
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_type_documentation.go
@@ -0,0 +1,81 @@
+package client
+
+const (
+ TYPE_DOCUMENTATION_TYPE = "typeDocumentation"
+)
+
+type TypeDocumentation struct {
+ Resource
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ ResourceFields map[string]interface{} `json:"resourceFields,omitempty" yaml:"resource_fields,omitempty"`
+}
+
+type TypeDocumentationCollection struct {
+ Collection
+ Data []TypeDocumentation `json:"data,omitempty"`
+ client *TypeDocumentationClient
+}
+
+type TypeDocumentationClient struct {
+ rancherClient *RancherClient
+}
+
+type TypeDocumentationOperations interface {
+ List(opts *ListOpts) (*TypeDocumentationCollection, error)
+ Create(opts *TypeDocumentation) (*TypeDocumentation, error)
+ Update(existing *TypeDocumentation, updates interface{}) (*TypeDocumentation, error)
+ ById(id string) (*TypeDocumentation, error)
+ Delete(container *TypeDocumentation) error
+}
+
+func newTypeDocumentationClient(rancherClient *RancherClient) *TypeDocumentationClient {
+ return &TypeDocumentationClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *TypeDocumentationClient) Create(container *TypeDocumentation) (*TypeDocumentation, error) {
+ resp := &TypeDocumentation{}
+ err := c.rancherClient.doCreate(TYPE_DOCUMENTATION_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *TypeDocumentationClient) Update(existing *TypeDocumentation, updates interface{}) (*TypeDocumentation, error) {
+ resp := &TypeDocumentation{}
+ err := c.rancherClient.doUpdate(TYPE_DOCUMENTATION_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *TypeDocumentationClient) List(opts *ListOpts) (*TypeDocumentationCollection, error) {
+ resp := &TypeDocumentationCollection{}
+ err := c.rancherClient.doList(TYPE_DOCUMENTATION_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *TypeDocumentationCollection) Next() (*TypeDocumentationCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &TypeDocumentationCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *TypeDocumentationClient) ById(id string) (*TypeDocumentation, error) {
+ resp := &TypeDocumentation{}
+ err := c.rancherClient.doById(TYPE_DOCUMENTATION_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *TypeDocumentationClient) Delete(container *TypeDocumentation) error {
+ return c.rancherClient.doResourceDelete(TYPE_DOCUMENTATION_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_virtual_machine.go b/vendor/github.com/rancher/go-rancher/client/generated_virtual_machine.go
new file mode 100644
index 00000000..a41f3b5a
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_virtual_machine.go
@@ -0,0 +1,413 @@
+package client
+
+const (
+ VIRTUAL_MACHINE_TYPE = "virtualMachine"
+)
+
+type VirtualMachine struct {
+ Resource
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"`
+
+ AllocationState string `json:"allocationState,omitempty" yaml:"allocation_state,omitempty"`
+
+ BlkioDeviceOptions map[string]interface{} `json:"blkioDeviceOptions,omitempty" yaml:"blkio_device_options,omitempty"`
+
+ Command []string `json:"command,omitempty" yaml:"command,omitempty"`
+
+ Count int64 `json:"count,omitempty" yaml:"count,omitempty"`
+
+ CpuSet string `json:"cpuSet,omitempty" yaml:"cpu_set,omitempty"`
+
+ CpuShares int64 `json:"cpuShares,omitempty" yaml:"cpu_shares,omitempty"`
+
+ CreateIndex int64 `json:"createIndex,omitempty" yaml:"create_index,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ DeploymentUnitUuid string `json:"deploymentUnitUuid,omitempty" yaml:"deployment_unit_uuid,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Disks []interface{} `json:"disks,omitempty" yaml:"disks,omitempty"`
+
+ Dns []string `json:"dns,omitempty" yaml:"dns,omitempty"`
+
+ DnsSearch []string `json:"dnsSearch,omitempty" yaml:"dns_search,omitempty"`
+
+ DomainName string `json:"domainName,omitempty" yaml:"domain_name,omitempty"`
+
+ Expose []string `json:"expose,omitempty" yaml:"expose,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ ExtraHosts []string `json:"extraHosts,omitempty" yaml:"extra_hosts,omitempty"`
+
+ FirstRunning string `json:"firstRunning,omitempty" yaml:"first_running,omitempty"`
+
+ HealthCheck *InstanceHealthCheck `json:"healthCheck,omitempty" yaml:"health_check,omitempty"`
+
+ HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"`
+
+ HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"`
+
+ Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"`
+
+ ImageUuid string `json:"imageUuid,omitempty" yaml:"image_uuid,omitempty"`
+
+ InstanceLinks map[string]interface{} `json:"instanceLinks,omitempty" yaml:"instance_links,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"`
+
+ LogConfig *LogConfig `json:"logConfig,omitempty" yaml:"log_config,omitempty"`
+
+ Memory int64 `json:"memory,omitempty" yaml:"memory,omitempty"`
+
+ MemoryMb int64 `json:"memoryMb,omitempty" yaml:"memory_mb,omitempty"`
+
+ MemorySwap int64 `json:"memorySwap,omitempty" yaml:"memory_swap,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ NativeContainer bool `json:"nativeContainer,omitempty" yaml:"native_container,omitempty"`
+
+ NetworkIds []string `json:"networkIds,omitempty" yaml:"network_ids,omitempty"`
+
+ NetworkMode string `json:"networkMode,omitempty" yaml:"network_mode,omitempty"`
+
+ Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"`
+
+ PrimaryIpAddress string `json:"primaryIpAddress,omitempty" yaml:"primary_ip_address,omitempty"`
+
+ RegistryCredentialId string `json:"registryCredentialId,omitempty" yaml:"registry_credential_id,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ RequestedHostId string `json:"requestedHostId,omitempty" yaml:"requested_host_id,omitempty"`
+
+ RestartPolicy *RestartPolicy `json:"restartPolicy,omitempty" yaml:"restart_policy,omitempty"`
+
+ SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"`
+
+ StartCount int64 `json:"startCount,omitempty" yaml:"start_count,omitempty"`
+
+ StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"`
+
+ Token string `json:"token,omitempty" yaml:"token,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Userdata string `json:"userdata,omitempty" yaml:"userdata,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+
+ Vcpu int64 `json:"vcpu,omitempty" yaml:"vcpu,omitempty"`
+
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+
+ VolumeDriver string `json:"volumeDriver,omitempty" yaml:"volume_driver,omitempty"`
+}
+
+type VirtualMachineCollection struct {
+ Collection
+ Data []VirtualMachine `json:"data,omitempty"`
+ client *VirtualMachineClient
+}
+
+type VirtualMachineClient struct {
+ rancherClient *RancherClient
+}
+
+type VirtualMachineOperations interface {
+ List(opts *ListOpts) (*VirtualMachineCollection, error)
+ Create(opts *VirtualMachine) (*VirtualMachine, error)
+ Update(existing *VirtualMachine, updates interface{}) (*VirtualMachine, error)
+ ById(id string) (*VirtualMachine, error)
+ Delete(container *VirtualMachine) error
+
+ ActionAllocate(*VirtualMachine) (*Instance, error)
+
+ ActionConsole(*VirtualMachine, *InstanceConsoleInput) (*InstanceConsole, error)
+
+ ActionCreate(*VirtualMachine) (*Instance, error)
+
+ ActionDeallocate(*VirtualMachine) (*Instance, error)
+
+ ActionError(*VirtualMachine) (*Instance, error)
+
+ ActionExecute(*VirtualMachine, *ContainerExec) (*HostAccess, error)
+
+ ActionLogs(*VirtualMachine, *ContainerLogs) (*HostAccess, error)
+
+ ActionMigrate(*VirtualMachine) (*Instance, error)
+
+ ActionProxy(*VirtualMachine, *ContainerProxy) (*HostAccess, error)
+
+ ActionPurge(*VirtualMachine) (*Instance, error)
+
+ ActionRemove(*VirtualMachine) (*Instance, error)
+
+ ActionRestart(*VirtualMachine) (*Instance, error)
+
+ ActionRestore(*VirtualMachine) (*Instance, error)
+
+ ActionSetlabels(*VirtualMachine, *SetLabelsInput) (*Container, error)
+
+ ActionStart(*VirtualMachine) (*Instance, error)
+
+ ActionStop(*VirtualMachine, *InstanceStop) (*Instance, error)
+
+ ActionUpdate(*VirtualMachine) (*Instance, error)
+
+ ActionUpdatehealthy(*VirtualMachine) (*Instance, error)
+
+ ActionUpdatereinitializing(*VirtualMachine) (*Instance, error)
+
+ ActionUpdateunhealthy(*VirtualMachine) (*Instance, error)
+}
+
+func newVirtualMachineClient(rancherClient *RancherClient) *VirtualMachineClient {
+ return &VirtualMachineClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *VirtualMachineClient) Create(container *VirtualMachine) (*VirtualMachine, error) {
+ resp := &VirtualMachine{}
+ err := c.rancherClient.doCreate(VIRTUAL_MACHINE_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *VirtualMachineClient) Update(existing *VirtualMachine, updates interface{}) (*VirtualMachine, error) {
+ resp := &VirtualMachine{}
+ err := c.rancherClient.doUpdate(VIRTUAL_MACHINE_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *VirtualMachineClient) List(opts *ListOpts) (*VirtualMachineCollection, error) {
+ resp := &VirtualMachineCollection{}
+ err := c.rancherClient.doList(VIRTUAL_MACHINE_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *VirtualMachineCollection) Next() (*VirtualMachineCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &VirtualMachineCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *VirtualMachineClient) ById(id string) (*VirtualMachine, error) {
+ resp := &VirtualMachine{}
+ err := c.rancherClient.doById(VIRTUAL_MACHINE_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *VirtualMachineClient) Delete(container *VirtualMachine) error {
+ return c.rancherClient.doResourceDelete(VIRTUAL_MACHINE_TYPE, &container.Resource)
+}
+
+func (c *VirtualMachineClient) ActionAllocate(resource *VirtualMachine) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "allocate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionConsole(resource *VirtualMachine, input *InstanceConsoleInput) (*InstanceConsole, error) {
+
+ resp := &InstanceConsole{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "console", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionCreate(resource *VirtualMachine) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionDeallocate(resource *VirtualMachine) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "deallocate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionError(resource *VirtualMachine) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "error", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionExecute(resource *VirtualMachine, input *ContainerExec) (*HostAccess, error) {
+
+ resp := &HostAccess{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "execute", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionLogs(resource *VirtualMachine, input *ContainerLogs) (*HostAccess, error) {
+
+ resp := &HostAccess{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "logs", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionMigrate(resource *VirtualMachine) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "migrate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionProxy(resource *VirtualMachine, input *ContainerProxy) (*HostAccess, error) {
+
+ resp := &HostAccess{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "proxy", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionPurge(resource *VirtualMachine) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionRemove(resource *VirtualMachine) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionRestart(resource *VirtualMachine) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "restart", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionRestore(resource *VirtualMachine) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionSetlabels(resource *VirtualMachine, input *SetLabelsInput) (*Container, error) {
+
+ resp := &Container{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "setlabels", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionStart(resource *VirtualMachine) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "start", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionStop(resource *VirtualMachine, input *InstanceStop) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "stop", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionUpdate(resource *VirtualMachine) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionUpdatehealthy(resource *VirtualMachine) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "updatehealthy", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionUpdatereinitializing(resource *VirtualMachine) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "updatereinitializing", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VirtualMachineClient) ActionUpdateunhealthy(resource *VirtualMachine) (*Instance, error) {
+
+ resp := &Instance{}
+
+ err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "updateunhealthy", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_virtual_machine_disk.go b/vendor/github.com/rancher/go-rancher/client/generated_virtual_machine_disk.go
new file mode 100644
index 00000000..af52418d
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_virtual_machine_disk.go
@@ -0,0 +1,91 @@
+package client
+
+const (
+ VIRTUAL_MACHINE_DISK_TYPE = "virtualMachineDisk"
+)
+
+type VirtualMachineDisk struct {
+ Resource
+
+ Driver string `json:"driver,omitempty" yaml:"driver,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ Opts map[string]interface{} `json:"opts,omitempty" yaml:"opts,omitempty"`
+
+ ReadIops int64 `json:"readIops,omitempty" yaml:"read_iops,omitempty"`
+
+ Root bool `json:"root,omitempty" yaml:"root,omitempty"`
+
+ Size string `json:"size,omitempty" yaml:"size,omitempty"`
+
+ WriteIops int64 `json:"writeIops,omitempty" yaml:"write_iops,omitempty"`
+}
+
+type VirtualMachineDiskCollection struct {
+ Collection
+ Data []VirtualMachineDisk `json:"data,omitempty"`
+ client *VirtualMachineDiskClient
+}
+
+type VirtualMachineDiskClient struct {
+ rancherClient *RancherClient
+}
+
+type VirtualMachineDiskOperations interface {
+ List(opts *ListOpts) (*VirtualMachineDiskCollection, error)
+ Create(opts *VirtualMachineDisk) (*VirtualMachineDisk, error)
+ Update(existing *VirtualMachineDisk, updates interface{}) (*VirtualMachineDisk, error)
+ ById(id string) (*VirtualMachineDisk, error)
+ Delete(container *VirtualMachineDisk) error
+}
+
+func newVirtualMachineDiskClient(rancherClient *RancherClient) *VirtualMachineDiskClient {
+ return &VirtualMachineDiskClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *VirtualMachineDiskClient) Create(container *VirtualMachineDisk) (*VirtualMachineDisk, error) {
+ resp := &VirtualMachineDisk{}
+ err := c.rancherClient.doCreate(VIRTUAL_MACHINE_DISK_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *VirtualMachineDiskClient) Update(existing *VirtualMachineDisk, updates interface{}) (*VirtualMachineDisk, error) {
+ resp := &VirtualMachineDisk{}
+ err := c.rancherClient.doUpdate(VIRTUAL_MACHINE_DISK_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *VirtualMachineDiskClient) List(opts *ListOpts) (*VirtualMachineDiskCollection, error) {
+ resp := &VirtualMachineDiskCollection{}
+ err := c.rancherClient.doList(VIRTUAL_MACHINE_DISK_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *VirtualMachineDiskCollection) Next() (*VirtualMachineDiskCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &VirtualMachineDiskCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *VirtualMachineDiskClient) ById(id string) (*VirtualMachineDisk, error) {
+ resp := &VirtualMachineDisk{}
+ err := c.rancherClient.doById(VIRTUAL_MACHINE_DISK_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *VirtualMachineDiskClient) Delete(container *VirtualMachineDisk) error {
+ return c.rancherClient.doResourceDelete(VIRTUAL_MACHINE_DISK_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_volume.go b/vendor/github.com/rancher/go-rancher/client/generated_volume.go
new file mode 100644
index 00000000..02ea2e51
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_volume.go
@@ -0,0 +1,240 @@
+package client
+
+const (
+ VOLUME_TYPE = "volume"
+)
+
+type Volume struct {
+ Resource
+
+ AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"`
+
+ AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"`
+
+ Created string `json:"created,omitempty" yaml:"created,omitempty"`
+
+ Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"`
+
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+
+ Driver string `json:"driver,omitempty" yaml:"driver,omitempty"`
+
+ DriverOpts map[string]interface{} `json:"driverOpts,omitempty" yaml:"driver_opts,omitempty"`
+
+ ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"`
+
+ ImageId string `json:"imageId,omitempty" yaml:"image_id,omitempty"`
+
+ InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"`
+
+ IsHostPath bool `json:"isHostPath,omitempty" yaml:"is_host_path,omitempty"`
+
+ Kind string `json:"kind,omitempty" yaml:"kind,omitempty"`
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+
+ RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"`
+
+ Removed string `json:"removed,omitempty" yaml:"removed,omitempty"`
+
+ State string `json:"state,omitempty" yaml:"state,omitempty"`
+
+ Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"`
+
+ TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"`
+
+ TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"`
+
+ Uri string `json:"uri,omitempty" yaml:"uri,omitempty"`
+
+ Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"`
+}
+
+type VolumeCollection struct {
+ Collection
+ Data []Volume `json:"data,omitempty"`
+ client *VolumeClient
+}
+
+type VolumeClient struct {
+ rancherClient *RancherClient
+}
+
+type VolumeOperations interface {
+ List(opts *ListOpts) (*VolumeCollection, error)
+ Create(opts *Volume) (*Volume, error)
+ Update(existing *Volume, updates interface{}) (*Volume, error)
+ ById(id string) (*Volume, error)
+ Delete(container *Volume) error
+
+ ActionActivate(*Volume) (*Volume, error)
+
+ ActionAllocate(*Volume) (*Volume, error)
+
+ ActionCreate(*Volume) (*Volume, error)
+
+ ActionDeallocate(*Volume) (*Volume, error)
+
+ ActionPurge(*Volume) (*Volume, error)
+
+ ActionRemove(*Volume) (*Volume, error)
+
+ ActionRestore(*Volume) (*Volume, error)
+
+ ActionRestorefrombackup(*Volume, *RestoreFromBackupInput) (*Volume, error)
+
+ ActionReverttosnapshot(*Volume, *RevertToSnapshotInput) (*Volume, error)
+
+ ActionSnapshot(*Volume, *VolumeSnapshotInput) (*Snapshot, error)
+
+ ActionUpdate(*Volume) (*Volume, error)
+}
+
+func newVolumeClient(rancherClient *RancherClient) *VolumeClient {
+ return &VolumeClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *VolumeClient) Create(container *Volume) (*Volume, error) {
+ resp := &Volume{}
+ err := c.rancherClient.doCreate(VOLUME_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *VolumeClient) Update(existing *Volume, updates interface{}) (*Volume, error) {
+ resp := &Volume{}
+ err := c.rancherClient.doUpdate(VOLUME_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *VolumeClient) List(opts *ListOpts) (*VolumeCollection, error) {
+ resp := &VolumeCollection{}
+ err := c.rancherClient.doList(VOLUME_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *VolumeCollection) Next() (*VolumeCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &VolumeCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *VolumeClient) ById(id string) (*Volume, error) {
+ resp := &Volume{}
+ err := c.rancherClient.doById(VOLUME_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *VolumeClient) Delete(container *Volume) error {
+ return c.rancherClient.doResourceDelete(VOLUME_TYPE, &container.Resource)
+}
+
+func (c *VolumeClient) ActionActivate(resource *Volume) (*Volume, error) {
+
+ resp := &Volume{}
+
+ err := c.rancherClient.doAction(VOLUME_TYPE, "activate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VolumeClient) ActionAllocate(resource *Volume) (*Volume, error) {
+
+ resp := &Volume{}
+
+ err := c.rancherClient.doAction(VOLUME_TYPE, "allocate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VolumeClient) ActionCreate(resource *Volume) (*Volume, error) {
+
+ resp := &Volume{}
+
+ err := c.rancherClient.doAction(VOLUME_TYPE, "create", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VolumeClient) ActionDeallocate(resource *Volume) (*Volume, error) {
+
+ resp := &Volume{}
+
+ err := c.rancherClient.doAction(VOLUME_TYPE, "deallocate", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VolumeClient) ActionPurge(resource *Volume) (*Volume, error) {
+
+ resp := &Volume{}
+
+ err := c.rancherClient.doAction(VOLUME_TYPE, "purge", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VolumeClient) ActionRemove(resource *Volume) (*Volume, error) {
+
+ resp := &Volume{}
+
+ err := c.rancherClient.doAction(VOLUME_TYPE, "remove", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VolumeClient) ActionRestore(resource *Volume) (*Volume, error) {
+
+ resp := &Volume{}
+
+ err := c.rancherClient.doAction(VOLUME_TYPE, "restore", &resource.Resource, nil, resp)
+
+ return resp, err
+}
+
+func (c *VolumeClient) ActionRestorefrombackup(resource *Volume, input *RestoreFromBackupInput) (*Volume, error) {
+
+ resp := &Volume{}
+
+ err := c.rancherClient.doAction(VOLUME_TYPE, "restorefrombackup", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *VolumeClient) ActionReverttosnapshot(resource *Volume, input *RevertToSnapshotInput) (*Volume, error) {
+
+ resp := &Volume{}
+
+ err := c.rancherClient.doAction(VOLUME_TYPE, "reverttosnapshot", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *VolumeClient) ActionSnapshot(resource *Volume, input *VolumeSnapshotInput) (*Snapshot, error) {
+
+ resp := &Snapshot{}
+
+ err := c.rancherClient.doAction(VOLUME_TYPE, "snapshot", &resource.Resource, input, resp)
+
+ return resp, err
+}
+
+func (c *VolumeClient) ActionUpdate(resource *Volume) (*Volume, error) {
+
+ resp := &Volume{}
+
+ err := c.rancherClient.doAction(VOLUME_TYPE, "update", &resource.Resource, nil, resp)
+
+ return resp, err
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/generated_volume_snapshot_input.go b/vendor/github.com/rancher/go-rancher/client/generated_volume_snapshot_input.go
new file mode 100644
index 00000000..2e2425a2
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/generated_volume_snapshot_input.go
@@ -0,0 +1,79 @@
+package client
+
+const (
+ VOLUME_SNAPSHOT_INPUT_TYPE = "volumeSnapshotInput"
+)
+
+type VolumeSnapshotInput struct {
+ Resource
+
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+}
+
+type VolumeSnapshotInputCollection struct {
+ Collection
+ Data []VolumeSnapshotInput `json:"data,omitempty"`
+ client *VolumeSnapshotInputClient
+}
+
+type VolumeSnapshotInputClient struct {
+ rancherClient *RancherClient
+}
+
+type VolumeSnapshotInputOperations interface {
+ List(opts *ListOpts) (*VolumeSnapshotInputCollection, error)
+ Create(opts *VolumeSnapshotInput) (*VolumeSnapshotInput, error)
+ Update(existing *VolumeSnapshotInput, updates interface{}) (*VolumeSnapshotInput, error)
+ ById(id string) (*VolumeSnapshotInput, error)
+ Delete(container *VolumeSnapshotInput) error
+}
+
+func newVolumeSnapshotInputClient(rancherClient *RancherClient) *VolumeSnapshotInputClient {
+ return &VolumeSnapshotInputClient{
+ rancherClient: rancherClient,
+ }
+}
+
+func (c *VolumeSnapshotInputClient) Create(container *VolumeSnapshotInput) (*VolumeSnapshotInput, error) {
+ resp := &VolumeSnapshotInput{}
+ err := c.rancherClient.doCreate(VOLUME_SNAPSHOT_INPUT_TYPE, container, resp)
+ return resp, err
+}
+
+func (c *VolumeSnapshotInputClient) Update(existing *VolumeSnapshotInput, updates interface{}) (*VolumeSnapshotInput, error) {
+ resp := &VolumeSnapshotInput{}
+ err := c.rancherClient.doUpdate(VOLUME_SNAPSHOT_INPUT_TYPE, &existing.Resource, updates, resp)
+ return resp, err
+}
+
+func (c *VolumeSnapshotInputClient) List(opts *ListOpts) (*VolumeSnapshotInputCollection, error) {
+ resp := &VolumeSnapshotInputCollection{}
+ err := c.rancherClient.doList(VOLUME_SNAPSHOT_INPUT_TYPE, opts, resp)
+ resp.client = c
+ return resp, err
+}
+
+func (cc *VolumeSnapshotInputCollection) Next() (*VolumeSnapshotInputCollection, error) {
+ if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" {
+ resp := &VolumeSnapshotInputCollection{}
+ err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp)
+ resp.client = cc.client
+ return resp, err
+ }
+ return nil, nil
+}
+
+func (c *VolumeSnapshotInputClient) ById(id string) (*VolumeSnapshotInput, error) {
+ resp := &VolumeSnapshotInput{}
+ err := c.rancherClient.doById(VOLUME_SNAPSHOT_INPUT_TYPE, id, resp)
+ if apiError, ok := err.(*ApiError); ok {
+ if apiError.StatusCode == 404 {
+ return nil, nil
+ }
+ }
+ return resp, err
+}
+
+func (c *VolumeSnapshotInputClient) Delete(container *VolumeSnapshotInput) error {
+ return c.rancherClient.doResourceDelete(VOLUME_SNAPSHOT_INPUT_TYPE, &container.Resource)
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/schemas.go b/vendor/github.com/rancher/go-rancher/client/schemas.go
new file mode 100644
index 00000000..3d678340
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/schemas.go
@@ -0,0 +1,134 @@
+package client
+
+import (
+ "reflect"
+ "strings"
+)
+
+type Schemas struct {
+ Collection
+ Data []Schema `json:"data,omitempty"`
+ schemasByName map[string]*Schema
+}
+
+func (s *Schema) CheckField(name string) (Field, bool) {
+ for fieldName := range s.ResourceFields {
+ if fieldName == name {
+ v, ok := s.ResourceFields[fieldName]
+ return v, ok
+ }
+ }
+ return Field{}, false
+}
+
+func (s *Schema) Field(name string) Field {
+ f, _ := s.CheckField(name)
+ return f
+}
+
+func (s *Schemas) CheckSchema(name string) (Schema, bool) {
+ for i := range s.Data {
+ if strings.ToLower(s.Data[i].Id) == strings.ToLower(name) {
+ return s.Data[i], true
+ }
+ }
+ return Schema{}, false
+}
+
+func (s *Schemas) Schema(name string) Schema {
+ r, _ := s.CheckSchema(name)
+ return r
+}
+
+func typeToFields(t reflect.Type) map[string]Field {
+ result := map[string]Field{}
+
+ for i := 0; i < t.NumField(); i++ {
+ schemaField := Field{}
+
+ typeField := t.Field(i)
+ if typeField.Anonymous && typeField.Type.Kind() == reflect.Struct {
+ parentFields := typeToFields(typeField.Type)
+ for k, v := range result {
+ parentFields[k] = v
+ }
+ result = parentFields
+ continue
+ } else if typeField.Anonymous {
+ continue
+ } else if privateFieldRegex.FindStringIndex(typeField.Name) != nil {
+ continue
+ }
+
+ fieldString := strings.ToLower(typeField.Type.Kind().String())
+
+ switch {
+ case strings.HasPrefix(fieldString, "int") || strings.HasPrefix(fieldString, "uint"):
+ schemaField.Type = "int"
+ case fieldString == "bool":
+ schemaField.Type = fieldString
+ case fieldString == "float32" || fieldString == "float64":
+ schemaField.Type = "float"
+ case fieldString == "string":
+ schemaField.Type = "string"
+ case fieldString == "map":
+ // HACK
+ schemaField.Type = "map[string]"
+ case fieldString == "slice":
+ // HACK
+ schemaField.Type = "array[string]"
+ case fieldString == "struct":
+ schemaField.Type = typeField.Type.String()
+
+ }
+
+ name := strings.Split(typeField.Tag.Get("json"), ",")[0]
+ if name == "" && len(typeField.Name) > 1 {
+ name = strings.ToLower(typeField.Name[0:1]) + typeField.Name[1:]
+ } else if name == "" {
+ name = typeField.Name
+ }
+
+ if schemaField.Type != "" {
+ result[name] = schemaField
+ }
+ }
+
+ return result
+}
+
+func (s *Schemas) AddType(schemaName string, obj interface{}) *Schema {
+ t := reflect.TypeOf(obj)
+ schema := Schema{
+ Resource: Resource{
+ Id: schemaName,
+ Type: "schema",
+ Links: map[string]string{},
+ },
+ PluralName: guessPluralName(schemaName),
+ ResourceFields: typeToFields(t),
+ CollectionMethods: []string{"GET"},
+ ResourceMethods: []string{"GET"},
+ }
+
+ if s.Data == nil {
+ s.Data = []Schema{}
+ }
+
+ s.Data = append(s.Data, schema)
+
+ return &s.Data[len(s.Data)-1]
+}
+
+func guessPluralName(name string) string {
+ if name == "" {
+ return ""
+ }
+
+ if strings.HasSuffix(name, "s") ||
+ strings.HasSuffix(name, "ch") ||
+ strings.HasSuffix(name, "x") {
+ return name + "es"
+ }
+ return name + "s"
+}
diff --git a/vendor/github.com/rancher/go-rancher/client/types.go b/vendor/github.com/rancher/go-rancher/client/types.go
new file mode 100644
index 00000000..905df87f
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/client/types.go
@@ -0,0 +1,95 @@
+package client
+
+type Collection struct {
+ Type string `json:"type,omitempty"`
+ ResourceType string `json:"resourceType,omitempty"`
+ Links map[string]string `json:"links,omitempty"`
+ CreateTypes map[string]string `json:"createTypes,omitempty"`
+ Actions map[string]string `json:"actions,omitempty"`
+ SortLinks map[string]string `json:"sortLinks,omitempty"`
+ Pagination *Pagination `json:"pagination,omitempty"`
+ Sort *Sort `json:"sort,omitempty"`
+ Filters map[string][]Condition `json:"filters,omitempty"`
+}
+
+type GenericCollection struct {
+ Collection
+ Data []interface{} `json:"data,omitempty"`
+}
+
+type ResourceCollection struct {
+ Collection
+ Data []Resource `json:"data,omitempty"`
+}
+
+type Sort struct {
+ Name string `json:"name,omitempty"`
+ Order string `json:"order,omitempty"`
+ Reverse string `json:"reverse,omitempty"`
+}
+
+type Condition struct {
+ Modifier string `json:"modifier,omitempty"`
+ Value interface{} `json:"value,omitempty"`
+}
+
+type Pagination struct {
+ Marker string `json:"marker,omitempty"`
+ First string `json:"first,omitempty"`
+ Previous string `json:"previous,omitempty"`
+ Next string `json:"next,omitempty"`
+ Limit *int64 `json:"limit,omitempty"`
+ Total *int64 `json:"total,omitempty"`
+ Partial bool `json:"partial,omitempty"`
+}
+
+type Resource struct {
+ Id string `json:"id,omitempty"`
+ Type string `json:"type,omitempty"`
+ Links map[string]string `json:"links"`
+ Actions map[string]string `json:"actions"`
+}
+
+type Schema struct {
+ Resource
+ PluralName string `json:"pluralName,omitempty"`
+ ResourceMethods []string `json:"resourceMethods,omitempty"`
+ ResourceFields map[string]Field `json:"resourceFields,omitempty"`
+ ResourceActions map[string]Action `json:"resourceActions,omitempty"`
+ CollectionMethods []string `json:"collectionMethods,omitempty"`
+ CollectionFields map[string]Field `json:"collectionFields,omitempty"`
+ CollectionActions map[string]Action `json:"collectionActions,omitempty"`
+ CollectionFilters map[string]Filter `json:"collectionFilters,omitempty"`
+ IncludeableLinks []string `json:"includeableLinks,omitempty"`
+}
+
+type Field struct {
+ Type string `json:"type,omitempty"`
+ Default interface{} `json:"default,omitempty"`
+ Unique bool `json:"unique,omitempty"`
+ Nullable bool `json:"nullable,omitempty"`
+ Create bool `json:"create,omitempty"`
+ Required bool `json:"required,omitempty"`
+ Update bool `json:"update,omitempty"`
+ MinLength *int64 `json:"minLength,omitempty"`
+ MaxLength *int64 `json:"maxLength,omitempty"`
+ Min *int64 `json:"min,omitempty"`
+ Max *int64 `json:"max,omitempty"`
+ Options []string `json:"options,omitempty"`
+ ValidChars string `json:"validChars,omitempty"`
+ InvalidChars string `json:"invalidChars,omitempty"`
+ Description string `json:"description,omitempty"`
+}
+
+type Action struct {
+ Input string `json:"input,omitempty"`
+ Output string `json:"output,omitempty"`
+}
+
+type Filter struct {
+ Modifiers []string `json:"modifiers,omitempty"`
+}
+
+type ListOpts struct {
+ Filters map[string]interface{}
+}
diff --git a/vendor/github.com/rancher/go-rancher/docs/api_common_functions.go b/vendor/github.com/rancher/go-rancher/docs/api_common_functions.go
new file mode 100644
index 00000000..78c9ed64
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/docs/api_common_functions.go
@@ -0,0 +1,132 @@
+package main
+
+import (
+ "encoding/json"
+ "io/ioutil"
+ "os"
+
+ yaml "gopkg.in/yaml.v2"
+
+ "github.com/rancher/go-rancher/client"
+)
+
+const (
+ apiOutputDir = "./output"
+ apiInputDir = "./input"
+ postAPI = "POST"
+)
+
+var (
+ blacklistTypes map[string]bool
+ blacklistCollectionResources map[string]bool
+ blacklistActions map[string]bool
+ blacklistResourceActions map[string]bool
+ blacklistResourceFields map[string]bool
+ resourceDescriptionsMap map[string]string
+)
+
+func init() {
+ blacklistTypes = make(map[string]bool)
+ blacklistTypes["schema"] = true
+ blacklistTypes["resource"] = true
+ blacklistTypes["collection"] = true
+ blacklistCollectionResources = make(map[string]bool)
+ resourceDescriptionsMap = make(map[string]string)
+
+}
+
+func readCattleSchema() (client.Schemas, error) {
+
+ var schemas client.Schemas
+
+ schemaBytes, err := ioutil.ReadFile(apiInputDir + "/schemas.json")
+ if err != nil {
+ return schemas, err
+ }
+
+ if err = json.Unmarshal(schemaBytes, &schemas); err != nil {
+ return schemas, err
+ }
+
+ return schemas, nil
+}
+
+func readBlacklistFiles() error {
+
+ //Create list of blacklist collections (collections that will not show up on navbar or have actions)
+ composeBytes, err := ioutil.ReadFile(apiInputDir + "/schema-check/blacklist_collections.yml")
+ if err != nil {
+ return err
+ }
+ if err = yaml.Unmarshal(composeBytes, &blacklistCollectionResources); err != nil {
+ return err
+ }
+
+ //Create list of blacklist actions (list of ALL actions to be hidden for ALL resources)
+ composeBytes, err = ioutil.ReadFile(apiInputDir + "/schema-check//blacklist_actions.yml")
+ if err != nil {
+ return err
+ }
+ if err = yaml.Unmarshal(composeBytes, &blacklistActions); err != nil {
+ return err
+ }
+
+ //Create list of blacklist actions specific to a resource (list of actions to be hidden for certain resources)
+ composeBytes, err = ioutil.ReadFile(apiInputDir + "/schema-check//blacklist_resource_actions.yml")
+ if err != nil {
+ return err
+ }
+ if err = yaml.Unmarshal(composeBytes, &blacklistResourceActions); err != nil {
+ return err
+ }
+
+ //Create list of blacklist fields specific to a resource (list of fields to be hidden for certain resources)
+ composeBytes, err = ioutil.ReadFile(apiInputDir + "/schema-check//blacklist_resource_fields.yml")
+ if err != nil {
+ return err
+ }
+ if err = yaml.Unmarshal(composeBytes, &blacklistResourceFields); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func isBlacklistCollection(resourceName string) bool {
+ if blacklistCollectionResources[resourceName] {
+ return true
+ }
+ return false
+}
+
+func isBlacklistAction(resourceName string, actionName string) bool {
+ if blacklistActions[actionName] || blacklistResourceActions[resourceName+"-"+actionName] {
+ return true
+ }
+ return false
+}
+
+func isBlacklistField(resourceName string, fieldName string) bool {
+ if blacklistResourceFields[resourceName+"-"+fieldName] {
+ return true
+ }
+ return false
+}
+
+func readGenDescFile(structure map[string]string) error {
+ //read yaml file to load the common desc
+ composeBytes, err := ioutil.ReadFile("./input/generic_descriptions.yml")
+ if err != nil {
+ return err
+ }
+
+ return yaml.Unmarshal(composeBytes, &structure)
+}
+
+func setupDirectory(dir string) error {
+ if _, err := os.Stat(dir); os.IsNotExist(err) {
+ return os.MkdirAll(dir, 0755)
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/rancher/go-rancher/docs/api_description_generator.go b/vendor/github.com/rancher/go-rancher/docs/api_description_generator.go
new file mode 100644
index 00000000..3a61d69d
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/docs/api_description_generator.go
@@ -0,0 +1,165 @@
+package main
+
+import (
+ "os"
+ "path"
+ "regexp"
+ "strings"
+ "text/template"
+)
+
+var (
+ descRegexp *regexp.Regexp = regexp.MustCompile(``)
+ optionsRegexp *regexp.Regexp = regexp.MustCompile(``)
+)
+
+func generateDescriptionFile(emptyDesc bool, collectionOnly bool, showDesc bool, showActions bool, showResourceFields bool) error {
+ //func generateDescriptionFile(emptyDesc bool, collectionOnly bool) error {
+ schemas, err := readCattleSchema()
+
+ if err != nil {
+ return err
+ }
+
+ if err = readBlacklistFiles(); err != nil {
+ return err
+ }
+
+ genericDescMap := make(map[string]string)
+ err = readGenDescFile(genericDescMap)
+ if err != nil {
+ return err
+ }
+
+ for _, resourceSchema := range schemas.Data {
+ //Check if it's an invalid Resource Type
+ if blacklistTypes[resourceSchema.Id] {
+ continue
+ }
+ /*
+ //Only print out collection links for the collection yml
+ if collectionOnly {
+ // If it's not a collection or it's a blacklist Collection, skip
+ if _, isCollection := resourceSchema.Links["collection"]; !isCollection || isBlacklistCollection(resourceSchema.Id) {
+ continue
+ }
+ } else {
+ //Only add in actions and fields for non-collection only files
+ for actionName := range resourceSchema.ResourceActions {
+ if !isBlacklistAction(resourceSchema.Id, actionName) {
+ if emptyDesc {
+ resourceDescriptionsMap[resourceSchema.Id+"-resourceActions-"+actionName] = ""
+ //resourceDescriptionsMap[resourceSchema.Id+"-"+actionName] = ""
+ } else {
+ resourceDescriptionsMap[resourceSchema.Id+"-resourceActions-"+actionName] = "To " + actionName + " the " + resourceSchema.Id
+ }
+ }
+ }
+
+ for fieldName, field := range resourceSchema.ResourceFields {
+ if emptyDesc {
+ resourceDescriptionsMap[resourceSchema.Id+"-resourceFields-"+fieldName] = ""
+ //resourceDescriptionsMap[resourceSchema.Id+"-"+fieldName] = ""
+ } else {
+ //check if a generic desc exists
+ var description string
+ if genericDesc, ok := genericDescMap[fieldName]; ok {
+ description = descRegexp.ReplaceAllString(genericDesc, resourceSchema.Id)
+ description = optionsRegexp.ReplaceAllString(description, "["+strings.Join(field.Options, ", ")+"]")
+ }
+ //else {
+ //description = "The " + fieldName + " for the " + schema.Id
+ //}
+ resourceDescriptionsMap[resourceSchema.Id+"-resourceFields-"+fieldName] = description
+ }
+ }
+ }
+ resourceDescriptionsMap[resourceSchema.Id+"-description"] = ""
+ */
+
+ visibleCollection := false
+
+ // If it's a collection or not a blacklist Collection, set true
+ if _, isCollection := resourceSchema.Links["collection"]; isCollection && !isBlacklistCollection(resourceSchema.Id) {
+ visibleCollection = true
+ }
+
+ //Only print out collection links
+ if collectionOnly && !visibleCollection {
+ continue
+ }
+
+ if showDesc {
+ resourceDescriptionsMap[resourceSchema.Id+"-description"] = ""
+ }
+
+ if showActions {
+ for actionName := range resourceSchema.ResourceActions {
+ if !isBlacklistAction(resourceSchema.Id, actionName) {
+ if emptyDesc {
+ resourceDescriptionsMap[resourceSchema.Id+"-resourceActions-"+actionName] = ""
+ //resourceDescriptionsMap[resourceSchema.Id+"-"+actionName] = ""
+ } else {
+ resourceDescriptionsMap[resourceSchema.Id+"-resourceActions-"+actionName] = "To " + actionName + " the " + resourceSchema.Id
+ }
+ }
+ }
+ }
+
+ if showResourceFields {
+ for fieldName, field := range resourceSchema.ResourceFields {
+ if emptyDesc {
+ resourceDescriptionsMap[resourceSchema.Id+"-resourceFields-"+fieldName] = ""
+ //resourceDescriptionsMap[resourceSchema.Id+"-"+fieldName] = ""
+ } else {
+ //check if a generic desc exists
+ var description string
+ if genericDesc, ok := genericDescMap[fieldName]; ok {
+ description = descRegexp.ReplaceAllString(genericDesc, resourceSchema.Id)
+ description = optionsRegexp.ReplaceAllString(description, strings.Join(field.Options, ", "))
+ } else {
+ //if enum, show list of options
+ if field.Type == "enum" {
+ description = "The options are " + strings.Join(field.Options, ", ") + "."
+ }
+ //description = "The " + fieldName + " for the " + schema.Id
+ }
+ resourceDescriptionsMap[resourceSchema.Id+"-resourceFields-"+fieldName] = description
+ }
+ }
+ }
+ }
+
+ if err = setupDirectory(apiOutputDir); err != nil {
+ return err
+ }
+
+ var filePrefix string
+ if collectionOnly {
+ filePrefix = "blank_collection_"
+ } else if emptyDesc {
+ if showResourceFields && !showDesc && !showActions {
+ filePrefix = "valid_example_"
+ } else {
+ filePrefix = "blank_"
+ }
+ }
+
+ output, err := os.Create(path.Join(apiInputDir, "/schema-check/"+filePrefix+"api_description.yml"))
+ if err != nil {
+ return err
+ }
+
+ defer output.Close()
+
+ data := map[string]interface{}{
+ "descriptionMap": resourceDescriptionsMap,
+ }
+
+ typeTemplate, err := template.New("apiDescription.template").ParseFiles("./templates/apiDescription.template")
+ if err != nil {
+ return err
+ }
+
+ return typeTemplate.Execute(output, data)
+}
diff --git a/vendor/github.com/rancher/go-rancher/docs/api_doc_generator.go b/vendor/github.com/rancher/go-rancher/docs/api_doc_generator.go
new file mode 100644
index 00000000..80096415
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/docs/api_doc_generator.go
@@ -0,0 +1,650 @@
+package main
+
+import (
+ "encoding/json"
+ "fmt"
+ "io/ioutil"
+ "os"
+ "path"
+ "regexp"
+ "strings"
+ "text/template"
+
+ yaml "gopkg.in/yaml.v2"
+
+ "github.com/rancher/go-rancher/client"
+)
+
+var (
+ commonFieldsMap map[string]bool
+ schemaMap map[string]client.Schema
+ referenceRegexp *regexp.Regexp = regexp.MustCompile(`reference\[([a-zA-Z]+)\]`)
+ descriptionsMap map[string]string
+ genericDescriptionsMap map[string]string
+)
+
+func init() {
+ commonFieldsMap = make(map[string]bool)
+ schemaMap = make(map[string]client.Schema)
+ descriptionsMap = make(map[string]string)
+ genericDescriptionsMap = make(map[string]string)
+}
+
+//APIField is to add in description and provide URL
+type APIField struct {
+ client.Field
+ Description string `json:"description"`
+ TypeURL string
+}
+
+type APIAction struct {
+ ResourceName string
+ Input ActionInput
+ Output string
+ Description string `json:"description"`
+ Method string
+ ActionURL string
+}
+
+type ActionInput struct {
+ Name string
+ FieldMap map[string]APIField
+ InputJSON string
+}
+
+func generateFiles() error {
+ schemas, err := readCattleSchema()
+
+ if err != nil {
+ return err
+ }
+
+ if err = readBlacklistFiles(); err != nil {
+ return err
+ }
+
+ if err = readInputFiles(); err != nil {
+ return err
+ }
+
+ if err = setupDirectory(apiOutputDir + "/" + *apiVersion + "/api-resources/"); err != nil {
+ return err
+ }
+
+ //Create a map of all resources but exclude the blacklist items
+
+ for _, resourceSchema := range schemas.Data {
+ //Filter out any blacklist types
+ if blacklistTypes[resourceSchema.Id] {
+ continue
+ }
+
+ //Create a new Resource Action Map to eliminate any blacklist actions
+ resourceActionMap := make(map[string]client.Action)
+
+ //Add in check if resourceAction should be should be visible
+ for resourceAction, resourceActionValue := range resourceSchema.ResourceActions {
+ if !isBlacklistAction(resourceSchema.Id, resourceAction) {
+ resourceActionMap[resourceAction] = resourceActionValue
+ }
+ }
+
+ //Update the resource actions to the new resource action map
+ resourceSchema.ResourceActions = resourceActionMap
+
+ if !isBlacklistCollection(resourceSchema.Id) {
+ for key := range resourceSchema.Resource.Links {
+ if key == "collection" {
+ //Add a link to show the resource for the visible pages
+ resourceSchema.Resource.Links["showResource"] = "true"
+ }
+ }
+ }
+
+ schemaMap[resourceSchema.Id] = resourceSchema
+ }
+
+ generateCollectionResourcePages()
+
+ for _, schema := range schemaMap {
+ //Add in check to show if collection should be visible and if actions should be shown
+ showActions := false
+
+ if _, ok := schema.Resource.Links["showResource"]; ok {
+ showActions = true
+ }
+
+ if err = generateIndividualDocs(schema, showActions); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func readInputFiles() error {
+
+ //Read API Description Files for All Resources
+ composeBytes, err := ioutil.ReadFile(apiInputDir + "/schema-check/api_description.yml")
+ if err != nil {
+ return err
+ }
+ //resourceDescriptionsMap = make(map[string]string)
+
+ if err = yaml.Unmarshal(composeBytes, &descriptionsMap); err != nil {
+ return err
+ }
+
+ //Read API Description for the Manual Descriptions
+ composeBytes, err = ioutil.ReadFile(apiInputDir + "/api_description_override_apiVersion.yml")
+ if err != nil {
+ return err
+ }
+
+ descriptionsOverrideMap := make(map[string]string)
+
+ if err = yaml.Unmarshal(composeBytes, descriptionsOverrideMap); err != nil {
+ return err
+ }
+
+ for key, desc := range descriptionsOverrideMap {
+ //if desc != "" {
+ descriptionsMap[key] = desc
+ //}
+ }
+
+ //Read API Description Files for Collection Only Resources
+ composeBytes, err = ioutil.ReadFile(apiInputDir + "/collection_api_description_apiVersion.yml")
+ if err != nil {
+ return err
+ }
+ collectionDescriptionsMap := make(map[string]string)
+
+ if err = yaml.Unmarshal(composeBytes, collectionDescriptionsMap); err != nil {
+ return err
+ }
+
+ for key, desc := range collectionDescriptionsMap {
+ //if desc != "" {
+ descriptionsMap[key] = desc
+ //}
+ }
+ //read yaml file to load the common fields
+ composeBytes, err = ioutil.ReadFile(apiInputDir + "/common_fields.yml")
+ if err != nil {
+ return err
+ }
+
+ if err = yaml.Unmarshal(composeBytes, &commonFieldsMap); err != nil {
+ return err
+ }
+
+ //read yaml file to load the generic description fields
+ composeBytes, err = ioutil.ReadFile(apiInputDir + "/generic_descriptions.yml")
+ if err != nil {
+ return err
+ }
+
+ return yaml.Unmarshal(composeBytes, &genericDescriptionsMap)
+}
+
+func generateCollectionResourcePages() error {
+ data := map[string]interface{}{
+ "schemaMap": schemaMap,
+ "version": version,
+ "language": language,
+ "layout": layout,
+ "apiVersion": apiVersion,
+ }
+
+ funcMap := template.FuncMap{
+ "getResourceDescription": getResourceDescription,
+ "capitalize": strings.Title,
+ }
+
+ //Create main page of collection resources
+ output, err := os.Create(path.Join(apiOutputDir, *apiVersion, "api-resources", "index.md"))
+
+ if err != nil {
+ return err
+ }
+
+ defer output.Close()
+
+ typeTemplate, err := template.New("apiHomePage.template").Funcs(funcMap).ParseFiles("./templates/apiHomePage.template")
+ if err != nil {
+ return err
+ }
+
+ if err = typeTemplate.Execute(output, data); err != nil {
+ return err
+ }
+
+ //Create Navigation Side Bar file for docs site
+ apiNavBarName := "rancher-api-" + *apiVersion + "-sidebar-" + *version + ".html"
+ fmt.Println(apiNavBarName)
+
+ output, err = os.Create(path.Join(apiOutputDir, apiNavBarName))
+
+ if err != nil {
+ return err
+ }
+
+ defer output.Close()
+
+ typeTemplate, err = template.New("apiNavBar.template").Funcs(funcMap).ParseFiles("./templates/apiNavBar.template")
+ if err != nil {
+ return err
+ }
+
+ if err = typeTemplate.Execute(output, data); err != nil {
+ return err
+ }
+
+ //Create operation-check file to look at what collection resources have create/update/delete
+ output, err = os.Create(path.Join(apiOutputDir, *apiVersion, "operations.yml"))
+
+ if err != nil {
+ return err
+ }
+
+ defer output.Close()
+
+ typeTemplate, err = template.New("apiOperationCheck.template").Funcs(funcMap).ParseFiles("./templates/apiOperationCheck.template")
+ if err != nil {
+ return err
+ }
+ return typeTemplate.Execute(output, data)
+}
+
+func generateIndividualDocs(schema client.Schema, showActions bool) error {
+ if err := setupDirectory(apiOutputDir + "/" + *apiVersion + "/api-resources/" + schema.Id); err != nil {
+ return err
+ }
+
+ output, err := os.Create(path.Join(apiOutputDir, *apiVersion, "api-resources", schema.Id, "index.md"))
+
+ if err != nil {
+ return err
+ }
+
+ defer output.Close()
+
+ data := map[string]interface{}{
+ "schemaId": schema.Id,
+ "resourceDescription": getResourceDescription(schema.Id),
+ "writeableFieldMap": getFieldMap(schema, !showActions, true, false),
+ "readOnlyFieldMap": getFieldMap(schema, !showActions, false, true),
+ "operationMap": getActionMap(schema, true),
+ "actionMap": getActionMap(schema, false),
+ "pluralName": schema.PluralName,
+ "version": version,
+ "apiVersion": apiVersion,
+ "language": language,
+ "layout": layout,
+ }
+
+ funcMap := template.FuncMap{
+ "getResourceDescription": getResourceDescription,
+ "capitalize": strings.Title,
+ }
+
+ var templateName string
+
+ if showActions {
+ templateName = "apiResource.template"
+ } else {
+ templateName = "apiActionInput.template"
+ }
+
+ typeTemplate, err := template.New(templateName).Funcs(funcMap).ParseFiles("./templates/" + templateName)
+ if err != nil {
+ return err
+ }
+
+ return typeTemplate.Execute(output, data)
+}
+
+func getResourceDescription(resourceID string) string {
+ var desc string
+
+ if updatedDesc, inDescMap := descriptionsMap[resourceID+"-description"]; inDescMap {
+ return updatedDesc
+ }
+
+ return desc
+}
+
+func getFieldMap(schema client.Schema, includeCommon bool, writeable bool, readOnly bool) map[string]APIField {
+ fieldMap := make(map[string]APIField)
+
+ for fieldName, field := range schema.ResourceFields {
+ // Skip any fields that are in the common field list
+ if !includeCommon && commonFieldsMap[fieldName] {
+ continue
+ } else if isBlacklistField(schema.Id, fieldName) {
+ continue
+ }
+
+ includeAPIField := false
+
+ if writeable {
+ if field.Create || field.Update {
+ includeAPIField = true
+ }
+ }
+ if readOnly {
+ if !field.Create && !field.Update {
+ includeAPIField = true
+ }
+ }
+
+ if includeAPIField {
+ apiField := APIField{}
+ apiField.Field = field
+ apiField.Description = getFieldDescription(schema.Id, fieldName, field)
+
+ if referenceRegexp.MatchString(field.Type) {
+ //put the link to the referenced field in the form
+ //[type]({{site.baseurl}}/rancher/{{page.version}}/{{page.lang}}/api/api-resources/type/)
+ apiField.TypeURL = getRefTypeURL(field.Type)
+ } else if strings.HasSuffix(field.Type, "]") {
+ //Update other types that have references to other resources
+ apiField.TypeURL = getTypeURL(field.Type)
+ } else if _, isResourceType := schemaMap[field.Type]; isResourceType {
+ apiField.TypeURL = "[" + field.Type + "]({{site.baseurl}}/rancher/{{page.version}}/{{page.lang}}/api/{{page.apiVersion}}/api-resources/" + field.Type + "/)"
+ }
+
+ if field.Default == nil {
+ apiField.Default = ""
+ }
+
+ fieldMap[fieldName] = apiField
+ }
+ }
+ return fieldMap
+}
+
+func getFieldDescription(resourceID string, fieldID string, field client.Field) string {
+ var desc string
+ //desc := "This is the " + fieldID + " field"
+
+ //If it's a generic Description, translate the and
+ if genDescription, isGenericDescription := genericDescriptionsMap[fieldID]; isGenericDescription {
+ desc = descRegexp.ReplaceAllString(genDescription, resourceID)
+ desc = optionsRegexp.ReplaceAllString(desc, strings.Join(field.Options, "`, `"))
+ return desc
+ }
+
+ if updatedDesc, inDescMap := descriptionsMap[resourceID+"-resourceField-"+fieldID]; inDescMap {
+ return updatedDesc
+ //if enum, show list of options
+ } else if field.Type == "enum" {
+ updatedDesc = "The options are `" + strings.Join(field.Options, "`, `") + "`."
+ return updatedDesc
+ }
+
+ return desc
+}
+
+func getRefTypeURL(input string) string {
+ return referenceRegexp.ReplaceAllString(input, "[$1]({{site.baseurl}}/rancher/{{page.version}}/{{page.lang}}/api/{{page.apiVersion}}/api-resources/$1/)")
+}
+
+func getTypeURL(typeInput string) string {
+ var stringSliceByOpenBracket []string
+ stringSliceByOpenBracket = strings.SplitAfter(typeInput, "[")
+
+ var resourceName string
+
+ for _, value := range stringSliceByOpenBracket {
+ if strings.Contains(value, "]") {
+ resourceName = strings.Replace(value, "]", "", -1)
+ }
+ }
+
+ if _, isResourceType := schemaMap[resourceName]; isResourceType {
+ urlResourceName := "[" + resourceName + "]({{site.baseurl}}/rancher/{{page.version}}/{{page.lang}}/api/{{page.apiVersion}}/api-resources/" + resourceName + "/)"
+ return strings.Replace(typeInput, resourceName, urlResourceName, -1)
+ }
+ return typeInput
+}
+
+func getActionMap(schema client.Schema, operationsActions bool) map[string]APIAction {
+ actionMap := make(map[string]APIAction)
+
+ if operationsActions {
+ //Check for create by looking for POST in collectionMethods
+ for _, method := range schema.CollectionMethods {
+ if method == postAPI {
+ //add create
+ apiAction := APIAction{}
+ apiAction.ResourceName = schema.Id
+ apiAction.Description = getActionDescription(schema.Id, "create")
+ apiAction.Method = postAPI
+ apiAction.ActionURL = "/" + *apiVersion + "/projects/${PROJECT_ID}/" + schema.PluralName
+ resourceFields := make(map[string]client.Field)
+
+ for fieldName, field := range schema.ResourceFields {
+ if field.Create {
+ resourceFields[fieldName] = field
+ }
+ }
+
+ //apiAction.Input.InputJSON = generateExampleJSONFromFields(schema.Id, resourceFields)
+ apiAction.Input.InputJSON = generateJSONFromFields(resourceFields)
+ actionMap["Create"] = apiAction
+ }
+ }
+
+ for _, method := range schema.ResourceMethods {
+ if method == "PUT" {
+ //add update
+ apiAction := APIAction{}
+ apiAction.ResourceName = schema.Id
+ apiAction.Description = getActionDescription(schema.Id, "update")
+ apiAction.Method = "PUT"
+ apiAction.ActionURL = "/" + *apiVersion + "/projects/${PROJECT_ID}/" + schema.PluralName + "/${ID}"
+ resourceFields := make(map[string]client.Field)
+
+ for fieldName, field := range schema.ResourceFields {
+ if field.Update {
+ resourceFields[fieldName] = field
+ }
+ }
+
+ //apiAction.Input.InputJSON = generateExampleJSONFromFields(schema.Id, resourceFields)
+ apiAction.Input.InputJSON = generateJSONFromFields(resourceFields)
+ actionMap["Update"] = apiAction
+ } else if method == "DELETE" {
+ //add delete
+ apiAction := APIAction{}
+ apiAction.ResourceName = schema.Id
+ apiAction.Description = getActionDescription(schema.Id, "delete")
+ apiAction.Method = "DELETE"
+ apiAction.ActionURL = "/" + *apiVersion + "/projects/${PROJECT_ID}/" + schema.PluralName + "/${ID}"
+ actionMap["Delete"] = apiAction
+ }
+ }
+
+ } else {
+
+ for actionName, action := range schema.ResourceActions {
+ //Check if general action or resource specific action is blacklisted
+ if isBlacklistAction(schema.Id, actionName) {
+ continue
+ }
+
+ apiAction := APIAction{}
+ apiAction.ResourceName = schema.Id
+ apiAction.Description = getActionDescription(schema.Id, actionName)
+ apiAction.Input = getActionInput(schema.Id, action.Input, true)
+ apiAction.Output = action.Output
+ apiAction.Method = postAPI
+ apiAction.ActionURL = "/" + *apiVersion + "/projects/${PROJECT_ID}/" + schema.PluralName + "/${ID}?action=" + actionName
+
+ actionMap[actionName] = apiAction
+ }
+ }
+
+ return actionMap
+}
+
+func getActionDescription(resourceID string, fieldID string) string {
+ var desc string
+ //desc := "This is the " + fieldID + " action"
+
+ if updatedDesc, inDescMap := descriptionsMap[resourceID+"-resourceAction-"+fieldID]; inDescMap {
+ return updatedDesc
+ }
+
+ return desc
+}
+
+func getActionInput(schemaID string, actionName string, includeCommonFields bool) ActionInput {
+ actionInput := ActionInput{}
+ actionInput.Name = actionName
+ actionInput.FieldMap = getFieldMap(schemaMap[actionName], includeCommonFields, true, true)
+ //actionInput.InputJSON = generateExampleJSONFromFields(schemaID, schemaMap[actionName].ResourceFields)
+ actionInput.InputJSON = generateJSONFromFields(schemaMap[actionName].ResourceFields)
+
+ return actionInput
+}
+
+func generateJSONFromFields(resourceFields map[string]client.Field) string {
+ j, err := json.MarshalIndent(generateFieldTypeMap(resourceFields), "", "\t")
+
+ if err != nil {
+ return err.Error()
+ }
+ return strings.Replace(string(j), """, "", -1)
+
+}
+
+func generateFieldTypeMap(resourceFields map[string]client.Field) map[string]interface{} {
+ fieldTypeJSONMap := make(map[string]interface{})
+ for fieldName, field := range resourceFields {
+ fieldTypeJSONMap[fieldName] = generateTypeValue(field)
+ }
+ return fieldTypeJSONMap
+}
+
+/*
+
+func generateFieldTypeMapRequired(resourceFields map[string]client.Field) map[string]interface{} {
+ fieldTypeJSONMap := make(map[string]interface{})
+ for fieldName, field := range resourceFields {
+ if field.Required {
+ fieldTypeJSONMap[fieldName] = generateTypeValue(field)
+ }
+ }
+ return fieldTypeJSONMap
+}
+
+/*
+
+func generateExampleJSONFromFields(schemaID string, resourceFields map[string]client.Field) string {
+ j, err := json.MarshalIndent(generateExampleFieldTypeMap(schemaID, resourceFields), "", "\t")
+
+ if err != nil {
+ return err.Error()
+ }
+ return strings.Replace(string(j), """, "", -1)
+
+}
+func generateExampleFieldTypeMap(schemaID string, resourceFields map[string]client.Field) map[string]interface{} {
+ fieldTypeJSONMap := make(map[string]interface{})
+ for fieldName, field := range resourceFields {
+ fieldTypeJSONMap[fieldName] = generateExampleTypeValue(schemaID, fieldName, field)
+ }
+ return fieldTypeJSONMap
+}
+
+func generateExampleTypeValue(schemaID string, fieldName string, field client.Field) interface{} {
+ //get default value if available
+ if field.Default != nil {
+ return field.Default
+ }
+
+ if schemaID == "service" {
+ fmt.Println(schemaID)
+ //Read JSON Files for All Resources
+ composeBytes, err := ioutil.ReadFile(apiInputDir + "/" + schemaID + "JSONExample.yml")
+ if err != nil {
+ return err
+ }
+
+ var exampleValues map[string]string
+ if err = json.Unmarshal(composeBytes, exampleValues); err != nil {
+ return err
+ }
+
+ for k, v := range exampleValues {
+ fmt.Println(k + v)
+ }
+ if exampleValues[fieldName] != "" {
+ fmt.Println(exampleValues[fieldName])
+ return exampleValues[fieldName]
+ }
+ }
+
+ //basic types
+ switch field.Type {
+ case "string":
+ return "string"
+ case "int":
+ return 0
+ case "boolean":
+ return false
+ case "array[string]":
+ return [...]string{"string1", "...stringN"}
+ case "map[string]":
+ return map[string]string{"key": "value-pairs"}
+ case "map[json]":
+ return map[string]string{"key": "value-pairs"}
+ case "password":
+ return field.Type
+ }
+
+ //another resourceType
+ subSchema, ok := schemaMap[field.Type]
+ if ok {
+ return generateExampleTypeValue(schemaID, fieldName, subSchema.ResourceFields)
+ }
+
+ return field.Type
+}
+*/
+
+func generateTypeValue(field client.Field) interface{} {
+ //get default value if available
+ if field.Default != nil {
+ return field.Default
+ }
+
+ //basic types
+ switch field.Type {
+ case "string":
+ return "string"
+ case "int":
+ return 0
+ case "boolean":
+ return false
+ case "array[string]":
+ return [...]string{"string1", "...stringN"}
+ case "map[string]":
+ return map[string]string{"key": "value-pairs"}
+ case "map[json]":
+ return map[string]string{"key": "value-pairs"}
+ case "password":
+ return field.Type
+ }
+
+ //another resourceType
+ subSchema, ok := schemaMap[field.Type]
+ if ok {
+ return generateFieldTypeMap(subSchema.ResourceFields)
+ }
+
+ return field.Type
+}
diff --git a/vendor/github.com/rancher/go-rancher/docs/input/api_description_override.yml b/vendor/github.com/rancher/go-rancher/docs/input/api_description_override.yml
new file mode 100644
index 00000000..078f3e9c
--- /dev/null
+++ b/vendor/github.com/rancher/go-rancher/docs/input/api_description_override.yml
@@ -0,0 +1,1585 @@
+account-description: All resources in Rancher are owned or created by an account.
+account-resourceActions-activate:
+account-resourceActions-deactivate:
+account-resourceFields-created: The date of when the was created.
+account-resourceFields-description:
+account-resourceFields-id: The unique identifier for the
+account-resourceFields-kind:
+account-resourceFields-name:
+account-resourceFields-removed: The date of when the was removed
+account-resourceFields-state: The current state of the . The options are .
+account-resourceFields-transitioning: Whether or not the is in a transitioning state
+account-resourceFields-transitioningMessage: The message to show while in a transitioning state
+account-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+account-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+activeSetting-description:
+activeSetting-resourceFields-activeValue:
+activeSetting-resourceFields-id: The unique identifier for the
+activeSetting-resourceFields-name:
+activeSetting-resourceFields-value:
+addOutputsInput-description:
+addOutputsInput-resourceFields-outputs:
+addRemoveLoadBalancerServiceLinkInput-description:
+addRemoveLoadBalancerServiceLinkInput-resourceFields-serviceLink:
+addRemoveServiceLinkInput-description:
+addRemoveServiceLinkInput-resourceFields-serviceLink:
+amazonec2Config-description: The configuration to launch an EC2 instance in Amazon Web Services using [machine]({{site.baseurl}}/rancher/{{page.version}}/{{page.lang}}/api/api-resources/machine). Rancher is calling `docker-machine`, so any available options in `docker-machine` for specific drivers are exposed in Rancher. The default fields from `docker-machine` are not listed in the Rancher API, and they can be found in the `docker-machine` documentation. The notes on which fields are **required** are from the `docker-machine` documentation.
+amazonec2Config-resourceFields-accessKey: required Your access key id for the Amazon Web Services API
+amazonec2Config-resourceFields-ami: The AMI ID of the instance to use
+amazonec2Config-resourceFields-deviceName:
+amazonec2Config-resourceFields-iamInstanceProfile: The AWS IAM instance role name to be used as the instance profile
+amazonec2Config-resourceFields-instanceType: The AWS instance type to run
+amazonec2Config-resourceFields-monitoring: Whether or not to enable CloudWatch Monitoring
+amazonec2Config-resourceFields-privateAddressOnly: Whether or not to use the AWS EC2 private IP address
+amazonec2Config-resourceFields-region: The region to use when launching the instance.
+amazonec2Config-resourceFields-requestSpotInstance: Whether or not to use AWS EC2 spot instances
+amazonec2Config-resourceFields-rootSize: The root disk size of the AWS EC2 instance (in GB)
+amazonec2Config-resourceFields-secretKey: required Your secret access key for the Amazon Web Services API
+amazonec2Config-resourceFields-securityGroup: The AWS VPC security group name to use when launching your instance
+amazonec2Config-resourceFields-sessionToken: The session token for the AWS API
+amazonec2Config-resourceFields-spotPrice: The spot instance bid price (in dollars) if the `requestSpotInstance` is `true`.
+amazonec2Config-resourceFields-sshKeypath:
+amazonec2Config-resourceFields-sshUser: The SSH login user name
+amazonec2Config-resourceFields-subnetId: The AWS VPC subnet ID
+amazonec2Config-resourceFields-tags:
+amazonec2Config-resourceFields-useEbsOptimizedInstance:
+amazonec2Config-resourceFields-usePrivateAddress: Whether or not to use the AWS EC2 private IP address
+amazonec2Config-resourceFields-volumeType:
+amazonec2Config-resourceFields-vpcId: required The VPC ID to launch the instance in
+amazonec2Config-resourceFields-zone: The AWS zone to launch the instance in (i.e. one of a, b, c, d, e)
+apiKey-description: An API Key provides access to the Rancher API if access control has been turned on. The access key and secret key pair are created per environment and can be used to directly call the API or used with [rancher-compose]({{site.baseurl}}/rancher/{{page.version}}/{{page.lang}}/rancher-compose).
+apiKey-resourceActions-activate:
+apiKey-resourceActions-deactivate:
+apiKey-resourceFields-accountId: The unique identifier for the associated account
+apiKey-resourceFields-created: The date of when the was created.
+apiKey-resourceFields-description:
+apiKey-resourceFields-id: The unique identifier for the
+apiKey-resourceFields-kind:
+apiKey-resourceFields-name:
+apiKey-resourceFields-publicValue: The public value of the
+apiKey-resourceFields-removed: The date of when the was removed
+apiKey-resourceFields-secretValue: The secret value of the
+apiKey-resourceFields-state: The current state of the . The options are .
+apiKey-resourceFields-transitioning: Whether or not the is in a transitioning state
+apiKey-resourceFields-transitioningMessage: The message to show while in a transitioning state
+apiKey-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+apiKey-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+auditLog-description:
+auditLog-resourceFields-accountId: The unique identifier for the associated account
+auditLog-resourceFields-authType:
+auditLog-resourceFields-authenticatedAsAccountId:
+auditLog-resourceFields-authenticatedAsIdentityId:
+auditLog-resourceFields-clientIp:
+auditLog-resourceFields-created: The date of when the was created.
+auditLog-resourceFields-description:
+auditLog-resourceFields-eventType:
+auditLog-resourceFields-id: The unique identifier for the
+auditLog-resourceFields-kind:
+auditLog-resourceFields-requestObject:
+auditLog-resourceFields-resourceId:
+auditLog-resourceFields-resourceType:
+auditLog-resourceFields-responseCode:
+auditLog-resourceFields-responseObject:
+azureConfig-description: The configuration to launch an instance in Microsoft Azure. For all cloud providers, Rancher is calling `docker-machine`, so any available options in `docker-machine` are exposed in Rancher. The default fields from `docker-machine` are not listed in the Rancher API, and they can be found in the `docker-machine` documentation.
+azureConfig-resourceFields-dockerPort: The port to use for the Docker daemon
+azureConfig-resourceFields-dockerSwarmMasterPort:
+azureConfig-resourceFields-image: The Azure image name
+azureConfig-resourceFields-location: The Azure machine instance location
+azureConfig-resourceFields-password: Your Azure password
+azureConfig-resourceFields-publishSettingsFile: The Azure setting file
+azureConfig-resourceFields-size: The Azure disk size
+azureConfig-resourceFields-sshPort: The Azure SSH port
+azureConfig-resourceFields-subscriptionCert: required The Azure subscription certificate
+azureConfig-resourceFields-subscriptionId: required The Azure subscription ID (ie. A GUID like`d255d8d7-5af0-4f5c-8a3e-1545044b861e`)
+azureConfig-resourceFields-username: Your Azure login user name
+backup-description:
+backup-resourceFields-accountId: The unique identifier for the associated account
+backup-resourceFields-backupTargetId:
+backup-resourceFields-created: The date of when the was created.
+backup-resourceFields-description:
+backup-resourceFields-id: The unique identifier for the
+backup-resourceFields-kind:
+backup-resourceFields-name:
+backup-resourceFields-removed: The date of when the was removed
+backup-resourceFields-snapshotId:
+backup-resourceFields-state: The current state of the . The options are .
+backup-resourceFields-transitioning: Whether or not the is in a transitioning state
+backup-resourceFields-transitioningMessage: The message to show while in a transitioning state
+backup-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+backup-resourceFields-uri:
+backup-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+backup-resourceFields-volumeId:
+backupTarget-description:
+backupTarget-resourceFields-accountId: The unique identifier for the associated account
+backupTarget-resourceFields-created: The date of when the was created.
+backupTarget-resourceFields-description:
+backupTarget-resourceFields-id: The unique identifier for the
+backupTarget-resourceFields-kind:
+backupTarget-resourceFields-name:
+backupTarget-resourceFields-nfsConfig:
+backupTarget-resourceFields-removed: The date of when the was removed
+backupTarget-resourceFields-state: The current state of the . The options are .
+backupTarget-resourceFields-transitioning: Whether or not the is in a transitioning state
+backupTarget-resourceFields-transitioningMessage: The message to show while in a transitioning state
+backupTarget-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+backupTarget-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+baseMachineConfig-description:
+blkioDeviceOption-description:
+blkioDeviceOption-resourceFields-readBps:
+blkioDeviceOption-resourceFields-readIops:
+blkioDeviceOption-resourceFields-weight:
+blkioDeviceOption-resourceFields-writeBps:
+blkioDeviceOption-resourceFields-writeIops:
+certificate-description: A certificate is used to add in SSL termination to load balancers.
+certificate-resourceFields-CN:
+certificate-resourceFields-accountId: The unique identifier for the associated account
+certificate-resourceFields-algorithm:
+certificate-resourceFields-cert:
+certificate-resourceFields-certChain:
+certificate-resourceFields-certFingerprint:
+certificate-resourceFields-created: The date of when the was created.
+certificate-resourceFields-description:
+certificate-resourceFields-expiresAt:
+certificate-resourceFields-id: The unique identifier for the
+certificate-resourceFields-issuedAt:
+certificate-resourceFields-issuer:
+certificate-resourceFields-key:
+certificate-resourceFields-keySize:
+certificate-resourceFields-kind:
+certificate-resourceFields-name:
+certificate-resourceFields-removed: The date of when the was removed
+certificate-resourceFields-serialNumber:
+certificate-resourceFields-state: The current state of the . The options are .
+certificate-resourceFields-subjectAlternativeNames:
+certificate-resourceFields-transitioning: Whether or not the is in a transitioning state
+certificate-resourceFields-transitioningMessage: The message to show while in a transitioning state
+certificate-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+certificate-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+certificate-resourceFields-version:
+changeSecretInput-description:
+changeSecretInput-resourceFields-newSecret:
+changeSecretInput-resourceFields-oldSecret:
+composeConfig-description:
+composeConfig-resourceFields-dockerComposeConfig:
+composeConfig-resourceFields-rancherComposeConfig:
+composeConfigInput-description:
+composeConfigInput-resourceFields-serviceIds:
+composeProject-description:
+composeProject-resourceActions-cancelrollback:
+composeProject-resourceActions-cancelupgrade:
+composeProject-resourceActions-error:
+composeProject-resourceActions-finishupgrade:
+composeProject-resourceActions-rollback:
+composeProject-resourceFields-accountId: The unique identifier for the associated account
+composeProject-resourceFields-created: The date of when the was created.
+composeProject-resourceFields-description:
+composeProject-resourceFields-environment:
+composeProject-resourceFields-externalId:
+composeProject-resourceFields-healthState:
+composeProject-resourceFields-id: The unique identifier for the
+composeProject-resourceFields-kind:
+composeProject-resourceFields-name:
+composeProject-resourceFields-previousEnvironment:
+composeProject-resourceFields-previousExternalId:
+composeProject-resourceFields-removed: The date of when the was removed
+composeProject-resourceFields-state: The current state of the . The options are .
+composeProject-resourceFields-templates:
+composeProject-resourceFields-transitioning: Whether or not the is in a transitioning state
+composeProject-resourceFields-transitioningMessage: The message to show while in a transitioning state
+composeProject-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+composeProject-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+composeService-description:
+composeService-resourceActions-activate:
+composeService-resourceActions-cancelrollback:
+composeService-resourceActions-cancelupgrade:
+composeService-resourceActions-finishupgrade:
+composeService-resourceActions-rollback:
+composeService-resourceFields-accountId: The unique identifier for the associated account
+composeService-resourceFields-created: The date of when the was created.
+composeService-resourceFields-currentScale:
+composeService-resourceFields-description:
+composeService-resourceFields-environmentId:
+composeService-resourceFields-externalId:
+composeService-resourceFields-fqdn:
+composeService-resourceFields-healthState:
+composeService-resourceFields-id: The unique identifier for the
+composeService-resourceFields-kind:
+composeService-resourceFields-launchConfig:
+composeService-resourceFields-name:
+composeService-resourceFields-publicEndpoints:
+composeService-resourceFields-removed: The date of when the was removed
+composeService-resourceFields-scale:
+composeService-resourceFields-scalePolicy:
+composeService-resourceFields-selectorContainer:
+composeService-resourceFields-selectorLink:
+composeService-resourceFields-startOnCreate:
+composeService-resourceFields-state: The current state of the . The options are .
+composeService-resourceFields-transitioning: Whether or not the is in a transitioning state
+composeService-resourceFields-transitioningMessage: The message to show while in a transitioning state
+composeService-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+composeService-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+composeService-resourceFields-vip:
+container-description: A container is a representation of a Docker container on a host.
+container-resourceActions-console:
+container-resourceActions-execute:
+container-resourceActions-logs:
+container-resourceActions-proxy:
+container-resourceActions-restart:
+container-resourceActions-start:
+container-resourceActions-stop:
+container-resourceFields-accountId: The unique identifier for the associated account
+container-resourceFields-blkioDeviceOptions:
+container-resourceFields-build:
+container-resourceFields-capAdd:
+container-resourceFields-capDrop:
+container-resourceFields-command: Overwrite the default commands set by the image
+container-resourceFields-count:
+container-resourceFields-cpuSet:
+container-resourceFields-cpuShares:
+container-resourceFields-createIndex:
+container-resourceFields-created: The date of when the was created.
+container-resourceFields-dataVolumeMounts:
+container-resourceFields-dataVolumes:
+container-resourceFields-dataVolumesFrom:
+container-resourceFields-deploymentUnitUuid:
+container-resourceFields-description:
+container-resourceFields-devices:
+container-resourceFields-dns:
+container-resourceFields-dnsSearch:
+container-resourceFields-domainName:
+container-resourceFields-entryPoint:
+container-resourceFields-environment:
+container-resourceFields-expose:
+container-resourceFields-externalId:
+container-resourceFields-extraHosts:
+container-resourceFields-firstRunning:
+container-resourceFields-healthCheck:
+container-resourceFields-healthState:
+container-resourceFields-hostId: The unique identifier for the associated host
+container-resourceFields-hostname:
+container-resourceFields-id: The unique identifier for the
+container-resourceFields-imageUuid:
+container-resourceFields-instanceLinks:
+container-resourceFields-kind:
+container-resourceFields-labels: A map of key value pairs to be used as labels for the
+container-resourceFields-logConfig:
+container-resourceFields-lxcConf:
+container-resourceFields-memory:
+container-resourceFields-memorySwap:
+container-resourceFields-name:
+container-resourceFields-nativeContainer:
+container-resourceFields-networkContainerId:
+container-resourceFields-networkIds:
+container-resourceFields-networkMode:
+container-resourceFields-pidMode:
+container-resourceFields-ports:
+container-resourceFields-primaryIpAddress:
+container-resourceFields-privileged:
+container-resourceFields-publishAllPorts:
+container-resourceFields-readOnly:
+container-resourceFields-registryCredentialId:
+container-resourceFields-removed: The date of when the was removed
+container-resourceFields-requestedHostId:
+container-resourceFields-restartPolicy:
+container-resourceFields-securityOpt:
+container-resourceFields-startCount:
+container-resourceFields-startOnCreate:
+container-resourceFields-state: The current state of the . The options are .
+container-resourceFields-stdinOpen:
+container-resourceFields-systemContainer:
+container-resourceFields-transitioning: Whether or not the is in a transitioning state
+container-resourceFields-transitioningMessage: The message to show while in a transitioning state
+container-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+container-resourceFields-tty:
+container-resourceFields-user:
+container-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+container-resourceFields-version:
+container-resourceFields-volumeDriver:
+container-resourceFields-workingDir:
+containerEvent-description:
+containerEvent-resourceFields-accountId: The unique identifier for the associated account
+containerEvent-resourceFields-created: The date of when the was created.
+containerEvent-resourceFields-dockerInspect:
+containerEvent-resourceFields-externalFrom:
+containerEvent-resourceFields-externalId:
+containerEvent-resourceFields-externalStatus:
+containerEvent-resourceFields-externalTimestamp:
+containerEvent-resourceFields-hostId: The unique identifier for the associated host
+containerEvent-resourceFields-id: The unique identifier for the
+containerEvent-resourceFields-kind:
+containerEvent-resourceFields-reportedHostUuid:
+containerEvent-resourceFields-state: The current state of the . The options are .
+containerEvent-resourceFields-transitioning: Whether or not the is in a transitioning state
+containerEvent-resourceFields-transitioningMessage: The message to show while in a transitioning state
+containerEvent-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+containerExec-description:
+containerExec-resourceFields-attachStdin:
+containerExec-resourceFields-attachStdout:
+containerExec-resourceFields-command: Overwrite the default commands set by the image
+containerExec-resourceFields-tty:
+containerLogs-description:
+containerLogs-resourceFields-follow:
+containerLogs-resourceFields-lines:
+containerProxy-description:
+containerProxy-resourceFields-port:
+containerProxy-resourceFields-scheme:
+credential-description:
+credential-resourceActions-activate:
+credential-resourceActions-deactivate:
+credential-resourceFields-accountId: The unique identifier for the associated account
+credential-resourceFields-created: The date of when the was created.
+credential-resourceFields-description:
+credential-resourceFields-id: The unique identifier for the
+credential-resourceFields-kind:
+credential-resourceFields-name:
+credential-resourceFields-publicValue: The public value of the
+credential-resourceFields-removed: The date of when the was removed
+credential-resourceFields-secretValue: The secret value of the
+credential-resourceFields-state: The current state of the . The options are .
+credential-resourceFields-transitioning: Whether or not the is in a transitioning state
+credential-resourceFields-transitioningMessage: The message to show while in a transitioning state
+credential-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+credential-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+digitaloceanConfig-description: The configuration to launch a droplet in DigitalOcean using [machine]({{site.baseurl}}/rancher/{{page.version}}/{{page.lang}}/api/api-resources/machine). Rancher is calling `docker-machine`, so any available options in `docker-machine` for specific drivers are exposed in Rancher. The default fields from `docker-machine` are not listed in the Rancher API, and they can be found in the `docker-machine` documentation.
+digitaloceanConfig-resourceFields-accessToken: required Your personal access token for the Digital Ocean API
+digitaloceanConfig-resourceFields-backups: Whether or not to enable Digital Oceans backups for the droplet
+digitaloceanConfig-resourceFields-image: The name of the Digital Ocean image to use
+digitaloceanConfig-resourceFields-ipv6: Whether or not to enable IPv6 support for the droplet
+digitaloceanConfig-resourceFields-privateNetworking: Whether or not to enable private networking support for the droplet
+digitaloceanConfig-resourceFields-region: The region to create the droplet in
+digitaloceanConfig-resourceFields-size: The size of the Digital Ocean droplet (larger than the default option (`512mb`) are of the form `2gb`)
+digitaloceanConfig-resourceFields-sshPort: The port to ssh into the host
+digitaloceanConfig-resourceFields-sshUser: The ssh username to use to ssh into the host
+digitaloceanConfig-resourceFields-userdata:
+dnsService-description: A "dnsService" in the API is referred to as a Service Alias in the UI and the Rancher documentation. In the API documentation, we'll use the UI terminology. A service alias allows the ability to add a DNS record for your services to be discovered.
+dnsService-resourceActions-activate:
+dnsService-resourceActions-deactivate:
+dnsService-resourceActions-removeservicelink:
+dnsService-resourceActions-rollback:
+dnsService-resourceActions-setservicelinks:
+dnsService-resourceActions-upgrade:
+dnsService-resourceFields-accountId: The unique identifier for the associated account
+dnsService-resourceFields-assignServiceIpAddress:
+dnsService-resourceFields-created: The date of when the was created.
+dnsService-resourceFields-description:
+dnsService-resourceFields-environmentId:
+dnsService-resourceFields-externalId:
+dnsService-resourceFields-fqdn:
+dnsService-resourceFields-healthState:
+dnsService-resourceFields-id: The unique identifier for the
+dnsService-resourceFields-kind:
+dnsService-resourceFields-launchConfig:
+dnsService-resourceFields-metadata:
+dnsService-resourceFields-name:
+dnsService-resourceFields-removed: The date of when the was removed
+dnsService-resourceFields-retainIp:
+dnsService-resourceFields-selectorLink:
+dnsService-resourceFields-startOnCreate:
+dnsService-resourceFields-state: The current state of the . The options are .
+dnsService-resourceFields-transitioning: Whether or not the is in a transitioning state
+dnsService-resourceFields-transitioningMessage: The message to show while in a transitioning state
+dnsService-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+dnsService-resourceFields-upgrade:
+dnsService-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+dockerBuild-description:
+dockerBuild-resourceFields-context:
+dockerBuild-resourceFields-dockerfile:
+dockerBuild-resourceFields-forcerm:
+dockerBuild-resourceFields-nocache:
+dockerBuild-resourceFields-remote:
+dockerBuild-resourceFields-rm:
+environment-description: An "environment" in the API is referred to as a stack in the UI and the Rancher documentation. In the API documentation, we'll use the UI terminology. A Rancher stack mirrors the same concept as a docker-compose project. It represents a group of services that make up a typical application or workload.
+environment-resourceActions-activateservices:
+environment-resourceActions-cancelrollback:
+environment-resourceActions-cancelupgrade:
+environment-resourceActions-deactivateservices:
+environment-resourceActions-exportconfig:
+environment-resourceActions-finishupgrade:
+environment-resourceActions-rollback:
+environment-resourceFields-accountId: The unique identifier for the associated account
+environment-resourceFields-created: The date of when the was created.
+environment-resourceFields-description:
+environment-resourceFields-dockerCompose:
+environment-resourceFields-environment:
+environment-resourceFields-externalId:
+environment-resourceFields-healthState:
+environment-resourceFields-id: The unique identifier for the
+environment-resourceFields-kind:
+environment-resourceFields-name:
+environment-resourceFields-outputs:
+environment-resourceFields-previousEnvironment:
+environment-resourceFields-previousExternalId:
+environment-resourceFields-rancherCompose:
+environment-resourceFields-removed: The date of when the was removed
+environment-resourceFields-startOnCreate:
+environment-resourceFields-state: The current state of the . The options are .
+environment-resourceFields-transitioning: Whether or not the is in a transitioning state
+environment-resourceFields-transitioningMessage: The message to show while in a transitioning state
+environment-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+environment-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+environmentUpgrade-description:
+environmentUpgrade-resourceFields-dockerCompose:
+environmentUpgrade-resourceFields-environment:
+environmentUpgrade-resourceFields-externalId:
+environmentUpgrade-resourceFields-rancherCompose:
+externalDnsEvent-description:
+externalDnsEvent-resourceFields-accountId: The unique identifier for the associated account
+externalDnsEvent-resourceFields-created: The date of when the was created.
+externalDnsEvent-resourceFields-eventType:
+externalDnsEvent-resourceFields-externalId:
+externalDnsEvent-resourceFields-fqdn:
+externalDnsEvent-resourceFields-id: The unique identifier for the
+externalDnsEvent-resourceFields-kind:
+externalDnsEvent-resourceFields-reportedAccountId:
+externalDnsEvent-resourceFields-serviceName:
+externalDnsEvent-resourceFields-stackName:
+externalDnsEvent-resourceFields-state: The current state of the . The options are .
+externalDnsEvent-resourceFields-transitioning: Whether or not the is in a transitioning state
+externalDnsEvent-resourceFields-transitioningMessage: The message to show while in a transitioning state
+externalDnsEvent-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+externalDnsEvent-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+externalEvent-description:
+externalEvent-resourceFields-accountId: The unique identifier for the associated account
+externalEvent-resourceFields-created: The date of when the was created.
+externalEvent-resourceFields-eventType:
+externalEvent-resourceFields-externalId:
+externalEvent-resourceFields-id: The unique identifier for the
+externalEvent-resourceFields-kind:
+externalEvent-resourceFields-reportedAccountId:
+externalEvent-resourceFields-state: The current state of the . The options are .
+externalEvent-resourceFields-transitioning: Whether or not the is in a transitioning state
+externalEvent-resourceFields-transitioningMessage: The message to show while in a transitioning state
+externalEvent-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+externalEvent-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+externalHostEvent-description:
+externalHostEvent-resourceFields-accountId: The unique identifier for the associated account
+externalHostEvent-resourceFields-created: The date of when the was created.
+externalHostEvent-resourceFields-deleteHost:
+externalHostEvent-resourceFields-eventType:
+externalHostEvent-resourceFields-externalId:
+externalHostEvent-resourceFields-hostId: The unique identifier for the associated host
+externalHostEvent-resourceFields-hostLabel:
+externalHostEvent-resourceFields-id: The unique identifier for the
+externalHostEvent-resourceFields-kind:
+externalHostEvent-resourceFields-reportedAccountId:
+externalHostEvent-resourceFields-state: The current state of the . The options are .
+externalHostEvent-resourceFields-transitioning: Whether or not the is in a transitioning state
+externalHostEvent-resourceFields-transitioningMessage: The message to show while in a transitioning state
+externalHostEvent-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+externalHostEvent-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+externalService-description: An external service allows the ability to add any IP or hostname as a service to be discovered as a service.
+externalService-resourceActions-activate:
+externalService-resourceActions-cancelrollback:
+externalService-resourceActions-cancelupgrade:
+externalService-resourceActions-deactivate:
+externalService-resourceActions-finishupgrade:
+externalService-resourceActions-rollback:
+externalService-resourceActions-upgrade:
+externalService-resourceFields-accountId: The unique identifier for the associated account
+externalService-resourceFields-created: The date of when the was created.
+externalService-resourceFields-description:
+externalService-resourceFields-environmentId:
+externalService-resourceFields-externalId:
+externalService-resourceFields-externalIpAddresses:
+externalService-resourceFields-fqdn:
+externalService-resourceFields-healthCheck:
+externalService-resourceFields-healthState:
+externalService-resourceFields-hostname:
+externalService-resourceFields-id: The unique identifier for the
+externalService-resourceFields-kind:
+externalService-resourceFields-launchConfig:
+externalService-resourceFields-metadata:
+externalService-resourceFields-name:
+externalService-resourceFields-removed: The date of when the was removed
+externalService-resourceFields-startOnCreate:
+externalService-resourceFields-state: The current state of the . The options are .
+externalService-resourceFields-transitioning: Whether or not the is in a transitioning state
+externalService-resourceFields-transitioningMessage: The message to show while in a transitioning state
+externalService-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+externalService-resourceFields-upgrade:
+externalService-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+externalServiceEvent-description:
+externalServiceEvent-resourceFields-accountId: The unique identifier for the associated account
+externalServiceEvent-resourceFields-created: The date of when the was created.
+externalServiceEvent-resourceFields-environment:
+externalServiceEvent-resourceFields-eventType:
+externalServiceEvent-resourceFields-externalId:
+externalServiceEvent-resourceFields-id: The unique identifier for the
+externalServiceEvent-resourceFields-kind:
+externalServiceEvent-resourceFields-reportedAccountId:
+externalServiceEvent-resourceFields-service:
+externalServiceEvent-resourceFields-state: The current state of the . The options are .
+externalServiceEvent-resourceFields-transitioning: Whether or not the is in a transitioning state
+externalServiceEvent-resourceFields-transitioningMessage: The message to show while in a transitioning state
+externalServiceEvent-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+externalServiceEvent-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+externalStoragePoolEvent-description:
+externalStoragePoolEvent-resourceFields-accountId: The unique identifier for the associated account
+externalStoragePoolEvent-resourceFields-created: The date of when the was created.
+externalStoragePoolEvent-resourceFields-eventType:
+externalStoragePoolEvent-resourceFields-externalId:
+externalStoragePoolEvent-resourceFields-hostUuids:
+externalStoragePoolEvent-resourceFields-id: The unique identifier for the
+externalStoragePoolEvent-resourceFields-kind:
+externalStoragePoolEvent-resourceFields-reportedAccountId:
+externalStoragePoolEvent-resourceFields-state: The current state of the . The options are .
+externalStoragePoolEvent-resourceFields-storagePool:
+externalStoragePoolEvent-resourceFields-transitioning: Whether or not the is in a transitioning state
+externalStoragePoolEvent-resourceFields-transitioningMessage: The message to show while in a transitioning state
+externalStoragePoolEvent-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+externalStoragePoolEvent-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+externalVolumeEvent-description:
+externalVolumeEvent-resourceFields-accountId: The unique identifier for the associated account
+externalVolumeEvent-resourceFields-created: The date of when the was created.
+externalVolumeEvent-resourceFields-eventType:
+externalVolumeEvent-resourceFields-externalId:
+externalVolumeEvent-resourceFields-id: The unique identifier for the
+externalVolumeEvent-resourceFields-kind:
+externalVolumeEvent-resourceFields-reportedAccountId:
+externalVolumeEvent-resourceFields-state: The current state of the . The options are .
+externalVolumeEvent-resourceFields-transitioning: Whether or not the is in a transitioning state
+externalVolumeEvent-resourceFields-transitioningMessage: The message to show while in a transitioning state
+externalVolumeEvent-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+externalVolumeEvent-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+externalVolumeEvent-resourceFields-volume:
+fieldDocumentation-description:
+fieldDocumentation-resourceFields-description:
+haproxyConfig-description:
+haproxyConfig-resourceFields-defaults:
+haproxyConfig-resourceFields-global:
+healthcheckInstanceHostMap-description:
+healthcheckInstanceHostMap-resourceFields-accountId: The unique identifier for the associated account
+healthcheckInstanceHostMap-resourceFields-created: The date of when the was created.
+healthcheckInstanceHostMap-resourceFields-description:
+healthcheckInstanceHostMap-resourceFields-healthState:
+healthcheckInstanceHostMap-resourceFields-hostId: The unique identifier for the associated host
+healthcheckInstanceHostMap-resourceFields-id: The unique identifier for the
+healthcheckInstanceHostMap-resourceFields-instanceId: The unique identifier for the associated instance
+healthcheckInstanceHostMap-resourceFields-kind:
+healthcheckInstanceHostMap-resourceFields-name:
+healthcheckInstanceHostMap-resourceFields-removed: The date of when the was removed
+healthcheckInstanceHostMap-resourceFields-state: The current state of the . The options are .
+healthcheckInstanceHostMap-resourceFields-transitioning: Whether or not the is in a transitioning state
+healthcheckInstanceHostMap-resourceFields-transitioningMessage: The message to show while in a transitioning state
+healthcheckInstanceHostMap-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+healthcheckInstanceHostMap-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+host-description: Hosts are the most basic unit of resource within Rancher and is represented as any Linux server, virtual or physical, with the following minimum requirements. * Any modern Linux distribution that supports Docker 1.10.3+. * Must be able to communicate with the Rancher server via http or https through the pre-configured port (Default is 8080). * Must be routable to any other hosts belonging to the same environment to leverage Rancher's cross-host networking for Docker containers. Rancher also supports Docker Machine and allows you to add your host via any of its supported drivers.
+host-resourceActions-activate:
+host-resourceActions-deactivate:
+host-resourceActions-dockersocket:
+host-resourceFields-accountId: The unique identifier for the associated account
+host-resourceFields-agentState:
+host-resourceFields-computeTotal:
+host-resourceFields-created: The date of when the was created.
+host-resourceFields-description:
+host-resourceFields-hostname:
+host-resourceFields-id: The unique identifier for the
+host-resourceFields-info:
+host-resourceFields-kind:
+host-resourceFields-labels: A map of key value pairs to be used as labels for the
+host-resourceFields-name:
+host-resourceFields-physicalHostId:
+host-resourceFields-publicEndpoints:
+host-resourceFields-removed: The date of when the was removed
+host-resourceFields-state: The current state of the . The options are .
+host-resourceFields-transitioning: Whether or not the is in a transitioning state
+host-resourceFields-transitioningMessage: The message to show while in a transitioning state
+host-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+host-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+hostAccess-description:
+hostAccess-resourceFields-token:
+hostAccess-resourceFields-url:
+identity-description: An identity is Rancher's representation of an object(i.e. `ldap_group`, `github_user`) when Rancher has turned on [access control]({{site.baseurl}}/rancher/{{page.version}}/{{page.lang}}/configuration/access-control/). The `externalId` in an identity is the unique identifier in the authentication system that represents the object. The role of an identity is always null unless it is being returned as the identity of a [projectMember]({{site.baseurl}}/rancher/{{page.version}}/{{page.lang}}/api/api-resources/projectMember/).
+identity-resourceFields-all:
+identity-resourceFields-externalId:
+identity-resourceFields-externalIdType:
+identity-resourceFields-id: The unique identifier for the
+identity-resourceFields-login:
+identity-resourceFields-name:
+identity-resourceFields-profilePicture:
+identity-resourceFields-profileUrl:
+identity-resourceFields-projectId:
+identity-resourceFields-role:
+image-description:
+image-resourceActions-activate:
+image-resourceActions-deactivate:
+image-resourceFields-accountId: The unique identifier for the associated account
+image-resourceFields-created: The date of when the was created.
+image-resourceFields-description:
+image-resourceFields-id: The unique identifier for the
+image-resourceFields-kind:
+image-resourceFields-name:
+image-resourceFields-removed: The date of when the was removed
+image-resourceFields-state: The current state of the . The options are .
+image-resourceFields-transitioning: Whether or not the is in a transitioning state
+image-resourceFields-transitioningMessage: The message to show while in a transitioning state
+image-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+image-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+inServiceUpgradeStrategy-description:
+inServiceUpgradeStrategy-resourceFields-batchSize:
+inServiceUpgradeStrategy-resourceFields-intervalMillis:
+inServiceUpgradeStrategy-resourceFields-launchConfig:
+inServiceUpgradeStrategy-resourceFields-previousLaunchConfig:
+inServiceUpgradeStrategy-resourceFields-previousSecondaryLaunchConfigs:
+inServiceUpgradeStrategy-resourceFields-secondaryLaunchConfigs:
+inServiceUpgradeStrategy-resourceFields-startFirst:
+instance-description:
+instance-resourceActions-console:
+instance-resourceActions-restart:
+instance-resourceActions-start:
+instance-resourceActions-stop:
+instance-resourceFields-accountId: The unique identifier for the associated account
+instance-resourceFields-created: The date of when the was created.
+instance-resourceFields-description:
+instance-resourceFields-externalId:
+instance-resourceFields-hostId: The unique identifier for the associated host
+instance-resourceFields-id: The unique identifier for the
+instance-resourceFields-kind:
+instance-resourceFields-name:
+instance-resourceFields-removed: The date of when the was removed
+instance-resourceFields-state: The current state of the . The options are .
+instance-resourceFields-transitioning: Whether or not the is in a transitioning state
+instance-resourceFields-transitioningMessage: The message to show while in a transitioning state
+instance-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+instance-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+instanceConsole-description:
+instanceConsole-resourceFields-kind:
+instanceConsole-resourceFields-password:
+instanceConsole-resourceFields-url:
+instanceConsoleInput-description:
+instanceHealthCheck-description:
+instanceHealthCheck-resourceFields-healthyThreshold:
+instanceHealthCheck-resourceFields-initializingTimeout:
+instanceHealthCheck-resourceFields-interval:
+instanceHealthCheck-resourceFields-name:
+instanceHealthCheck-resourceFields-port:
+instanceHealthCheck-resourceFields-recreateOnQuorumStrategyConfig:
+instanceHealthCheck-resourceFields-reinitializingTimeout:
+instanceHealthCheck-resourceFields-requestLine:
+instanceHealthCheck-resourceFields-responseTimeout:
+instanceHealthCheck-resourceFields-strategy:
+instanceHealthCheck-resourceFields-unhealthyThreshold:
+instanceLink-description:
+instanceLink-resourceActions-activate:
+instanceLink-resourceActions-deactivate:
+instanceLink-resourceFields-accountId: The unique identifier for the associated account
+instanceLink-resourceFields-created: The date of when the was created.
+instanceLink-resourceFields-description:
+instanceLink-resourceFields-id: The unique identifier for the
+instanceLink-resourceFields-instanceId: The unique identifier for the associated instance
+instanceLink-resourceFields-kind:
+instanceLink-resourceFields-linkName:
+instanceLink-resourceFields-name:
+instanceLink-resourceFields-removed: The date of when the was removed
+instanceLink-resourceFields-state: The current state of the . The options are .
+instanceLink-resourceFields-targetInstanceId:
+instanceLink-resourceFields-transitioning: Whether or not the is in a transitioning state
+instanceLink-resourceFields-transitioningMessage: The message to show while in a transitioning state
+instanceLink-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+instanceLink-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+instanceStop-description:
+instanceStop-resourceFields-remove:
+instanceStop-resourceFields-timeout:
+ipAddress-description:
+ipAddress-resourceFields-accountId: The unique identifier for the associated account
+ipAddress-resourceFields-address:
+ipAddress-resourceFields-created: The date of when the was created.
+ipAddress-resourceFields-description:
+ipAddress-resourceFields-id: The unique identifier for the
+ipAddress-resourceFields-kind:
+ipAddress-resourceFields-name:
+ipAddress-resourceFields-networkId:
+ipAddress-resourceFields-removed: The date of when the was removed
+ipAddress-resourceFields-state: The current state of the . The options are .
+ipAddress-resourceFields-transitioning: Whether or not the is in a transitioning state
+ipAddress-resourceFields-transitioningMessage: The message to show while in a transitioning state
+ipAddress-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+ipAddress-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+ipAddressAssociateInput-description:
+ipAddressAssociateInput-resourceFields-ipAddressId:
+kubernetesService-description:
+kubernetesService-resourceActions-activate:
+kubernetesService-resourceActions-addservicelink:
+kubernetesService-resourceActions-cancelrollback:
+kubernetesService-resourceActions-cancelupgrade:
+kubernetesService-resourceActions-deactivate:
+kubernetesService-resourceActions-finishupgrade:
+kubernetesService-resourceActions-removeservicelink:
+kubernetesService-resourceActions-restart:
+kubernetesService-resourceActions-rollback:
+kubernetesService-resourceActions-setservicelinks:
+kubernetesService-resourceActions-upgrade:
+kubernetesService-resourceFields-accountId: The unique identifier for the associated account
+kubernetesService-resourceFields-created: The date of when the was created.
+kubernetesService-resourceFields-description:
+kubernetesService-resourceFields-environmentId:
+kubernetesService-resourceFields-externalId:
+kubernetesService-resourceFields-healthState:
+kubernetesService-resourceFields-id: The unique identifier for the
+kubernetesService-resourceFields-kind:
+kubernetesService-resourceFields-name:
+kubernetesService-resourceFields-removed: The date of when the was removed
+kubernetesService-resourceFields-selectorContainer:
+kubernetesService-resourceFields-state: The current state of the . The options are .
+kubernetesService-resourceFields-template:
+kubernetesService-resourceFields-transitioning: Whether or not the is in a transitioning state
+kubernetesService-resourceFields-transitioningMessage: The message to show while in a transitioning state
+kubernetesService-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+kubernetesService-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+kubernetesService-resourceFields-vip:
+kubernetesStack-description:
+kubernetesStack-resourceActions-cancelrollback:
+kubernetesStack-resourceActions-cancelupgrade:
+kubernetesStack-resourceActions-error:
+kubernetesStack-resourceActions-finishupgrade:
+kubernetesStack-resourceActions-rollback:
+kubernetesStack-resourceActions-upgrade:
+kubernetesStack-resourceFields-accountId: The unique identifier for the associated account
+kubernetesStack-resourceFields-created: The date of when the was created.
+kubernetesStack-resourceFields-description:
+kubernetesStack-resourceFields-environment:
+kubernetesStack-resourceFields-externalId:
+kubernetesStack-resourceFields-healthState:
+kubernetesStack-resourceFields-id: The unique identifier for the
+kubernetesStack-resourceFields-kind:
+kubernetesStack-resourceFields-name:
+kubernetesStack-resourceFields-namespace:
+kubernetesStack-resourceFields-previousEnvironment:
+kubernetesStack-resourceFields-previousExternalId:
+kubernetesStack-resourceFields-removed: The date of when the was removed
+kubernetesStack-resourceFields-state: The current state of the . The options are .
+kubernetesStack-resourceFields-templates:
+kubernetesStack-resourceFields-transitioning: Whether or not the is in a transitioning state
+kubernetesStack-resourceFields-transitioningMessage: The message to show while in a transitioning state
+kubernetesStack-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+kubernetesStack-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+kubernetesStackUpgrade-description:
+kubernetesStackUpgrade-resourceFields-environment:
+kubernetesStackUpgrade-resourceFields-externalId:
+kubernetesStackUpgrade-resourceFields-templates:
+label-description:
+label-resourceFields-accountId: The unique identifier for the associated account
+label-resourceFields-created: The date of when the was created.
+label-resourceFields-description:
+label-resourceFields-id: The unique identifier for the
+label-resourceFields-key:
+label-resourceFields-kind:
+label-resourceFields-name:
+label-resourceFields-removed: The date of when the was removed
+label-resourceFields-state: The current state of the . The options are .
+label-resourceFields-transitioning: Whether or not the is in a transitioning state
+label-resourceFields-transitioningMessage: The message to show while in a transitioning state
+label-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+label-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+label-resourceFields-value:
+launchConfig-description:
+launchConfig-resourceFields-accountId: The unique identifier for the associated account
+launchConfig-resourceFields-blkioDeviceOptions:
+launchConfig-resourceFields-build:
+launchConfig-resourceFields-capAdd:
+launchConfig-resourceFields-capDrop:
+launchConfig-resourceFields-command: Overwrite the default commands set by the image
+launchConfig-resourceFields-count:
+launchConfig-resourceFields-cpuSet:
+launchConfig-resourceFields-cpuShares:
+launchConfig-resourceFields-createIndex:
+launchConfig-resourceFields-created: The date of when the was created.
+launchConfig-resourceFields-dataVolumeMounts:
+launchConfig-resourceFields-dataVolumes:
+launchConfig-resourceFields-dataVolumesFrom:
+launchConfig-resourceFields-dataVolumesFromLaunchConfigs:
+launchConfig-resourceFields-deploymentUnitUuid:
+launchConfig-resourceFields-description:
+launchConfig-resourceFields-devices:
+launchConfig-resourceFields-disks:
+launchConfig-resourceFields-dns:
+launchConfig-resourceFields-dnsSearch:
+launchConfig-resourceFields-domainName:
+launchConfig-resourceFields-entryPoint:
+launchConfig-resourceFields-environment:
+launchConfig-resourceFields-expose:
+launchConfig-resourceFields-externalId:
+launchConfig-resourceFields-extraHosts:
+launchConfig-resourceFields-firstRunning:
+launchConfig-resourceFields-healthCheck:
+launchConfig-resourceFields-healthState:
+launchConfig-resourceFields-hostId: The unique identifier for the associated host
+launchConfig-resourceFields-hostname:
+launchConfig-resourceFields-id: The unique identifier for the
+launchConfig-resourceFields-imageUuid:
+launchConfig-resourceFields-instanceLinks:
+launchConfig-resourceFields-kind:
+launchConfig-resourceFields-labels: A map of key value pairs to be used as labels for the
+launchConfig-resourceFields-logConfig:
+launchConfig-resourceFields-lxcConf:
+launchConfig-resourceFields-memory:
+launchConfig-resourceFields-memoryMb:
+launchConfig-resourceFields-memorySwap:
+launchConfig-resourceFields-nativeContainer:
+launchConfig-resourceFields-networkContainerId:
+launchConfig-resourceFields-networkIds:
+launchConfig-resourceFields-networkLaunchConfig:
+launchConfig-resourceFields-networkMode:
+launchConfig-resourceFields-pidMode:
+launchConfig-resourceFields-ports:
+launchConfig-resourceFields-primaryIpAddress:
+launchConfig-resourceFields-privileged:
+launchConfig-resourceFields-publishAllPorts:
+launchConfig-resourceFields-readOnly:
+launchConfig-resourceFields-registryCredentialId:
+launchConfig-resourceFields-removed: The date of when the was removed
+launchConfig-resourceFields-requestedHostId:
+launchConfig-resourceFields-requestedIpAddress:
+launchConfig-resourceFields-securityOpt:
+launchConfig-resourceFields-startCount:
+launchConfig-resourceFields-startOnCreate:
+launchConfig-resourceFields-state: The current state of the . The options are .
+launchConfig-resourceFields-stdinOpen:
+launchConfig-resourceFields-systemContainer:
+launchConfig-resourceFields-transitioning: Whether or not the is in a transitioning state
+launchConfig-resourceFields-transitioningMessage: The message to show while in a transitioning state
+launchConfig-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+launchConfig-resourceFields-tty:
+launchConfig-resourceFields-user:
+launchConfig-resourceFields-userdata:
+launchConfig-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+launchConfig-resourceFields-vcpu:
+launchConfig-resourceFields-version:
+launchConfig-resourceFields-volumeDriver:
+launchConfig-resourceFields-workingDir:
+loadBalancerAppCookieStickinessPolicy-description:
+loadBalancerAppCookieStickinessPolicy-resourceFields-cookie:
+loadBalancerAppCookieStickinessPolicy-resourceFields-maxLength:
+loadBalancerAppCookieStickinessPolicy-resourceFields-mode:
+loadBalancerAppCookieStickinessPolicy-resourceFields-name:
+loadBalancerAppCookieStickinessPolicy-resourceFields-prefix:
+loadBalancerAppCookieStickinessPolicy-resourceFields-requestLearn:
+loadBalancerAppCookieStickinessPolicy-resourceFields-timeout:
+loadBalancerConfig-description:
+loadBalancerConfig-resourceFields-haproxyConfig:
+loadBalancerConfig-resourceFields-lbCookieStickinessPolicy:
+loadBalancerCookieStickinessPolicy-description:
+loadBalancerCookieStickinessPolicy-resourceFields-cookie:
+loadBalancerCookieStickinessPolicy-resourceFields-domain:
+loadBalancerCookieStickinessPolicy-resourceFields-indirect:
+loadBalancerCookieStickinessPolicy-resourceFields-mode:
+loadBalancerCookieStickinessPolicy-resourceFields-name:
+loadBalancerCookieStickinessPolicy-resourceFields-nocache:
+loadBalancerCookieStickinessPolicy-resourceFields-postonly:
+loadBalancerService-description: Rancher implements a managed load balancer using HAProxy that can be manually scaled to multiple hosts. A load balancer can be used to distribute network and application traffic to individual containers by directly adding them or "linked" to a basic service. A basic service that is "linked" will have all its underlying containers automatically registered as load balancer targets by Rancher.
+loadBalancerService-resourceActions-activate:
+loadBalancerService-resourceActions-addservicelink:
+loadBalancerService-resourceActions-cancelrollback:
+loadBalancerService-resourceActions-cancelupgrade:
+loadBalancerService-resourceActions-deactivate:
+loadBalancerService-resourceActions-finishupgrade:
+loadBalancerService-resourceActions-removeservicelink:
+loadBalancerService-resourceActions-rollback:
+loadBalancerService-resourceActions-setservicelinks:
+loadBalancerService-resourceActions-upgrade:
+loadBalancerService-resourceFields-accountId: The unique identifier for the associated account
+loadBalancerService-resourceFields-assignServiceIpAddress:
+loadBalancerService-resourceFields-certificateIds:
+loadBalancerService-resourceFields-created: The date of when the was created.
+loadBalancerService-resourceFields-currentScale:
+loadBalancerService-resourceFields-defaultCertificateId:
+loadBalancerService-resourceFields-description:
+loadBalancerService-resourceFields-environmentId:
+loadBalancerService-resourceFields-externalId:
+loadBalancerService-resourceFields-fqdn:
+loadBalancerService-resourceFields-healthState:
+loadBalancerService-resourceFields-id: The unique identifier for the
+loadBalancerService-resourceFields-kind:
+loadBalancerService-resourceFields-launchConfig:
+loadBalancerService-resourceFields-loadBalancerConfig:
+loadBalancerService-resourceFields-metadata:
+loadBalancerService-resourceFields-name:
+loadBalancerService-resourceFields-publicEndpoints:
+loadBalancerService-resourceFields-removed: The date of when the was removed
+loadBalancerService-resourceFields-retainIp:
+loadBalancerService-resourceFields-scale:
+loadBalancerService-resourceFields-scalePolicy:
+loadBalancerService-resourceFields-selectorLink:
+loadBalancerService-resourceFields-startOnCreate:
+loadBalancerService-resourceFields-state: The current state of the . The options are .
+loadBalancerService-resourceFields-transitioning: Whether or not the is in a transitioning state
+loadBalancerService-resourceFields-transitioningMessage: The message to show while in a transitioning state
+loadBalancerService-resourceFields-transitioningProgress: The percentage remaining in the transitioning process of the
+loadBalancerService-resourceFields-upgrade:
+loadBalancerService-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+loadBalancerService-resourceFields-vip:
+loadBalancerServiceLink-description:
+loadBalancerServiceLink-resourceFields-ports:
+loadBalancerServiceLink-resourceFields-serviceId: The unique identifier of the associated service
+loadBalancerServiceLink-resourceFields-uuid: The universally unique identifier for the . This will always be unique across Rancher installations.
+logConfig-description:
+logConfig-resourceFields-config:
+logConfig-resourceFields-driver: The logging driver option to use in a logConfig.
+machine-description: Machines are created whenever Rancher uses `docker-machine` to create hosts in Rancher. Adding any type of host through the UI that is not the custom command option is calling `docker-machine` and a machine entry will be created as well as a [host]({{site.baseurl}}/rancher/{{page.version}}/{{page.lang}}/api/api-resources/host).
+machine-resourceFields-accountId: The unique identifier for the associated account
+machine-resourceFields-amazonec2Config:
+machine-resourceFields-authCertificateAuthority:
+machine-resourceFields-authKey:
+machine-resourceFields-azureConfig:
+machine-resourceFields-created: The date of when the was created.
+machine-resourceFields-description:
+machine-resourceFields-digitaloceanConfig:
+machine-resourceFields-dockerVersion:
+machine-resourceFields-driver:
+machine-resourceFields-engineEnv:
+machine-resourceFields-engineInsecureRegistry:
+machine-resourceFields-engineInstallUrl:
+machine-resourceFields-engineLabel:
+machine-resourceFields-engineOpt:
+machine-resourceFields-engineRegistryMirror:
+machine-resourceFields-engineStorageDriver:
+machine-resourceFields-externalId:
+machine-resourceFields-id: The unique identifier for the
+machine-resourceFields-kind:
+machine-resourceFields-labels: A map of key value pairs to be used as labels for the
+machine-resourceFields-name:
+machine-resourceFields-packetConfig:
+machine-resourceFields-removed: The date of when the was removed
+machine-resourceFields-state: The current state of the . The options are