docker-py icon indicating copy to clipboard operation
docker-py copied to clipboard

Request for getting tasks !!

Open thisismsreddy opened this issue 9 years ago • 1 comments

If We want all continents running in a service we can get those by Task ID, It seems there is no way to get list for tasks. i think it's good future.

GET /tasks/id

{
ID: "0xfv7izqyp0jpqujaj1zpxm75",
Version: {
Index: 385
},
CreatedAt: "2017-02-28T06:01:21.945769611Z",
UpdatedAt: "2017-02-28T07:24:48.97982219Z",
Spec: {
ContainerSpec: {
Image: "alpine:latest@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c5986cb02d7e8",
Args: [
"sleep",
"5000"
],
DNSConfig: { }
},
Resources: {
Limits: { },
Reservations: { }
},
RestartPolicy: {
Condition: "any",
MaxAttempts: 0
},
Placement: { },
Networks: [
{
Target: "hkzqo3ajnp3hrzlq28g6opls9"
}
],
ForceUpdate: 0
},
ServiceID: "tn43erhme6wc880xtbje0st78",
Slot: 1,
NodeID: "skq93ri97z731t3va8o8fn1hp",
Status: {
Timestamp: "2017-02-28T07:24:48.904237435Z",
State: "complete",
Message: "finished",
ContainerStatus: {
ContainerID: "bccf3a95d99899090624f2b28d1c9410c0376689abb9a406704c41873c4bb64f"
},
PortStatus: { }
},
DesiredState: "shutdown",
NetworksAttachments: [
{
Network: {
ID: "hkzqo3ajnp3hrzlq28g6opls9",
Version: {
Index: 248
},
CreatedAt: "2017-02-21T10:44:39.396460048Z",
UpdatedAt: "2017-02-27T17:30:20.213094244Z",
Spec: {
Name: "my-net",
DriverConfiguration: {
Name: "overlay"
},
IPAMOptions: {
Driver: {
Name: "default"
},
Configs: [
{
Subnet: "10.0.9.0/24",
Gateway: "10.0.9.1"
}
]
}
},
DriverState: {
Name: "overlay",
Options: {
com.docker.network.driver.overlay.vxlanid_list: "4097"
}
},
IPAMOptions: {
Driver: {
Name: "default"
},
Configs: [
{
Subnet: "10.0.9.0/24",
Gateway: "10.0.9.1"
}
]
}
},
Addresses: [
"10.0.9.7/24"
]
}
]
},
{

thisismsreddy avatar Feb 28 '17 09:02 thisismsreddy

It's already available: APIClient.tasks

shin- avatar Feb 28 '17 19:02 shin-