Matteo Scandolo | 9ce1825 | 2017-06-22 10:48:25 -0700 | [diff] [blame] | 1 | help: |
Zack Williams | f584f7c | 2018-08-30 15:34:15 -0700 | [diff] [blame] | 2 | @echo "tests: Run unit tests (need the xos dev virtual-env activated)" |
Matteo Scandolo | df2600b | 2017-07-05 17:01:29 -0700 | [diff] [blame] | 3 | @echo "tosca: Generate tosca definition from core.xproto" |
Matteo Scandolo | 5c0af1b | 2017-07-05 14:51:21 -0700 | [diff] [blame] | 4 | @echo "build: Build the docker image for xos-tosca" |
| 5 | @echo "start: Run an xos-tosca container" |
| 6 | @echo "clean: Remove the xos-tosca container (if any), and the image (if any)" |
Matteo Scandolo | 78ca3eb | 2017-07-13 16:58:22 -0700 | [diff] [blame] | 7 | @echo "test-create: Send a sample tosca recipe" |
| 8 | @echo "test-delete: Delete a sample tosca recipe" |
Matteo Scandolo | 9ce1825 | 2017-06-22 10:48:25 -0700 | [diff] [blame] | 9 | |
Matteo Scandolo | df2600b | 2017-07-05 17:01:29 -0700 | [diff] [blame] | 10 | tests: tosca |
Zack Williams | f584f7c | 2018-08-30 15:34:15 -0700 | [diff] [blame] | 11 | nose2 --verbose --coverage-report xml --coverage-report term --junit-xml |
Matteo Scandolo | 9ce1825 | 2017-06-22 10:48:25 -0700 | [diff] [blame] | 12 | |
| 13 | build: |
Matteo Scandolo | 1bd1076 | 2017-10-18 09:53:14 +0200 | [diff] [blame] | 14 | docker build -t xosproject/xos-tosca . |
| 15 | docker tag xosproject/xos-tosca:latest xosproject/xos-tosca:candidate |
Matteo Scandolo | 5c0af1b | 2017-07-05 14:51:21 -0700 | [diff] [blame] | 16 | |
| 17 | start: build |
| 18 | docker run -p 9200:9200 --name xos-tosca -d xosproject/xos-tosca |
Matteo Scandolo | 9ce1825 | 2017-06-22 10:48:25 -0700 | [diff] [blame] | 19 | |
| 20 | clean: |
Matteo Scandolo | 5c0af1b | 2017-07-05 14:51:21 -0700 | [diff] [blame] | 21 | docker rm -f xos-tosca || true |
| 22 | docker rmi -f xosproject/xos-tosca || true |
Matteo Scandolo | 9ce1825 | 2017-06-22 10:48:25 -0700 | [diff] [blame] | 23 | |
Matteo Scandolo | 78ca3eb | 2017-07-13 16:58:22 -0700 | [diff] [blame] | 24 | test-create: |
Matteo Scandolo | 2c1a001 | 2017-09-12 17:08:04 -0700 | [diff] [blame] | 25 | curl -H "xos-username: xosadmin@opencord.org" -H "xos-password: rk1UYDHZXbu6KVCMkhmV" -X POST --data-binary @test/tosca/test.yaml 127.0.0.1:9102/run |
Matteo Scandolo | 485b713 | 2017-06-30 11:46:47 -0700 | [diff] [blame] | 26 | |
Matteo Scandolo | 78ca3eb | 2017-07-13 16:58:22 -0700 | [diff] [blame] | 27 | test-delete: |
Matteo Scandolo | 2c1a001 | 2017-09-12 17:08:04 -0700 | [diff] [blame] | 28 | curl -H "xos-username: xosadmin@opencord.org" -H "xos-password: rk1UYDHZXbu6KVCMkhmV" -X POST --data-binary @test/tosca/test.yaml 127.0.0.1:9102/delete |
Matteo Scandolo | 78ca3eb | 2017-07-13 16:58:22 -0700 | [diff] [blame] | 29 | |
Matteo Scandolo | df2600b | 2017-07-05 17:01:29 -0700 | [diff] [blame] | 30 | tosca: |
Matteo Scandolo | 1bd1076 | 2017-10-18 09:53:14 +0200 | [diff] [blame] | 31 | xosgenx --target=src/tosca/xtarget/tosca.xtarget --output=src/tosca/custom_types --write-to-file=target ../xos/xos/core/models/core.xproto |
Zack Williams | f584f7c | 2018-08-30 15:34:15 -0700 | [diff] [blame] | 32 | xosgenx --target=src/tosca/xtarget/tosca_keys.xtarget --output=src/grpc_client/ --write-to-file=single --dest-file=KEYS.py ../xos/xos/core/models/core.xproto |