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
e157378d
Commit
e157378d
authored
9 years ago
by
Antoine Millet
Browse files
Options
Downloads
Patches
Plain Diff
Implemented vir_uri tag
parent
f8545d4f
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
cloudcontrol/node/config.py
+5
-0
5 additions, 0 deletions
cloudcontrol/node/config.py
cloudcontrol/node/hypervisor/tags.py
+4
-0
4 additions, 0 deletions
cloudcontrol/node/hypervisor/tags.py
with
9 additions
and
0 deletions
cloudcontrol/node/config.py
+
5
−
0
View file @
e157378d
...
...
@@ -14,6 +14,7 @@
# along with CloudControl. If not, see <http://www.gnu.org/licenses/>.
import
socket
import
logging
import
logging.config
from
StringIO
import
StringIO
...
...
@@ -103,6 +104,10 @@ class NodeConfigParser(object):
self
.
plugins_store_path
=
config
.
get
(
'
node
'
,
'
plugins_store_path
'
,
'
/var/lib/cc-node/plugins
'
)
# Libvirt URI to export to cc-server (vir_uri tag)
default_libvirt_uri
=
'
qemu+tcp://%s/system
'
%
socket
.
gethostbyname
(
socket
.
gethostname
())
self
.
libvirt_uri
=
config
.
get
(
'
node
'
,
'
libvirt_uri
'
,
default_libvirt_uri
)
# Path to define script
default_define_script
=
'
hkvm-define
'
self
.
define_script
=
config
.
get
(
'
node
'
,
'
define_script
'
,
default_define_script
)
...
...
This diff is collapsed.
Click to expand it.
cloudcontrol/node/hypervisor/tags.py
+
4
−
0
View file @
e157378d
...
...
@@ -60,6 +60,10 @@ def vir_status(handl):
return
{
True
:
'
connected
'
,
False
:
'
disconnected
'
}[
handl
.
virt_connected
]
def
vir_uri
(
handl
):
return
handl
.
main
.
config
.
libvirt_uri
# hypervisor related tags
def
htype
():
"""
Hypervisor type.
"""
...
...
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