Skip to content

Commit

Permalink
PMM-4033 Remove oneof from requests. (#438)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekSi authored Sep 16, 2019
1 parent 526cb00 commit 9423207
Show file tree
Hide file tree
Showing 14 changed files with 341 additions and 371 deletions.
491 changes: 211 additions & 280 deletions api/inventorypb/agents.pb.go

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions api/inventorypb/agents.proto
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,10 @@ message QANPostgreSQLPgStatementsAgent {

// ChangeCommonAgentParams contains parameters that can be changed for all Agents.
message ChangeCommonAgentParams {
// Enable, disable, or do not change desired status.
oneof change_disabled {
bool enabled = 1;
bool disabled = 2;
}
// Enable this Agent. Can't be used with disabled.
bool enable = 1;
// Disable this Agent. Can't be used with enabled.
bool disable = 2;
// Replace all custom user-assigned labels.
map<string, string> custom_labels = 3;
// Remove all custom user-assigned labels.
Expand All @@ -318,14 +317,15 @@ message ChangeCommonAgentParams {
// List

message ListAgentsRequest {
oneof filter {
// Return only Agents started by this pmm-agent.
string pmm_agent_id = 1;
// Return only Agents that provide insights for that Node.
string node_id = 2;
// Return only Agents that provide insights for that Service.
string service_id = 3;
}
// Return only Agents started by this pmm-agent.
// Exactly one of these parameters should be present: pmm_agent_id, node_id, service_id.
string pmm_agent_id = 1;
// Return only Agents that provide insights for that Node.
// Exactly one of these parameters should be present: pmm_agent_id, node_id, service_id.
string node_id = 2;
// Return only Agents that provide insights for that Service.
// Exactly one of these parameters should be present: pmm_agent_id, node_id, service_id.
string service_id = 3;
}

message ListAgentsResponse {
Expand Down

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

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

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

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

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

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

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

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

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

3 changes: 3 additions & 0 deletions api/inventorypb/json/client/agents/list_agents_responses.go

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

60 changes: 39 additions & 21 deletions api/inventorypb/json/inventorypb.json
Original file line number Diff line number Diff line change
Expand Up @@ -1445,11 +1445,13 @@
"type": "string"
}
},
"disabled": {
"disable": {
"description": "Disable this Agent. Can't be used with enabled.",
"type": "boolean",
"format": "boolean"
},
"enabled": {
"enable": {
"description": "Enable this Agent. Can't be used with disabled.",
"type": "boolean",
"format": "boolean"
},
Expand Down Expand Up @@ -1586,11 +1588,13 @@
"type": "string"
}
},
"disabled": {
"disable": {
"description": "Disable this Agent. Can't be used with enabled.",
"type": "boolean",
"format": "boolean"
},
"enabled": {
"enable": {
"description": "Enable this Agent. Can't be used with disabled.",
"type": "boolean",
"format": "boolean"
},
Expand Down Expand Up @@ -1727,11 +1731,13 @@
"type": "string"
}
},
"disabled": {
"disable": {
"description": "Disable this Agent. Can't be used with enabled.",
"type": "boolean",
"format": "boolean"
},
"enabled": {
"enable": {
"description": "Enable this Agent. Can't be used with disabled.",
"type": "boolean",
"format": "boolean"
},
Expand Down Expand Up @@ -1850,11 +1856,13 @@
"type": "string"
}
},
"disabled": {
"disable": {
"description": "Disable this Agent. Can't be used with enabled.",
"type": "boolean",
"format": "boolean"
},
"enabled": {
"enable": {
"description": "Enable this Agent. Can't be used with disabled.",
"type": "boolean",
"format": "boolean"
},
Expand Down Expand Up @@ -1991,11 +1999,13 @@
"type": "string"
}
},
"disabled": {
"disable": {
"description": "Disable this Agent. Can't be used with enabled.",
"type": "boolean",
"format": "boolean"
},
"enabled": {
"enable": {
"description": "Enable this Agent. Can't be used with disabled.",
"type": "boolean",
"format": "boolean"
},
Expand Down Expand Up @@ -2132,11 +2142,13 @@
"type": "string"
}
},
"disabled": {
"disable": {
"description": "Disable this Agent. Can't be used with enabled.",
"type": "boolean",
"format": "boolean"
},
"enabled": {
"enable": {
"description": "Enable this Agent. Can't be used with disabled.",
"type": "boolean",
"format": "boolean"
},
Expand Down Expand Up @@ -2268,11 +2280,13 @@
"type": "string"
}
},
"disabled": {
"disable": {
"description": "Disable this Agent. Can't be used with enabled.",
"type": "boolean",
"format": "boolean"
},
"enabled": {
"enable": {
"description": "Enable this Agent. Can't be used with disabled.",
"type": "boolean",
"format": "boolean"
},
Expand Down Expand Up @@ -2409,11 +2423,13 @@
"type": "string"
}
},
"disabled": {
"disable": {
"description": "Disable this Agent. Can't be used with enabled.",
"type": "boolean",
"format": "boolean"
},
"enabled": {
"enable": {
"description": "Enable this Agent. Can't be used with disabled.",
"type": "boolean",
"format": "boolean"
},
Expand Down Expand Up @@ -2554,11 +2570,13 @@
"type": "string"
}
},
"disabled": {
"disable": {
"description": "Disable this Agent. Can't be used with enabled.",
"type": "boolean",
"format": "boolean"
},
"enabled": {
"enable": {
"description": "Enable this Agent. Can't be used with disabled.",
"type": "boolean",
"format": "boolean"
},
Expand Down Expand Up @@ -3291,15 +3309,15 @@
"type": "object",
"properties": {
"node_id": {
"description": "Return only Agents that provide insights for that Node.",
"description": "Return only Agents that provide insights for that Node.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.",
"type": "string"
},
"pmm_agent_id": {
"description": "Return only Agents started by this pmm-agent.",
"description": "Return only Agents started by this pmm-agent.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.",
"type": "string"
},
"service_id": {
"description": "Return only Agents that provide insights for that Service.",
"description": "Return only Agents that provide insights for that Service.\nExactly one of these parameters should be present: pmm_agent_id, node_id, service_id.",
"type": "string"
}
}
Expand Down
Loading

0 comments on commit 9423207

Please sign in to comment.