Skip to content

Commit

Permalink
feat(swagger): adds /cloud/metadata to agent api definition. (#4186)
Browse files Browse the repository at this point in the history
This adds /cloud/metadata api call to agent which should return cloud
instance metadata, such as instance_type and cloud_provider.

Refs: #4130
  • Loading branch information
VAveryanov8 authored Jan 3, 2025
1 parent c7c7130 commit ef3b968
Show file tree
Hide file tree
Showing 5 changed files with 445 additions and 0 deletions.
49 changes: 49 additions & 0 deletions v3/swagger/agent.json
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,34 @@
},
"security": []
}
},
"/cloud/metadata": {
"get": {
"description": "Collect instance metadata on a node",
"summary": "Return instance metadata",
"operationId": "Metadata",
"produces": [
"application/json"
],
"parameters": [],
"responses": {
"200": {
"description": "Instance metadata",
"schema": {
"$ref": "#/definitions/InstanceMetadata"
},
"headers": {}
},
"default": {
"description": "Server error",
"schema": {
"$ref": "#/definitions/ErrorResponse"
},
"headers": {}
}
},
"security": []
}
}
},
"definitions": {
Expand Down Expand Up @@ -1694,6 +1722,27 @@
"format": "uint64"
}
}
},
"InstanceMetadata": {
"title": "instance metadata",
"description": "Information about instance on which agent is running",
"type": "object",
"properties": {
"instance_type": {
"description": "Cloud machine type, e.g. Standard-A3",
"type": "string"
},
"cloud_provider": {
"description": "Cloud provider",
"type": "string",
"enum": [
"aws",
"gcp",
"azure",
""
]
}
}
}
},
"tags": []
Expand Down
113 changes: 113 additions & 0 deletions v3/swagger/gen/agent/client/operations/metadata_parameters.go

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

135 changes: 135 additions & 0 deletions v3/swagger/gen/agent/client/operations/metadata_responses.go

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

37 changes: 37 additions & 0 deletions v3/swagger/gen/agent/client/operations/operations_client.go

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

Loading

0 comments on commit ef3b968

Please sign in to comment.