VNF Primitive Start: Difference between revisions

From OSM Public Wiki
Jump to: navigation, search
(Created page with "'''DISCLAIMER: This page is being updated to reflect changes required for Release FOUR.''' The purpose of the Start primitive is to start your VNF application. {|class="wiki...")
 
No edit summary
 
Line 1: Line 1:
'''DISCLAIMER: This page is being updated to reflect changes required for Release FOUR.'''
The purpose of the Start primitive is to start your VNF application.
The purpose of the Start primitive is to start your VNF application.



Latest revision as of 12:33, 26 June 2018

The purpose of the Start primitive is to start your VNF application.

Config Required
Day 0 Day 1 Day 2
No Yes Yes No

Example code:

@when('actions.start')
def start_vnf():
    err = ''
    try:
        """
        Run the command(s) necessary to perform a safe start of your VNF
        This could be a single command that encapsulates your start process...
        Or a series of commands for each step, such as:
         - start your vnf
         - perform warm-up operatoins
         - accept live traffic
        """
        result, err = charms.sshproxy._run("/srv/myvnf/start.sh")
    except:
        action_fail('Start failed:' + err)
    else:
        action_set({'outout': result})
    finally:
        clear_flag('actions.start')

For a full example of creating a VNF charm, please see Creating your own VNF charm (Release FOUR).