forked from LaconicNetwork/kompose
switch from godep to glide
This commit is contained in:
+13
@@ -30,6 +30,7 @@ type DeploymentConfigInterface interface {
|
||||
GetScale(name string) (*extensions.Scale, error)
|
||||
UpdateScale(scale *extensions.Scale) (*extensions.Scale, error)
|
||||
UpdateStatus(config *deployapi.DeploymentConfig) (*deployapi.DeploymentConfig, error)
|
||||
Instantiate(request *deployapi.DeploymentRequest) (*deployapi.DeploymentConfig, error)
|
||||
}
|
||||
|
||||
// deploymentConfigs implements DeploymentConfigsNamespacer interface
|
||||
@@ -155,6 +156,18 @@ func (c *deploymentConfigs) UpdateStatus(deploymentConfig *deployapi.DeploymentC
|
||||
return
|
||||
}
|
||||
|
||||
// Instantiate instantiates a new build from build config returning new object or an error
|
||||
func (c *deploymentConfigs) Instantiate(request *deployapi.DeploymentRequest) (*deployapi.DeploymentConfig, error) {
|
||||
result := &deployapi.DeploymentConfig{}
|
||||
resp := c.r.Post().Namespace(c.ns).Resource("deploymentConfigs").Name(request.Name).SubResource("instantiate").Body(request).Do()
|
||||
var statusCode int
|
||||
if resp.StatusCode(&statusCode); statusCode == 204 {
|
||||
return nil, nil
|
||||
}
|
||||
err := resp.Into(result)
|
||||
return result, err
|
||||
}
|
||||
|
||||
type updateConfigFunc func(d *deployapi.DeploymentConfig)
|
||||
|
||||
// UpdateConfigWithRetries will try to update a deployment config and ignore any update conflicts.
|
||||
|
||||
Reference in New Issue
Block a user