mirror of
https://gitlab.com/psuapp/psu.git
synced 2024-08-30 18:12:34 +00:00
Rename PortainerClient.GetEndpointGroups() to EndpointGroupList()
This commit is contained in:
parent
0adb18bc8a
commit
623788b624
@ -38,7 +38,7 @@ type PortainerClient interface {
|
|||||||
EndpointList() ([]portainer.Endpoint, error)
|
EndpointList() ([]portainer.Endpoint, error)
|
||||||
|
|
||||||
// Get endpoint groups
|
// Get endpoint groups
|
||||||
GetEndpointGroups() ([]portainer.EndpointGroup, error)
|
EndpointGroupList() ([]portainer.EndpointGroup, error)
|
||||||
|
|
||||||
// Get stacks, optionally filtered by swarmId and endpointId
|
// Get stacks, optionally filtered by swarmId and endpointId
|
||||||
GetStacks(swarmID string, endpointID portainer.EndpointID) ([]portainer.Stack, error)
|
GetStacks(swarmID string, endpointID portainer.EndpointID) ([]portainer.Stack, error)
|
||||||
@ -226,7 +226,7 @@ func (n *portainerClientImp) EndpointList() (endpoints []portainer.Endpoint, err
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (n *portainerClientImp) GetEndpointGroups() (endpointGroups []portainer.EndpointGroup, err error) {
|
func (n *portainerClientImp) EndpointGroupList() (endpointGroups []portainer.EndpointGroup, err error) {
|
||||||
err = n.doJSONWithToken("endpoint_groups", http.MethodGet, http.Header{}, nil, &endpointGroups)
|
err = n.doJSONWithToken("endpoint_groups", http.MethodGet, http.Header{}, nil, &endpointGroups)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ var endpointGroupListCmd = &cobra.Command{
|
|||||||
common.CheckError(err)
|
common.CheckError(err)
|
||||||
|
|
||||||
logrus.Debug("Getting endpoint groups")
|
logrus.Debug("Getting endpoint groups")
|
||||||
endpointGroups, err := client.GetEndpointGroups()
|
endpointGroups, err := client.EndpointGroupList()
|
||||||
common.CheckError(err)
|
common.CheckError(err)
|
||||||
|
|
||||||
switch viper.GetString("endpoint.group.list.format") {
|
switch viper.GetString("endpoint.group.list.format") {
|
||||||
|
@ -107,7 +107,7 @@ func GetEndpointGroupByName(name string) (endpointGroup portainer.EndpointGroup,
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
endpointGroups, err := portainerClient.GetEndpointGroups()
|
endpointGroups, err := portainerClient.EndpointGroupList()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user