~ubuntu-branches/ubuntu/wily/openvswitch/wily

« back to all changes in this revision

Viewing changes to xenserver/etc_xapi.d_plugins_openvswitch-cfg-update

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2015-08-10 11:35:15 UTC
  • mfrom: (1.1.30)
  • Revision ID: package-import@ubuntu.com-20150810113515-575vj06oq29emxsn
Tags: 2.4.0~git20150810.97bab95-0ubuntu1
* New upstream snapshot from 2.4 branch:
  - d/*: Align any relevant packaging changes with upstream.
* d/*: wrap-and-sort.
* d/openvswitch-{common,vswitch}.install: Correct install location for
  bash completion files.
* d/tests/openflow.py: Explicitly use ovs-testcontroller as provided
  by 2.4.0 release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
def update(session, args):
45
45
    # Refresh bridge network UUIDs in case this host joined or left a pool.
46
46
    script = '/opt/xensource/libexec/interface-reconfigure'
47
 
    # NOTE(jamespage): Override with distro xcp xapi locations
48
 
    # if present
49
 
    if os.path.exists('/usr/lib/xcp/lib/interface-reconfigure'):
50
 
        script = '/usr/lib/xcp/lib/interface-reconfigure'
51
47
    try:
52
48
        retval = subprocess.call([script, 'rewrite'])
53
49
        if retval != 0:
75
71
            pass
76
72
        removeControllerCfg()
77
73
        ret_str += 'Successfully removed controller config.  '
78
 
    elif controller not in currentControllers:
 
74
    # controller cannot be empty, otherwise, this will always be True.
 
75
    elif controller and controller not in currentControllers:
79
76
        delete_cacert()
80
77
        try:
81
78
            emergency_reset(session, None)
227
224
                   '/etc/xensource/xapi-ssl.pem',
228
225
                   '/etc/xensource/xapi-ssl.pem',
229
226
                   cacert_filename,
230
 
                   '--', 'set-manager', 'ssl:' + controller + ':6632'])
 
227
                   '--', 'set-manager', 'ssl:' + controller + ':6640'])
231
228
 
232
229
 
233
230
def vswitchCfgQuery(action_args):