Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cc-node
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor 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-node
Commits
7d071b8e
Commit
7d071b8e
authored
9 years ago
by
Antoine Millet
Browse files
Options
Downloads
Patches
Plain Diff
Implemented nic_vlans tag
parent
0d0acc6d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cloudcontrol/node/hypervisor/domains/vm_tags.py
+10
-0
10 additions, 0 deletions
cloudcontrol/node/hypervisor/domains/vm_tags.py
with
10 additions
and
0 deletions
cloudcontrol/node/hypervisor/domains/vm_tags.py
+
10
−
0
View file @
7d071b8e
...
...
@@ -15,6 +15,7 @@
import
logging
import
itertools
from
functools
import
wraps
from
xml.etree
import
cElementTree
as
et
from
StringIO
import
StringIO
...
...
@@ -197,6 +198,15 @@ def nic(dom):
return
u
'
'
.
join
(
map
(
str
,
xrange
(
len
(
dom
.
nics
))))
or
None
@ttl
(
10
)
@refresh
(
10
)
@_vir_tag
def
nic_vlans
(
dom
):
"""
VM network interfaces.
"""
vlans
=
set
(
itertools
.
chain
(
*
[
x
.
vlans
for
x
in
dom
.
nics
]))
return
u
'
'
.
join
(
str
(
x
)
for
x
in
sorted
(
vlans
))
or
None
@refresh
(
10
)
@_vir_tag
def
autostart
(
dom
):
...
...
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