Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
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
itminedu
snf-ganeti
Commits
8a50b7c1
Commit
8a50b7c1
authored
12 years ago
by
Dimitris Aragiorgis
Browse files
Options
Downloads
Patches
Plain Diff
Export serial_no and uuid in network queries
Signed-off-by:
Dimitris Aragiorgis
<
dimara@grnet.gr
>
parent
870c9855
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/client/gnt_network.py
+14
-11
14 additions, 11 deletions
lib/client/gnt_network.py
lib/query.py
+2
-0
2 additions, 0 deletions
lib/query.py
with
16 additions
and
11 deletions
lib/client/gnt_network.py
+
14
−
11
View file @
8a50b7c1
...
...
@@ -185,24 +185,27 @@ def ShowNetworkConfig(opts, args):
"
mac_prefix
"
,
"
network_type
"
,
"
free_count
"
,
"
reserved_count
"
,
"
map
"
,
"
group_list
"
,
"
inst_list
"
,
"
external_reservations
"
],
"
external_reservations
"
,
"
serial_no
"
,
"
uuid
"
],
names
=
args
,
use_locking
=
False
)
for
(
name
,
network
,
gateway
,
network6
,
gateway6
,
mac_prefix
,
network_type
,
free_count
,
reserved_count
,
map
,
group_list
,
instances
,
ext_res
)
in
result
:
map
,
group_list
,
instances
,
ext_res
,
serial
,
uuid
)
in
result
:
size
=
free_count
+
reserved_count
ToStdout
(
"
Network name: %s
"
,
name
)
ToStdout
(
"
subnet: %s
"
,
network
)
ToStdout
(
"
gateway: %s
"
,
gateway
)
ToStdout
(
"
subnet6: %s
"
,
network6
)
ToStdout
(
"
gateway6: %s
"
,
gateway6
)
ToStdout
(
"
mac prefix: %s
"
,
mac_prefix
)
ToStdout
(
"
type: %s
"
,
network_type
)
ToStdout
(
"
size: %d
"
,
size
)
ToStdout
(
"
free: %d (%.2f%%)
"
,
free_count
,
ToStdout
(
"
UUID: %s
"
,
uuid
)
ToStdout
(
"
Serial number: %d
"
,
serial
)
ToStdout
(
"
Subnet: %s
"
,
network
)
ToStdout
(
"
Gateway: %s
"
,
gateway
)
ToStdout
(
"
IPv6 Subnet: %s
"
,
network6
)
ToStdout
(
"
IPv6 Gateway: %s
"
,
gateway6
)
ToStdout
(
"
Mac Prefix: %s
"
,
mac_prefix
)
ToStdout
(
"
Type: %s
"
,
network_type
)
ToStdout
(
"
Size: %d
"
,
size
)
ToStdout
(
"
Free: %d (%.2f%%)
"
,
free_count
,
100
*
float
(
free_count
)
/
float
(
size
))
ToStdout
(
"
u
sage map:
"
)
ToStdout
(
"
U
sage map:
"
)
idx
=
0
for
line
in
wrap
(
map
,
width
=
64
):
ToStdout
(
"
%s %s %d
"
,
str
(
idx
).
rjust
(
3
),
line
.
ljust
(
64
),
idx
+
63
)
...
...
This diff is collapsed.
Click to expand it.
lib/query.py
+
2
−
0
View file @
8a50b7c1
...
...
@@ -2468,6 +2468,8 @@ _NETWORK_SIMPLE_FIELDS = {
"
gateway6
"
:
(
"
IPv6Gateway
"
,
QFT_OTHER
,
0
,
"
The ipv6 gateway
"
),
"
mac_prefix
"
:
(
"
MacPrefix
"
,
QFT_OTHER
,
0
,
"
The mac prefix
"
),
"
network_type
"
:
(
"
NetworkType
"
,
QFT_OTHER
,
0
,
"
The network type
"
),
"
serial_no
"
:
(
"
SerialNo
"
,
QFT_NUMBER
,
0
,
_SERIAL_NO_DOC
%
"
Network
"
),
"
uuid
"
:
(
"
UUID
"
,
QFT_TEXT
,
0
,
"
Network UUID
"
),
}
...
...
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