Skip to content
Snippets Groups Projects
Commit 69702fa8 authored by Seblu's avatar Seblu
Browse files

add reserved tags concept to tql

parent 4825c228
No related branches found
No related tags found
No related merge requests found
...@@ -2,23 +2,23 @@ ...@@ -2,23 +2,23 @@
Tag Query Languag Tag Query Languag
================== ==================
== by examples == == by examples ==
seblu> list id #list all ids, same as list seblu> list id #list all ids, same as list
seblu> list a #list all accounts seblu> list a #list all accounts
seblu> list h:fw* #list all hostname starting by fw seblu> list h:fw* #list all hostname starting by fw
seblu> list r=hv #list all hypervisor seblu> list r=hv #list all hypervisor
seblu> list r=vm #list all vm seblu> list r=vm #list all vm
seblu> list hv=toto #list vm of hypervisor toto seblu> list hv=toto #list vm of hypervisor toto
seblu> list hv=toto&h=chiche #list vm chiche of hypervisor toto seblu> list hv=toto&h=chiche #list vm chiche of hypervisor toto
seblu> list r=vm&cpu=2 #list vm with 2 cpu seblu> list r=vm&cpu=2 #list vm with 2 cpu
seblu> list r=vm&cpu=2&mem>10g #list vm with 2 cpu and mem > 10g seblu> list r=vm&cpu=2&mem>10g #list vm with 2 cpu and mem > 10g
seblu> list r=hv&cpu=2&mem>10g #list hypervisor with no vm seblu> list r=hv&cpu=2&mem>10g #list hypervisor with no vm
seblu> list cpu>=2$pop$alloc #list object with at least 2cpu and show tags pop and alloc seblu> list cpu>=2$pop$alloc #list object with at least 2cpu and show tags pop and alloc
seblu> list r=vm^10 #list first 10 vm seblu> list r=vm^10 #list first 10 vm
seblu> list r=vm^:10 #list last 10 vm seblu> list r=vm^:10 #list last 10 vm
seblu> list r=vm^5:10 #list vm seblu> list r=vm^5:10 #list vm
seblu> list r=vm%vm #list vm sorted by vm seblu> list r=vm%vm #list vm sorted by vm
seblu> list r=vm%vm%cpu #list vm sorted by vm and cpu seblu> list r=vm%vm%cpu #list vm sorted by vm and cpu
seblu> list r=vm&-cpu #list vm without tag cpu seblu> list r=vm&-cpu #list vm without tag cpu
== Basics == == Basics ==
- TQL build a list of objects in one query - TQL build a list of objects in one query
...@@ -72,13 +72,19 @@ n:m limit from n to m objects ...@@ -72,13 +72,19 @@ n:m limit from n to m objects
1g = 1000 ^ 3 1g = 1000 ^ 3
1gi = 1024 ^ 3 1gi = 1024 ^ 3
== well known tags == == reserverd tags ==
Reserved tags are tags with a special meaning and cannot be set or remove
directly by clients
id: object unique identifier (eg: kvmlab-1.test5) id: object unique identifier (eg: kvmlab-1.test5)
a: account name (eg: bobby) a: account name (eg: bobby)
r: account role (host/hv/vm/cli/web/spv) r: account role (host/hv/vm/cli/web/spv)
h: hostname (eg: access) closed: account close status
con: connection uptime in seconds or offline (eg: 3600) con: connection uptime in seconds or offline (eg: 3600)
ip: ipv4 of connection ip: ipv4 of connection
== well known tags ==
h: hostname (eg: access)
hv: hypervisor name (eg: kvmlab-1) hv: hypervisor name (eg: kvmlab-1)
htype: hypervisor type (xen/kvm) htype: hypervisor type (xen/kvm)
libvirtver: Libvirt version libvirtver: Libvirt version
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment