mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Add support for Azure and Edge Agent endpoint types
This commit is contained in:
parent
3c409ca3f3
commit
0be0262fcb
@ -51,10 +51,14 @@ var endpointInspectCmd = &cobra.Command{
|
||||
})
|
||||
common.CheckError(err)
|
||||
var endpointType string
|
||||
if endpoint.Type == 1 {
|
||||
if endpoint.Type == portainer.DockerEnvironment {
|
||||
endpointType = "docker"
|
||||
} else if endpoint.Type == 2 {
|
||||
endpointType = "agent"
|
||||
} else if endpoint.Type == portainer.AgentOnDockerEnvironment {
|
||||
endpointType = "agent on docker"
|
||||
} else if endpoint.Type == portainer.AzureEnvironment {
|
||||
endpointType = "azure"
|
||||
} else if endpoint.Type == portainer.EdgeAgentEnvironment {
|
||||
endpointType = "edge agent"
|
||||
}
|
||||
_, err = fmt.Fprintln(writer, fmt.Sprintf(
|
||||
"%v\t%s\t%v\t%s\t%s\t%v",
|
||||
|
@ -47,10 +47,14 @@ var endpointListCmd = &cobra.Command{
|
||||
common.CheckError(err)
|
||||
for _, e := range endpoints {
|
||||
var endpointType string
|
||||
if e.Type == 1 {
|
||||
if e.Type == portainer.DockerEnvironment {
|
||||
endpointType = "docker"
|
||||
} else if e.Type == 2 {
|
||||
endpointType = "agent"
|
||||
} else if e.Type == portainer.AgentOnDockerEnvironment {
|
||||
endpointType = "agent on docker"
|
||||
} else if e.Type == portainer.AzureEnvironment {
|
||||
endpointType = "azure"
|
||||
} else if e.Type == portainer.EdgeAgentEnvironment {
|
||||
endpointType = "edge agent"
|
||||
}
|
||||
_, err := fmt.Fprintln(writer, fmt.Sprintf(
|
||||
"%v\t%s\t%v\t%s\t%s\t%v",
|
||||
|
Loading…
Reference in New Issue
Block a user