Commit 38dd8a1b authored by Mark Beierl's avatar Mark Beierl
Browse files

Merge branch 'helm_ee' into 'master'

Scripts from MR#10 Hackfest

See merge request !198
parents 537efb33 11cfe1c4
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
#!/bin/bash

git clone --recurse-submodules -j8 https://osm.etsi.org/gitlab/vnf-onboarding/osm-packages.git
+29 −0
Original line number Diff line number Diff line
#!/bin/bash

if [ ! -d hackfest_basic_ns ] ; then
    echo "It does not look like we are in the osm-packages directory, exiting"
    exit 1
fi


echo "========================================================================"
echo "Cleaning out any prior versions of the descriptors from OSM"
echo "========================================================================"
osm nsd-delete hackfest_basic-ns
osm vnfd-delete hackfest_basic-vnf

echo "========================================================================"
echo "Building packages"
echo "========================================================================"
osm package-build hackfest_basic_vnf
osm package-build hackfest_basic_ns

echo "========================================================================"
echo "Uploading packages"
echo "========================================================================"
osm upload-package hackfest_basic_vnf.tar.gz
osm upload-package hackfest_basic_ns.tar.gz
echo "========================================================================"
echo "Done"
echo "========================================================================"
+12 −0
Original line number Diff line number Diff line
#!/bin/bash

echo "========================================================================"
echo "Deleting network service"
echo "========================================================================"

osm ns-delete basic-vnf

echo "========================================================================"
echo "Done"
echo "========================================================================"
+16 −0
Original line number Diff line number Diff line
#!/bin/bash

VIMID=`osm vim-list | grep osm_ | awk '{ print $4 }'`
echo "========================================================================"
echo "Launching network service with VIMID ${VIMID}"
echo "========================================================================"
osm ns-create --ns_name basic-vnf \
    --nsd_name hackfest_basic-ns \
    --vim_account ${VIMID} \
    --ssh_keys ~/.ssh/id_rsa.pub \
    --config \
    '{vld: [ {name: mgmtnet, vim-network-name: osm-ext} ] }'
echo "========================================================================"
echo "Done"
echo "========================================================================"
+14 −0
Original line number Diff line number Diff line
#!/bin/bash

echo "========================================================================"
echo "Here are some of the actions you can run"
echo "========================================================================"

cat << 'EOF'

DESKTOP_IP=`osm ns-show virtual-desktop --literal | yq e '.vcaStatus.*.machines.0.network_interfaces.ens3.ip_addresses.0' -`

osm ns-action firewall --vnf_name VYOS-PNF --action_name add-port-forward --params "{ruleNumber: '10', sourcePort: '3389', destinationAddress: \"${DESKTOP_IP}\", destinationPort: '3389'}"
osm ns-action firewall --vnf_name VYOS-PNF --action_name remove-port-forward --params '{ruleNumber: "10"}'

EOF 
Loading