Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0f33e9ae
authored
Sep 08, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agent: use instance.short_hostname in send_init_commands()
closes
#263
parent
2b450c1f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletions
+8
-1
circle/vm/models/instance.py
+7
-0
circle/vm/tasks/local_agent_tasks.py
+1
-1
No files found.
circle/vm/models/instance.py
View file @
0f33e9ae
...
...
@@ -613,6 +613,13 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
except
:
return
@property
def
short_hostname
(
self
):
try
:
return
self
.
primary_host
.
hostname
except
AttributeError
:
return
self
.
vm_name
def
get_vm_desc
(
self
):
"""Serialize Instance object to vmdriver.
"""
...
...
circle/vm/tasks/local_agent_tasks.py
View file @
0f33e9ae
...
...
@@ -46,7 +46,7 @@ def send_init_commands(instance, act):
with
act
.
sub_activity
(
'set_hostname'
,
readable_name
=
ugettext_noop
(
'set hostname'
)):
set_hostname
.
apply_async
(
queue
=
queue
,
args
=
(
vm
,
instance
.
primary_host
.
hostname
))
queue
=
queue
,
args
=
(
vm
,
instance
.
short_
hostname
))
def
send_networking_commands
(
instance
,
act
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment