Loading .gitignore +8 −1 Original line number Diff line number Diff line Loading @@ -20,3 +20,10 @@ assets/.nosync # Web Server # ########################## pythonweb.py # IDEs .project # Generated output from examples charms/ .tar.gz examples/NextEPC/build.sh 0 → 100755 +29 −0 Original line number Diff line number Diff line #!/bin/bash export JUJU_REPOSITORY=`pwd`/charm-sources export CHARM_LAYERS_DIR=$JUJU_REPOSITORY/layers export CHARM_BUILD_DIR=`pwd`/vEPC_vnfd/charms rm -rf $CHARM_BUILD_DIR for charm in hsscharm spgwcharm; do cd $CHARM_LAYERS_DIR/$charm charm build & cd - done wait for file in vEPC_nsd vEPC_vnfd do rm ${file}.tar.gz tar -czf ${file}.tar.gz ${file}/ done osm nsd-delete vEPC_nsd osm vnfd-delete vEPC_vnfd osm vnfd-create vEPC_vnfd.tar.gz || exit 1 osm nsd-create vEPC_nsd.tar.gz || exit 1 osm ns-create --ns_name EPC1 --nsd_name vEPC_nsd --ssh_keys ~/.ssh/id_rsa.pub --config_file params.yaml --vim_account vnfob examples/NextEPC/charm-sources/layers/hsscharm/README.ex 0 → 100644 +65 −0 Original line number Diff line number Diff line # Overview Describe the intended usage of this charm and anything unique about how this charm relates to others here. This README will be displayed in the Charm Store, it should be either Markdown or RST. Ideal READMEs include instructions on how to use the charm, expected usage, and charm features that your audience might be interested in. For an example of a well written README check out Hadoop: http://jujucharms.com/charms/precise/hadoop Use this as a Markdown reference if you need help with the formatting of this README: http://askubuntu.com/editing-help This charm provides [service][]. Add a description here of what the service itself actually does. Also remember to check the [icon guidelines][] so that your charm looks good in the Juju GUI. # Usage Step by step instructions on using the charm: juju deploy servicename and so on. If you're providing a web service or something that the end user needs to go to, tell them here, especially if you're deploying a service that might listen to a non-default port. You can then browse to http://ip-address to configure the service. ## Scale out Usage If the charm has any recommendations for running at scale, outline them in examples here. For example if you have a memcached relation that improves performance, mention it here. ## Known Limitations and Issues This not only helps users but gives people a place to start if they want to help you add features to your charm. # Configuration The configuration options will be listed on the charm store, however If you're making assumptions or opinionated decisions in the charm (like setting a default administrator password), you should detail that here so the user knows how to change it immediately, etc. # Contact Information Though this will be listed in the charm store itself don't assume a user will know that, so include that information here: ## Upstream Project Name - Upstream website - Upstream bug tracker - Upstream mailing list or contact information - Feel free to add things if it's useful for users [service]: http://example.com [icon guidelines]: https://jujucharms.com/docs/stable/authors-charm-icon examples/NextEPC/charm-sources/layers/hsscharm/actions.yaml 0 → 100644 +13 −0 Original line number Diff line number Diff line configure-hss: description: "Configures the HSS" params: hss-ip: description: "HSS IP" type: string default: "0.0.0.0" spgw-ip: description: "SPGW IP" type: string default: "0.0.0.0" restart-hss: description: "Restarts the service of the VNF" examples/NextEPC/charm-sources/layers/hsscharm/actions/configure-hss 0 → 100755 +18 −0 Original line number Diff line number Diff line #!/usr/bin/env python3 import sys sys.path.append('lib') from charms.reactive import main from charms.reactive import set_state from charmhelpers.core.hookenv import action_fail, action_name """ `set_state` only works here because it's flushed to disk inside the `main()` loop. remove_state will need to be called inside the action method. """ set_state('actions.{}'.format(action_name())) try: main() except Exception as e: action_fail(repr(e)) Loading
.gitignore +8 −1 Original line number Diff line number Diff line Loading @@ -20,3 +20,10 @@ assets/.nosync # Web Server # ########################## pythonweb.py # IDEs .project # Generated output from examples charms/ .tar.gz
examples/NextEPC/build.sh 0 → 100755 +29 −0 Original line number Diff line number Diff line #!/bin/bash export JUJU_REPOSITORY=`pwd`/charm-sources export CHARM_LAYERS_DIR=$JUJU_REPOSITORY/layers export CHARM_BUILD_DIR=`pwd`/vEPC_vnfd/charms rm -rf $CHARM_BUILD_DIR for charm in hsscharm spgwcharm; do cd $CHARM_LAYERS_DIR/$charm charm build & cd - done wait for file in vEPC_nsd vEPC_vnfd do rm ${file}.tar.gz tar -czf ${file}.tar.gz ${file}/ done osm nsd-delete vEPC_nsd osm vnfd-delete vEPC_vnfd osm vnfd-create vEPC_vnfd.tar.gz || exit 1 osm nsd-create vEPC_nsd.tar.gz || exit 1 osm ns-create --ns_name EPC1 --nsd_name vEPC_nsd --ssh_keys ~/.ssh/id_rsa.pub --config_file params.yaml --vim_account vnfob
examples/NextEPC/charm-sources/layers/hsscharm/README.ex 0 → 100644 +65 −0 Original line number Diff line number Diff line # Overview Describe the intended usage of this charm and anything unique about how this charm relates to others here. This README will be displayed in the Charm Store, it should be either Markdown or RST. Ideal READMEs include instructions on how to use the charm, expected usage, and charm features that your audience might be interested in. For an example of a well written README check out Hadoop: http://jujucharms.com/charms/precise/hadoop Use this as a Markdown reference if you need help with the formatting of this README: http://askubuntu.com/editing-help This charm provides [service][]. Add a description here of what the service itself actually does. Also remember to check the [icon guidelines][] so that your charm looks good in the Juju GUI. # Usage Step by step instructions on using the charm: juju deploy servicename and so on. If you're providing a web service or something that the end user needs to go to, tell them here, especially if you're deploying a service that might listen to a non-default port. You can then browse to http://ip-address to configure the service. ## Scale out Usage If the charm has any recommendations for running at scale, outline them in examples here. For example if you have a memcached relation that improves performance, mention it here. ## Known Limitations and Issues This not only helps users but gives people a place to start if they want to help you add features to your charm. # Configuration The configuration options will be listed on the charm store, however If you're making assumptions or opinionated decisions in the charm (like setting a default administrator password), you should detail that here so the user knows how to change it immediately, etc. # Contact Information Though this will be listed in the charm store itself don't assume a user will know that, so include that information here: ## Upstream Project Name - Upstream website - Upstream bug tracker - Upstream mailing list or contact information - Feel free to add things if it's useful for users [service]: http://example.com [icon guidelines]: https://jujucharms.com/docs/stable/authors-charm-icon
examples/NextEPC/charm-sources/layers/hsscharm/actions.yaml 0 → 100644 +13 −0 Original line number Diff line number Diff line configure-hss: description: "Configures the HSS" params: hss-ip: description: "HSS IP" type: string default: "0.0.0.0" spgw-ip: description: "SPGW IP" type: string default: "0.0.0.0" restart-hss: description: "Restarts the service of the VNF"
examples/NextEPC/charm-sources/layers/hsscharm/actions/configure-hss 0 → 100755 +18 −0 Original line number Diff line number Diff line #!/usr/bin/env python3 import sys sys.path.append('lib') from charms.reactive import main from charms.reactive import set_state from charmhelpers.core.hookenv import action_fail, action_name """ `set_state` only works here because it's flushed to disk inside the `main()` loop. remove_state will need to be called inside the action method. """ set_state('actions.{}'.format(action_name())) try: main() except Exception as e: action_fail(repr(e))