Assign image keyname and pubkey at vnf level
[ccsdk/apps.git] / sdnr / wireless-transport / code-Carbon-SR1 / ux / ux-dev.sh
1 #!/bin/bash
2
3 # build ux
4 mvn clean install -DskipTests
5
6 # clean
7 rm -rf ~/.m2/repository/com/highstreet/technologies/odl/app/closedLoopAutomation-karaf/
8 rm -rf ~/.m2/repository/com/highstreet/technologies/odl/app/spectrum/scheduler-karaf/
9 find ~/.m2/repository/org/opendaylight/mwtn/* -type d -name "*-module" -exec rm -rf {} \;
10 find ~/.m2/repository/com/highstreet/* -type d -name "*-module" -exec rm -rf {} \;
11 rm -rf ../dist/cache/schema/tailf*.yang
12 rm -rf ../dist/cache/schema/yuma*.yang
13 # rm -rf ../dist/data/log/*
14 rm -rf ../dist/system/org/opendaylight/mwtn
15 rm -rf ../dist/system/com/highstreet 
16
17 # deploy
18 cp -R ~/.m2/repository/org/opendaylight/mwtn ../dist/system/org/opendaylight 
19 cp -R ~/.m2/repository/com/highstreet ../dist/system/com
20
21 # uninstall bundles
22 ## declare array of bundleNames
23 declare -a bundleNames=(
24     "ONF :: Wireless :: odlChat-bundle" 
25     "ONF :: Wireless :: help-bundle" 
26     "ONF :: Wireless :: mwtnLog-bundle" 
27     "ONF :: Wireless :: mwtnTest-bundle"
28     "ONF :: Wireless :: mwtnMediator-bundle"
29     "ONF :: Wireless :: mwtnEvents-bundle"
30     "ONF :: Wireless :: mwtnClosedLoop-bundle"
31     "ONF :: Wireless :: mwtnSpectrum-bundle"
32     "ONF :: Wireless :: mwtnCompare-bundle"
33     "ONF :: Wireless :: mwtnTdm-bundle"
34     "ONF :: Wireless :: mwtnTopology-bundle"
35     "ONF :: Wireless :: mwtnInventory-bundle"
36     "ONF :: Wireless :: mwtnPerformanceLink-bundle"
37     "ONF :: Wireless :: mwtnPerformanceHistory-bundle"
38     "ONF :: Wireless :: mwtnPerformanceCurrent-bundle"
39     "ONF :: Wireless :: mwtnFault-bundle"
40     "ONF :: Wireless :: mwtnBrowser-bundle"
41     "ONF :: Wireless :: otnBrowser-bundle"
42     "ONF :: Wireless :: ethService-bundle"
43     "ONF :: Wireless :: onapMso-bundle"
44     "ONF :: Wireless :: onapDcae-bundle"
45     "ONF :: Wireless :: onapAai-bundle"
46     "ONF :: Wireless :: mwtnConnect-bundle"
47     "ONF :: Wireless :: mwtnCommons-bundle"
48 )
49
50 ## execute bundle uninstall 
51 names=""
52 for bundleName in "${bundleNames[@]}"
53 do
54    names+="\"$bundleName\" "
55 done
56 ../dist/bin/client -u karaf "bundle:uninstall $names"
57
58 # install bundles
59 ## declare array of bundleNames
60 declare -a bundles=(
61     mvn:com.highstreet.technologies.odl.dlux/mwtnCommons-bundle/0.5.1-SNAPSHOT 
62     mvn:com.highstreet.technologies.odl.dlux/mwtnConnect-bundle/0.5.1-SNAPSHOT 
63
64     mvn:com.highstreet.technologies.odl.dlux/onapAai-bundle/0.5.1-SNAPSHOT 
65     mvn:com.highstreet.technologies.odl.dlux/onapDcae-bundle/0.5.1-SNAPSHOT 
66     mvn:com.highstreet.technologies.odl.dlux/onapMso-bundle/0.5.1-SNAPSHOT 
67
68     # mvn:com.highstreet.technologies.odl.dlux/ethService-bundle/0.5.1-SNAPSHOT
69     # mvn:com.highstreet.technologies.odl.dlux/otnBrowser-bundle/0.5.1-SNAPSHOT
70
71     mvn:com.highstreet.technologies.odl.dlux/mwtnFault-bundle/0.5.1-SNAPSHOT
72     mvn:com.highstreet.technologies.odl.dlux/mwtnBrowser-bundle/0.5.1-SNAPSHOT 
73     mvn:com.highstreet.technologies.odl.dlux/mwtnPerformanceCurrent-bundle/0.5.1-SNAPSHOT 
74     mvn:com.highstreet.technologies.odl.dlux/mwtnPerformanceHistory-bundle/0.5.1-SNAPSHOT 
75     mvn:com.highstreet.technologies.odl.dlux/mwtnPerformanceLink-bundle/0.5.1-SNAPSHOT
76     mvn:com.highstreet.technologies.odl.dlux/mwtnInventory-bundle/0.5.1-SNAPSHOT 
77     mvn:com.highstreet.technologies.odl.dlux/mwtnTopology-bundle/0.5.1-SNAPSHOT 
78     # mvn:com.highstreet.technologies.odl.dlux/mwtnTdm-bundle/0.5.1-SNAPSHOT 
79     # mvn:com.highstreet.technologies.odl.dlux/mwtnCompare-bundle/0.5.1-SNAPSHOT 
80     # mvn:cn.com.zte.odl.dlux/mwtnSpectrum-bundle/0.5.1-SNAPSHOT
81     # mvn:com.highstreet.technologies.odl.dlux/mwtnClosedLoop-bundle/0.5.1-SNAPSHOT 
82     # mvn:com.highstreet.technologies.odl.dlux/mwtnEvents-bundle/0.5.1-SNAPSHOT 
83     # mvn:com.highstreet.technologies.odl.dlux/mwtnTest-bundle/0.5.1-SNAPSHOT
84     mvn:com.highstreet.technologies.odl.dlux/mwtnMediator-bundle/0.5.1-SNAPSHOT
85     mvn:com.highstreet.technologies.odl.dlux/help-bundle/0.5.1-SNAPSHOT
86     # mvn:com.highstreet.technologies.odl.dlux/mwtnLog-bundle/0.5.1-SNAPSHOT 
87     # mvn:com.highstreet.technologies.odl.dlux/odlChat-bundle/0.5.1-SNAPSHOT
88 )
89
90 ## execute bundle uninstall 
91 bundleMvns=""
92 for bundle in "${bundles[@]}"
93 do
94    bundleMvns+="$bundle "
95 done
96 ../dist/bin/client -u karaf "bundle:install -s $bundleMvns"
97
98 # open brwoser
99 x-www-browser http://localhost:8181/index.html
100
101 # remove target folders for easy search functionality
102 mvn clean
103 find * -type d -name "target-ide" -exec rm -rf {} \;