Skip to content

Commit

Permalink
Merge pull request #3 from rneilturner/stable-9-v4v-to-argo
Browse files Browse the repository at this point in the history
[sync-client] Stable-9 Convert from v4v to argo
  • Loading branch information
jean-edouard authored Jul 9, 2019
2 parents 9571561 + 78fad45 commit cbf7fe9
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions sync_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from uuid import uuid4
from tempfile import NamedTemporaryFile
from os import unlink, O_CREAT, O_RDONLY, O_WRONLY, environ
from pyicbinn import icbinn_clnt_create_v4v, icbinn_close, icbinn_lock
from pyicbinn import icbinn_clnt_create_argo, icbinn_close, icbinn_lock
from pyicbinn import icbinn_mkdir, icbinn_open, icbinn_pwrite, icbinn_rand
from pyicbinn import icbinn_readent, icbinn_rename, icbinn_stat, icbinn_pread
from pyicbinn import icbinn_unlink
Expand Down Expand Up @@ -186,16 +186,16 @@ def __init__(self, mount_point,
self.mount_point = mount_point
log.info("calling icbinn at (%d, %d)", server_domain_id, server_port)
try:
self.icbinn = icbinn_clnt_create_v4v(server_domain_id,
self.icbinn = icbinn_clnt_create_argo(server_domain_id,
server_port)
except Exception as exc:
raise IcbinnConnectError("failed to connect to icbinn server at "
"(%d, %d): icbinn_clnt_create_v4v "
"(%d, %d): icbinn_clnt_create_argo "
"failed: %r" % (server_domain_id,
server_port, exc))
if self.icbinn is None:
raise IcbinnConnectError("failed to connect to icbinn server at "
"(%d, %d): icbinn_clnt_create_v4v "
"(%d, %d): icbinn_clnt_create_argo "
"failed" % (server_domain_id,
server_port))
log.info("successfully contacted icbinn server for %s" % (mount_point))
Expand Down Expand Up @@ -790,8 +790,8 @@ def decode_encryption_key(encryption_key):

def vhd_util(*args):
"""Run vhd-util via ICBINN"""
environ['LIBVHD_ICBINN_VHD_SERVER'] = 'v4v:0:4878'
environ['LIBVHD_ICBINN_KEY_SERVER'] = 'v4v:0:4879'
environ['LIBVHD_ICBINN_VHD_SERVER'] = 'argo:0:4878'
environ['LIBVHD_ICBINN_KEY_SERVER'] = 'argo:0:4879'
cmd = ['vhd-util'] + list(args)
log.info("running [ %s ]", ' '.join(cmd))
return check_output(cmd, close_fds=True)
Expand Down Expand Up @@ -863,7 +863,7 @@ def ensure_vm_exists(uuid, have, sync_name, config, name):

if vmpath is None:
topdict = dict()
topdict['v4v-firewall-rules'] = dict()
topdict['argo-firewall-rules'] = dict()
topdict['rpc-firewall-rules'] = dict()
topdict['config'] = dict()
topdict['config']['pci'] = dict()
Expand Down Expand Up @@ -908,7 +908,7 @@ def ensure_vm_exists(uuid, have, sync_name, config, name):
if nic_index not in nics:
nics[nic_index] = dict({'id': nic_index})
nics[nic_index][key]= value
if daemon in ['v4v', 'rpc', 'pci'] and value == 'true':
if daemon in ['argo', 'rpc', 'pci'] and value == 'true':
if daemon == 'pci':
destdict = topdict['config']['pci']
else:
Expand Down Expand Up @@ -1097,7 +1097,7 @@ def configure(daemon):
if daemon == 'domstore':
return ((lambda k: get_domstore_key(vmpath, k)),
(lambda k, v: set_domstore_key(vmpath, k, v)))
if daemon in ['vmparam', 'v4v', 'rpc', 'pci']:
if daemon in ['vmparam', 'argo', 'rpc', 'pci']:
return (None, None)
if daemon.startswith('nic/'):
try:
Expand Down

0 comments on commit cbf7fe9

Please sign in to comment.