Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-cli
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
cc-cli
Commits
69702fa8
Commit
69702fa8
authored
14 years ago
by
Seblu
Browse files
Options
Downloads
Patches
Plain Diff
add reserved tags concept to tql
parent
4825c228
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
TQL
+25
-19
25 additions, 19 deletions
TQL
with
25 additions
and
19 deletions
TQL
+
25
−
19
View file @
69702fa8
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment