VNF Primitive Upgrade

From OSM Public Wiki
Revision as of 08:47, 26 June 2018 by Israelad (talk | contribs) (Created page with "The purpose of the Upgrade primitive is to perform an upgrade of operational software on your VNF. Implementing the primitive is optional. <code> <pre> @when('actions.upgrad...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The purpose of the Upgrade primitive is to perform an upgrade of operational software on your VNF.

Implementing the primitive is optional.

@when('actions.upgrade')
def upgrade_vnf():
    err = ''
    try:
        result, err = charms.sshproxy._run("/srv/myvnf/upgrade.sh")
    except:
        action_fail('command failed:' + err)
    else:
        action_set({'outout': result})
    finally:
        clear_flag('actions.upgrade')