forked from cloudfoundry-community/cloudfoundry-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
job.go
24 lines (18 loc) · 900 Bytes
/
job.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package v2action
import (
"io"
"code.cloudfoundry.org/cli/api/cloudcontroller/ccv2"
)
type Job ccv2.Job
func (actor Actor) PollJob(job Job) (Warnings, error) {
warnings, err := actor.CloudControllerClient.PollJob(ccv2.Job(job))
return Warnings(warnings), err
}
func (actor Actor) UploadApplicationPackage(appGUID string, existingResources []Resource, newResources io.Reader, newResourcesLength int64) (Job, Warnings, error) {
job, warnings, err := actor.CloudControllerClient.UploadApplicationPackage(appGUID, actor.actorToCCResources(existingResources), newResources, newResourcesLength)
return Job(job), Warnings(warnings), err
}
func (actor Actor) UploadDroplet(appGUID string, droplet io.Reader, dropletLength int64) (Job, Warnings, error) {
job, warnings, err := actor.CloudControllerClient.UploadDroplet(appGUID, droplet, dropletLength)
return Job(job), Warnings(warnings), err
}