blob: 2d6b1019689da4bd7ffeacdaa18624b98e953bfc [file] [log] [blame]
Matteo Scandolo9ce18252017-06-22 10:48:25 -07001help:
2 @echo "tests: Run unit tests (if you're running local, you'll need to have virtual-env activated)"
Matteo Scandolodf2600b2017-07-05 17:01:29 -07003 @echo "tosca: Generate tosca definition from core.xproto"
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -07004 @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 Scandolo78ca3eb2017-07-13 16:58:22 -07007 @echo "test-create: Send a sample tosca recipe"
8 @echo "test-delete: Delete a sample tosca recipe"
Matteo Scandolo9ce18252017-06-22 10:48:25 -07009
Matteo Scandolodf2600b2017-07-05 17:01:29 -070010tests: tosca
Matteo Scandolo485b7132017-06-30 11:46:47 -070011 nosetests -s -v --with-id --with-coverage --cover-html --cover-erase --cover-xml --cover-package="grpc_client, tosca"
Matteo Scandolo9ce18252017-06-22 10:48:25 -070012
13build:
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -070014 docker build -t xosproject/xos-tosca --no-cache=true .
15
16start: build
17 docker run -p 9200:9200 --name xos-tosca -d xosproject/xos-tosca
Matteo Scandolo9ce18252017-06-22 10:48:25 -070018
19clean:
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -070020 docker rm -f xos-tosca || true
21 docker rmi -f xosproject/xos-tosca || true
Matteo Scandolo9ce18252017-06-22 10:48:25 -070022
Matteo Scandolo78ca3eb2017-07-13 16:58:22 -070023test-create:
Matteo Scandolo21dde412017-07-11 18:54:12 -070024 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 Scandolo485b7132017-06-30 11:46:47 -070025
Matteo Scandolo78ca3eb2017-07-13 16:58:22 -070026test-delete:
27 curl -H "xos-username: xosadmin@opencord.org" -H "xos-password: rk1UYDHZXbu6KVCMkhmV" -X POST --data-binary @test/tosca/test.yaml 127.0.0.1:9200/delete
28
Matteo Scandolodf2600b2017-07-05 17:01:29 -070029tosca:
Matteo Scandolo485b7132017-06-30 11:46:47 -070030 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