Skip to content

Commit

Permalink
Merge 381eade into 29de6ff
Browse files Browse the repository at this point in the history
  • Loading branch information
chhsia0 committed Jul 18, 2018
2 parents 29de6ff + 381eade commit e676b66
Show file tree
Hide file tree
Showing 21 changed files with 9,332 additions and 2,816 deletions.
983 changes: 699 additions & 284 deletions api/v1/lib/agent/agent.pb.go

Large diffs are not rendered by default.

422 changes: 422 additions & 0 deletions api/v1/lib/agent/agent.pb_ffjson.go

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions api/v1/lib/agent/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ message Call {
// Retrieves the information about known executors.
GET_EXECUTORS = 12;

// Retrieves the information about known operations.
GET_OPERATIONS = 31;

// Retrieves the information about known tasks.
GET_TASKS = 13;

Expand Down Expand Up @@ -207,6 +210,7 @@ message Call {
UNKNOWN = 0;
CONTAINER_ID = 1;
PROCESS_IO = 2;

option (gogoproto.goproto_enum_prefix) = true;
}

Expand Down Expand Up @@ -442,6 +446,7 @@ message Response {
GET_CONTAINERS = 9;
GET_FRAMEWORKS = 10; // See 'GetFrameworks' below.
GET_EXECUTORS = 11; // See 'GetExecutors' below.
GET_OPERATIONS = 17; // See 'GetOperations' below.
GET_TASKS = 12; // See 'GetTasks' below.
GET_AGENT = 14; // See 'GetAgent' below.
GET_RESOURCE_PROVIDERS = 16; // See 'GetResourceProviders' below.
Expand Down Expand Up @@ -537,6 +542,12 @@ message Response {
repeated Executor completed_executors = 2 [(gogoproto.nullable) = false];
}

// Lists information about all operations known to the agent at the
// current time.
message GetOperations {
repeated Operation operations = 1 [(gogoproto.nullable) = false];
}

// Lists information about all the tasks known to the agent at the current
// time.
message GetTasks {
Expand Down Expand Up @@ -568,6 +579,7 @@ message Response {
message GetResourceProviders {
message ResourceProvider {
required ResourceProviderInfo resource_provider_info = 1 [(gogoproto.nullable) = false];
repeated Resource total_resources = 2 [(gogoproto.nullable) = false];
}

repeated ResourceProvider resource_providers = 1 [(gogoproto.nullable) = false];
Expand Down Expand Up @@ -630,6 +642,7 @@ message Response {
optional GetContainers get_containers = 10;
optional GetFrameworks get_frameworks = 11;
optional GetExecutors get_executors = 12;
optional GetOperations get_operations = 18;
optional GetTasks get_tasks = 13;
optional GetAgent get_agent = 15;
optional GetResourceProviders get_resource_providers = 17;
Expand All @@ -650,6 +663,7 @@ message ProcessIO {
UNKNOWN = 0;
DATA = 1;
CONTROL = 2;

option (gogoproto.goproto_enum_prefix) = true;
}

Expand All @@ -659,6 +673,7 @@ message ProcessIO {
STDIN = 1;
STDOUT = 2;
STDERR = 3;

option (gogoproto.goproto_enum_prefix) = true;
}

Expand All @@ -672,6 +687,7 @@ message ProcessIO {
UNKNOWN = 0;
TTY_INFO = 1;
HEARTBEAT = 2;

option (gogoproto.goproto_enum_prefix) = true;
}

Expand Down
230 changes: 230 additions & 0 deletions api/v1/lib/agent/agentpb_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions api/v1/lib/agent/calls/calls.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ func GetFrameworks() *agent.Call { return &agent.Call{Type: agent.Call_GET_FRAME

func GetExecutors() *agent.Call { return &agent.Call{Type: agent.Call_GET_EXECUTORS} }

func GetOperations() *agent.Call { return &agent.Call{Type: agent.Call_GET_OPERATIONS} }

func GetTasks() *agent.Call { return &agent.Call{Type: agent.Call_GET_TASKS} }

func GetAgent() *agent.Call { return &agent.Call{Type: agent.Call_GET_AGENT} }
Expand Down
1 change: 1 addition & 0 deletions api/v1/lib/agent/calls/calls_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ func Example() {
GetContainers(),
GetFrameworks(),
GetExecutors(),
GetOperations(),
GetTasks(),
GetAgent(),
GetResourceProviders(),
Expand Down
1 change: 1 addition & 0 deletions api/v1/lib/httpcli/httpagent/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func classifyResponse(c *agent.Call) (rc client.ResponseClass, err error) {
agent.Call_GET_CONTAINERS,
agent.Call_GET_FRAMEWORKS,
agent.Call_GET_EXECUTORS,
agent.Call_GET_OPERATIONS,
agent.Call_GET_TASKS,
agent.Call_GET_AGENT,
agent.Call_GET_RESOURCE_PROVIDERS,
Expand Down
3 changes: 3 additions & 0 deletions api/v1/lib/httpcli/httpmaster/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func classifyResponse(c *master.Call) (rc client.ResponseClass, err error) {
master.Call_GET_AGENTS,
master.Call_GET_FRAMEWORKS,
master.Call_GET_EXECUTORS,
master.Call_GET_OPERATIONS,
master.Call_GET_TASKS,
master.Call_GET_ROLES,
master.Call_GET_WEIGHTS,
Expand All @@ -49,6 +50,8 @@ func classifyResponse(c *master.Call) (rc client.ResponseClass, err error) {
master.Call_UNRESERVE_RESOURCES,
master.Call_CREATE_VOLUMES,
master.Call_DESTROY_VOLUMES,
master.Call_GROW_VOLUME,
master.Call_SHRINK_VOLUME,
master.Call_UPDATE_MAINTENANCE_SCHEDULE,
master.Call_START_MAINTENANCE,
master.Call_STOP_MAINTENANCE,
Expand Down

0 comments on commit e676b66

Please sign in to comment.