Matteo Scandolo | 9ce1825 | 2017-06-22 10:48:25 -0700 | [diff] [blame] | 1 | help: |
| 2 | @echo "tests: Run unit tests (if you're running local, you'll need to have 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 |
Matteo Scandolo | 485b713 | 2017-06-30 11:46:47 -0700 | [diff] [blame] | 11 | nosetests -s -v --with-id --with-coverage --cover-html --cover-erase --cover-xml --cover-package="grpc_client, tosca" |
Matteo Scandolo | 9ce1825 | 2017-06-22 10:48:25 -0700 | [diff] [blame] | 12 | |
| 13 | build: |
Matteo Scandolo | 5c0af1b | 2017-07-05 14:51:21 -0700 | [diff] [blame] | 14 | docker build -t xosproject/xos-tosca --no-cache=true . |
| 15 | |
| 16 | start: build |
| 17 | docker run -p 9200:9200 --name xos-tosca -d xosproject/xos-tosca |
Matteo Scandolo | 9ce1825 | 2017-06-22 10:48:25 -0700 | [diff] [blame] | 18 | |
| 19 | clean: |
Matteo Scandolo | 5c0af1b | 2017-07-05 14:51:21 -0700 | [diff] [blame] | 20 | docker rm -f xos-tosca || true |
| 21 | docker rmi -f xosproject/xos-tosca || true |
Matteo Scandolo | 9ce1825 | 2017-06-22 10:48:25 -0700 | [diff] [blame] | 22 | |
Matteo Scandolo | 78ca3eb | 2017-07-13 16:58:22 -0700 | [diff] [blame] | 23 | test-create: |
Matteo Scandolo | 2c1a001 | 2017-09-12 17:08:04 -0700 | [diff] [blame] | 24 | 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] | 25 | |
Matteo Scandolo | 78ca3eb | 2017-07-13 16:58:22 -0700 | [diff] [blame] | 26 | test-delete: |
Matteo Scandolo | 2c1a001 | 2017-09-12 17:08:04 -0700 | [diff] [blame] | 27 | 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] | 28 | |
Matteo Scandolo | df2600b | 2017-07-05 17:01:29 -0700 | [diff] [blame] | 29 | tosca: |
Matteo Scandolo | 485b713 | 2017-06-30 11:46:47 -0700 | [diff] [blame] | 30 | xosgenx --target=src/tosca/xtarget/tosca.xtarget --output=src/tosca/custom_types --write-to-file=model --dest-extension=yaml ../xos/xos/core/models/core.xproto |