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 | 485b713 | 2017-06-30 11:46:47 -0700 | [diff] [blame] | 4 | @echo "test-call: Send a sample tosca recipe" |
Matteo Scandolo | 5c0af1b | 2017-07-05 14:51:21 -0700 | [diff] [blame] | 5 | @echo "build: Build the docker image for xos-tosca" |
| 6 | @echo "start: Run an xos-tosca container" |
| 7 | @echo "clean: Remove the xos-tosca container (if any), and the image (if any)" |
Matteo Scandolo | 9ce1825 | 2017-06-22 10:48:25 -0700 | [diff] [blame] | 8 | |
Matteo Scandolo | df2600b | 2017-07-05 17:01:29 -0700 | [diff] [blame] | 9 | tests: tosca |
Matteo Scandolo | 485b713 | 2017-06-30 11:46:47 -0700 | [diff] [blame] | 10 | 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] | 11 | |
| 12 | build: |
Matteo Scandolo | 5c0af1b | 2017-07-05 14:51:21 -0700 | [diff] [blame] | 13 | docker build -t xosproject/xos-tosca --no-cache=true . |
| 14 | |
| 15 | start: build |
| 16 | docker run -p 9200:9200 --name xos-tosca -d xosproject/xos-tosca |
Matteo Scandolo | 9ce1825 | 2017-06-22 10:48:25 -0700 | [diff] [blame] | 17 | |
| 18 | clean: |
Matteo Scandolo | 5c0af1b | 2017-07-05 14:51:21 -0700 | [diff] [blame] | 19 | docker rm -f xos-tosca || true |
| 20 | docker rmi -f xosproject/xos-tosca || true |
Matteo Scandolo | 9ce1825 | 2017-06-22 10:48:25 -0700 | [diff] [blame] | 21 | |
| 22 | test-call: |
Matteo Scandolo | 21dde41 | 2017-07-11 18:54:12 -0700 | [diff] [blame] | 23 | curl -H "xos-username: xosadmin@opencord.org" -H "xos-password: rk1UYDHZXbu6KVCMkhmV" -X POST --data-binary @test/tosca/test.yaml 127.0.0.1:9200/run |
Matteo Scandolo | 485b713 | 2017-06-30 11:46:47 -0700 | [diff] [blame] | 24 | |
Matteo Scandolo | df2600b | 2017-07-05 17:01:29 -0700 | [diff] [blame] | 25 | tosca: |
Matteo Scandolo | 485b713 | 2017-06-30 11:46:47 -0700 | [diff] [blame] | 26 | 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 |