diff --git a/TQL b/TQL index 89cd7781d75db6c64a8d9b797aaa64df8ef6ff5e..d0deda77e8b54d312f5d14ac6dde0bad29349145 100644 --- a/TQL +++ b/TQL @@ -2,23 +2,23 @@ Tag Query Languag ================== == by examples == -seblu> list id #list all ids, same as list -seblu> list a #list all accounts -seblu> list h:fw* #list all hostname starting by fw -seblu> list r=hv #list all hypervisor -seblu> list r=vm #list all vm -seblu> list hv=toto #list vm 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&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 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 last 10 vm -seblu> list r=vm^5:10 #list 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&-cpu #list vm without tag cpu +seblu> list id #list all ids, same as list +seblu> list a #list all accounts +seblu> list h:fw* #list all hostname starting by fw +seblu> list r=hv #list all hypervisor +seblu> list r=vm #list all vm +seblu> list hv=toto #list vm 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&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 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 last 10 vm +seblu> list r=vm^5:10 #list 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&-cpu #list vm without tag cpu == Basics == - TQL build a list of objects in one query @@ -72,13 +72,19 @@ n:m limit from n to m objects 1g = 1000 ^ 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) a: account name (eg: bobby) 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) ip: ipv4 of connection + +== well known tags == +h: hostname (eg: access) hv: hypervisor name (eg: kvmlab-1) htype: hypervisor type (xen/kvm) libvirtver: Libvirt version