Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Commit

Permalink
make autogen tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
najeal committed Sep 27, 2019
1 parent ddfaa0d commit 8cede12
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 2 deletions.
22 changes: 22 additions & 0 deletions docs/cli/ignite/ignite_ps.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@ List running VMs

List all running VMs. By specifying the all flag (-a, --all),
also list VMs that are not currently running.
Using the -f (--filter) flag, you can give conditions VMs should fullfilled to be displayed.
You can filter on all the underlying fields of the VM struct, see the documentation:
https://ignite.readthedocs.io/en/stable/api/ignite_v1alpha2.html#VM.

Different operators can be used:
- "=" and "==" for the equal
- "!=" for the is not equal
- "=~" for the contains
- "!~" for the not contains

Non-exhaustive list of identifiers to apply filter on:
- the VM name
- CPUs usage
- Labels
- Image
- Kernel
- Memory

Example usage:
$ ignite ps -f "{{.ObjectMeta.Name}}=my-vm2,{{.Spec.CPUs}}!=3,{{.Spec.Image.OCI}}=~weaveworks/ignite-ubuntu"

$ ignite ps -f "{{.Spec.Memory}}=~1024,{{.Status.Running}}=true"


```
Expand Down
22 changes: 22 additions & 0 deletions docs/cli/ignite/ignite_vm_ps.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,28 @@ List running VMs

List all running VMs. By specifying the all flag (-a, --all),
also list VMs that are not currently running.
Using the -f (--filter) flag, you can give conditions VMs should fullfilled to be displayed.
You can filter on all the underlying fields of the VM struct, see the documentation:
https://ignite.readthedocs.io/en/stable/api/ignite_v1alpha2.html#VM.

Different operators can be used:
- "=" and "==" for the equal
- "!=" for the is not equal
- "=~" for the contains
- "!~" for the not contains

Non-exhaustive list of identifiers to apply filter on:
- the VM name
- CPUs usage
- Labels
- Image
- Kernel
- Memory

Example usage:
$ ignite ps -f "{{.ObjectMeta.Name}}=my-vm2,{{.Spec.CPUs}}!=3,{{.Spec.Image.OCI}}=~weaveworks/ignite-ubuntu"

$ ignite ps -f "{{.Spec.Memory}}=~1024,{{.Status.Running}}=true"


```
Expand Down
4 changes: 2 additions & 2 deletions pkg/filter/meta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,12 +405,12 @@ func TestExtractMultipleKeyValueFiltering(t *testing.T) {
str: "{{.Name}}=target1,{{.Age}}=38",
res: []metaFilter{

metaFilter{
{
identifier: "{{.Name}}",
expectedValue: "target1",
operator: "=",
},
metaFilter{
{
identifier: "{{.Age}}",
expectedValue: "38",
operator: "=",
Expand Down

0 comments on commit 8cede12

Please sign in to comment.