Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions cmd/completion/ip.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ import (
)

func (c *Completion) Ip(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
resp, err := c.Client.Apiv2().IP().List(cmd.Context(), &apiv2.IPServiceListRequest{
req := &apiv2.IPServiceListRequest{
Project: c.Proj,
})
}

if project, _ := cmd.Flags().GetString("project"); project != "" {
req.Project = project
}

resp, err := c.Client.Apiv2().IP().List(cmd.Context(), req)
if err != nil {
return nil, cobra.ShellCompDirectiveError
}
Expand Down
10 changes: 8 additions & 2 deletions cmd/completion/machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,15 @@ import (
)

func (c *Completion) Machine(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
resp, err := c.Client.Apiv2().Machine().List(cmd.Context(), &apiv2.MachineServiceListRequest{
req := &apiv2.MachineServiceListRequest{
Project: c.Proj,
})
}

if project, _ := cmd.Flags().GetString("project"); project != "" {
req.Project = project
}

resp, err := c.Client.Apiv2().Machine().List(cmd.Context(), req)
if err != nil {
return nil, cobra.ShellCompDirectiveError
}
Expand Down
12 changes: 9 additions & 3 deletions cmd/completion/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@ import (
)

func (c *Completion) Network(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
ownNetworks, err := c.Client.Apiv2().Network().List(cmd.Context(), &apiv2.NetworkServiceListRequest{
req := &apiv2.NetworkServiceListRequest{
Project: c.Proj,
})
}

if project, _ := cmd.Flags().GetString("project"); project != "" {
req.Project = project
}

ownNetworks, err := c.Client.Apiv2().Network().List(cmd.Context(), req)
if err != nil {
return nil, cobra.ShellCompDirectiveError
}

baseNetworks, err := c.Client.Apiv2().Network().ListBaseNetworks(cmd.Context(), &apiv2.NetworkServiceListBaseNetworksRequest{
Project: c.Proj,
Project: req.Project,
})
if err != nil {
return nil, cobra.ShellCompDirectiveError
Expand Down
20 changes: 16 additions & 4 deletions cmd/completion/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,15 @@ func (c *Completion) ProjectRole(cmd *cobra.Command, args []string, toComplete s
}

func (c *Completion) ProjectInvite(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
resp, err := c.Client.Apiv2().Project().InvitesList(cmd.Context(), &apiv2.ProjectServiceInvitesListRequest{
req := &apiv2.ProjectServiceInvitesListRequest{
Project: c.Proj,
})
}

if project, _ := cmd.Flags().GetString("project"); project != "" {
req.Project = project
}

resp, err := c.Client.Apiv2().Project().InvitesList(cmd.Context(), req)
if err != nil {
return nil, cobra.ShellCompDirectiveError
}
Expand All @@ -53,9 +59,15 @@ func (c *Completion) ProjectInvite(cmd *cobra.Command, args []string, toComplete
}

func (c *Completion) ProjectMember(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
resp, err := c.Client.Apiv2().ProjectMember().List(cmd.Context(), &apiv2.ProjectMemberServiceListRequest{
req := &apiv2.ProjectMemberServiceListRequest{
Project: c.Proj,
})
}

if project, _ := cmd.Flags().GetString("project"); project != "" {
req.Project = project
}

resp, err := c.Client.Apiv2().ProjectMember().List(cmd.Context(), req)
if err != nil {
return nil, cobra.ShellCompDirectiveError
}
Expand Down
20 changes: 16 additions & 4 deletions cmd/completion/tenant.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,15 @@ func (c *Completion) TenantRole(cmd *cobra.Command, args []string, toComplete st
}

func (c *Completion) TenantInvite(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
projectResp, err := c.Client.Apiv2().Project().Get(cmd.Context(), &apiv2.ProjectServiceGetRequest{
req := &apiv2.ProjectServiceGetRequest{
Project: c.Proj,
})
}

if project, _ := cmd.Flags().GetString("project"); project != "" {
req.Project = project
}

projectResp, err := c.Client.Apiv2().Project().Get(cmd.Context(), req)
if err != nil {
return nil, cobra.ShellCompDirectiveError
}
Expand All @@ -59,9 +65,15 @@ func (c *Completion) TenantInvite(cmd *cobra.Command, args []string, toComplete
}

func (c *Completion) TenantMember(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
projectResp, err := c.Client.Apiv2().Project().Get(cmd.Context(), &apiv2.ProjectServiceGetRequest{
req := &apiv2.ProjectServiceGetRequest{
Project: c.Proj,
})
}

if project, _ := cmd.Flags().GetString("project"); project != "" {
req.Project = project
}

projectResp, err := c.Client.Apiv2().Project().Get(cmd.Context(), req)
if err != nil {
return nil, cobra.ShellCompDirectiveError
}
Expand Down
1 change: 1 addition & 0 deletions cmd/completion/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

func (c *Completion) Token(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
req := &apiv2.TokenServiceListRequest{}

resp, err := c.Client.Apiv2().Token().List(cmd.Context(), req)
if err != nil {
return nil, cobra.ShellCompDirectiveError
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ these commands utilize the admin api, which can only be accessed by metal-stack
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_audit.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ read api audit traces
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_audit_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ metalctlv2 admin audit describe <id> [flags]
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_audit_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ metalctlv2 admin audit list [flags]
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_component.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ list status of components, e.g. microservices connected to the metal-apiserver
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_component_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ metalctlv2 admin component delete <id> [flags]
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_component_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ metalctlv2 admin component describe <id> [flags]
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_component_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ metalctlv2 admin component list [flags]
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_component_prune.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ metalctlv2 admin component prune [flags]
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_filesystemlayout.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ manage filesystem layouts which define how disks, raid arrays and volumes are se
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_filesystemlayout_apply.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ metalctlv2 admin filesystemlayout apply [flags]
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_filesystemlayout_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ metalctlv2 admin filesystemlayout create [flags]
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_filesystemlayout_delete.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ metalctlv2 admin filesystemlayout delete <id> [flags]
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_filesystemlayout_describe.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ metalctlv2 admin filesystemlayout describe <id> [flags]
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_filesystemlayout_edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ metalctlv2 admin filesystemlayout edit <id> [flags]
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_filesystemlayout_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ metalctlv2 admin filesystemlayout list [flags]
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_filesystemlayout_match.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ metalctlv2 admin filesystemlayout match [flags]
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
1 change: 1 addition & 0 deletions docs/admin/metalctlv2_admin_filesystemlayout_update.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ metalctlv2 admin filesystemlayout update [flags]
### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
Expand Down
35 changes: 35 additions & 0 deletions docs/admin/metalctlv2_admin_housekeeping.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
## metalctlv2 admin housekeeping

execute housekeeping commands

### Synopsis

housekeeping commands are usually as cronjobs in the control-plane

### Options

```
-h, --help help for housekeeping
```

### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
--debug debug output
--force-color force colored output even without tty
-o, --output-format string output format (table|wide|markdown|json|yaml|template), wide is a table with more columns. (default "table")
--template string output template for template output-format, go template format. For property names inspect the output of -o json or -o yaml for reference.
--timeout duration request timeout used for api requests
```

### SEE ALSO

* [metalctlv2 admin](metalctlv2_admin.md) - admin commands
* [metalctlv2 admin housekeeping machine-liveliness](metalctlv2_admin_housekeeping_machine-liveliness.md) - execute machine liveliness housekeeping
* [metalctlv2 admin housekeeping machine-resurrect](metalctlv2_admin_housekeeping_machine-resurrect.md) - execute machine resurrect housekeeping
* [metalctlv2 admin housekeeping machine-vpn-connected](metalctlv2_admin_housekeeping_machine-vpn-connected.md) - execute machine vpn connected housekeeping

36 changes: 36 additions & 0 deletions docs/admin/metalctlv2_admin_housekeeping_machine-liveliness.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## metalctlv2 admin housekeeping machine-liveliness

execute machine liveliness housekeeping

### Synopsis

updates the liveleness of all machines, only the modified machines are returned

```
metalctlv2 admin housekeeping machine-liveliness [flags]
```

### Options

```
-h, --help help for machine-liveliness
```

### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
--debug debug output
--force-color force colored output even without tty
-o, --output-format string output format (table|wide|markdown|json|yaml|template), wide is a table with more columns. (default "table")
--template string output template for template output-format, go template format. For property names inspect the output of -o json or -o yaml for reference.
--timeout duration request timeout used for api requests
```

### SEE ALSO

* [metalctlv2 admin housekeeping](metalctlv2_admin_housekeeping.md) - execute housekeeping commands

36 changes: 36 additions & 0 deletions docs/admin/metalctlv2_admin_housekeeping_machine-resurrect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## metalctlv2 admin housekeeping machine-resurrect

execute machine resurrect housekeeping

### Synopsis

tries to resurrect machines which are not allocated but not in waiting state by forcing a restart, only machines where a restart was triggered are returned

```
metalctlv2 admin housekeeping machine-resurrect [flags]
```

### Options

```
-h, --help help for machine-resurrect
```

### Options inherited from parent commands

```
--api-ca string the path to a PEM file to trust for the api endpoint in addition to the system CAs
--api-token string the token used for api requests
--api-url string the url to the metal-stack.io api
-c, --config string alternative config file path, (default is ~/.metal-stack/config.yaml)
--debug debug output
--force-color force colored output even without tty
-o, --output-format string output format (table|wide|markdown|json|yaml|template), wide is a table with more columns. (default "table")
--template string output template for template output-format, go template format. For property names inspect the output of -o json or -o yaml for reference.
--timeout duration request timeout used for api requests
```

### SEE ALSO

* [metalctlv2 admin housekeeping](metalctlv2_admin_housekeeping.md) - execute housekeeping commands

Loading