1
0
Fork 0

Adding compatibility for marathon 1.5

This commit is contained in:
Trevin Teacutter 2018-07-03 16:42:03 -05:00 committed by Traefiker Bot
parent 461ebf6d88
commit 04d8b5d483
35 changed files with 2257 additions and 63 deletions

View file

@ -1,4 +1,4 @@
// Package mocks Code generated by mockery v1.0.0
// Package mocks Code generated by mockery v1.0.0. DO NOT EDIT.
// mockery -recursive -dir=vendor/github.com/gambol99/ -name=Marathon -output=provider/marathon/mocks
package mocks
@ -278,6 +278,29 @@ func (_m *Marathon) CreateGroup(group *marathon.Group) error {
return r0
}
// CreatePod provides a mock function with given fields: pod
func (_m *Marathon) CreatePod(pod *marathon.Pod) (*marathon.Pod, error) {
ret := _m.Called(pod)
var r0 *marathon.Pod
if rf, ok := ret.Get(0).(func(*marathon.Pod) *marathon.Pod); ok {
r0 = rf(pod)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*marathon.Pod)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*marathon.Pod) error); ok {
r1 = rf(pod)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// DeleteApplication provides a mock function with given fields: name, force
func (_m *Marathon) DeleteApplication(name string, force bool) (*marathon.DeploymentID, error) {
ret := _m.Called(name, force)
@ -347,6 +370,75 @@ func (_m *Marathon) DeleteGroup(name string, force bool) (*marathon.DeploymentID
return r0, r1
}
// DeletePod provides a mock function with given fields: name, force
func (_m *Marathon) DeletePod(name string, force bool) (*marathon.DeploymentID, error) {
ret := _m.Called(name, force)
var r0 *marathon.DeploymentID
if rf, ok := ret.Get(0).(func(string, bool) *marathon.DeploymentID); ok {
r0 = rf(name, force)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*marathon.DeploymentID)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, bool) error); ok {
r1 = rf(name, force)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// DeletePodInstance provides a mock function with given fields: name, instance
func (_m *Marathon) DeletePodInstance(name string, instance string) (*marathon.PodInstance, error) {
ret := _m.Called(name, instance)
var r0 *marathon.PodInstance
if rf, ok := ret.Get(0).(func(string, string) *marathon.PodInstance); ok {
r0 = rf(name, instance)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*marathon.PodInstance)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(name, instance)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// DeletePodInstances provides a mock function with given fields: name, instances
func (_m *Marathon) DeletePodInstances(name string, instances []string) ([]*marathon.PodInstance, error) {
ret := _m.Called(name, instances)
var r0 []*marathon.PodInstance
if rf, ok := ret.Get(0).(func(string, []string) []*marathon.PodInstance); ok {
r0 = rf(name, instances)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*marathon.PodInstance)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, []string) error); ok {
r1 = rf(name, instances)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// DeleteQueueDelay provides a mock function with given fields: appID
func (_m *Marathon) DeleteQueueDelay(appID string) error {
ret := _m.Called(appID)
@ -701,6 +793,158 @@ func (_m *Marathon) Ping() (bool, error) {
return r0, r1
}
// Pod provides a mock function with given fields: name
func (_m *Marathon) Pod(name string) (*marathon.Pod, error) {
ret := _m.Called(name)
var r0 *marathon.Pod
if rf, ok := ret.Get(0).(func(string) *marathon.Pod); ok {
r0 = rf(name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*marathon.Pod)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PodByVersion provides a mock function with given fields: name, version
func (_m *Marathon) PodByVersion(name string, version string) (*marathon.Pod, error) {
ret := _m.Called(name, version)
var r0 *marathon.Pod
if rf, ok := ret.Get(0).(func(string, string) *marathon.Pod); ok {
r0 = rf(name, version)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*marathon.Pod)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string, string) error); ok {
r1 = rf(name, version)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PodIsRunning provides a mock function with given fields: name
func (_m *Marathon) PodIsRunning(name string) bool {
ret := _m.Called(name)
var r0 bool
if rf, ok := ret.Get(0).(func(string) bool); ok {
r0 = rf(name)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// PodStatus provides a mock function with given fields: name
func (_m *Marathon) PodStatus(name string) (*marathon.PodStatus, error) {
ret := _m.Called(name)
var r0 *marathon.PodStatus
if rf, ok := ret.Get(0).(func(string) *marathon.PodStatus); ok {
r0 = rf(name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*marathon.PodStatus)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PodStatuses provides a mock function with given fields:
func (_m *Marathon) PodStatuses() ([]*marathon.PodStatus, error) {
ret := _m.Called()
var r0 []*marathon.PodStatus
if rf, ok := ret.Get(0).(func() []*marathon.PodStatus); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*marathon.PodStatus)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// PodVersions provides a mock function with given fields: name
func (_m *Marathon) PodVersions(name string) ([]string, error) {
ret := _m.Called(name)
var r0 []string
if rf, ok := ret.Get(0).(func(string) []string); ok {
r0 = rf(name)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]string)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(name)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Pods provides a mock function with given fields:
func (_m *Marathon) Pods() ([]marathon.Pod, error) {
ret := _m.Called()
var r0 []marathon.Pod
if rf, ok := ret.Get(0).(func() []marathon.Pod); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]marathon.Pod)
}
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// Queue provides a mock function with given fields:
func (_m *Marathon) Queue() (*marathon.Queue, error) {
ret := _m.Called()
@ -835,6 +1079,27 @@ func (_m *Marathon) Subscriptions() (*marathon.Subscriptions, error) {
return r0, r1
}
// SupportsPods provides a mock function with given fields:
func (_m *Marathon) SupportsPods() (bool, error) {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
var r1 error
if rf, ok := ret.Get(1).(func() error); ok {
r1 = rf()
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// TaskEndpoints provides a mock function with given fields: name, port, healthCheck
func (_m *Marathon) TaskEndpoints(name string, port int, healthCheck bool) ([]string, error) {
ret := _m.Called(name, port, healthCheck)
@ -941,6 +1206,29 @@ func (_m *Marathon) UpdateGroup(id string, group *marathon.Group, force bool) (*
return r0, r1
}
// UpdatePod provides a mock function with given fields: pod, force
func (_m *Marathon) UpdatePod(pod *marathon.Pod, force bool) (*marathon.Pod, error) {
ret := _m.Called(pod, force)
var r0 *marathon.Pod
if rf, ok := ret.Get(0).(func(*marathon.Pod, bool) *marathon.Pod); ok {
r0 = rf(pod, force)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*marathon.Pod)
}
}
var r1 error
if rf, ok := ret.Get(1).(func(*marathon.Pod, bool) error); ok {
r1 = rf(pod, force)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// WaitOnApplication provides a mock function with given fields: name, timeout
func (_m *Marathon) WaitOnApplication(name string, timeout time.Duration) error {
ret := _m.Called(name, timeout)
@ -982,3 +1270,17 @@ func (_m *Marathon) WaitOnGroup(name string, timeout time.Duration) error {
return r0
}
// WaitOnPod provides a mock function with given fields: name, timeout
func (_m *Marathon) WaitOnPod(name string, timeout time.Duration) error {
ret := _m.Called(name, timeout)
var r0 error
if rf, ok := ret.Get(0).(func(string, time.Duration) error); ok {
r0 = rf(name, timeout)
} else {
r0 = ret.Error(0)
}
return r0
}