blob: 41b3f2e374558ff5796f3d642c67c3d35986695e [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 Scandolo2c1a0012017-09-12 17:08:04 -070024 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 Scandolo485b7132017-06-30 11:46:47 -070025
Matteo Scandolo78ca3eb2017-07-13 16:58:22 -070026test-delete:
Matteo Scandolo2c1a0012017-09-12 17:08:04 -070027 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 Scandolo78ca3eb2017-07-13 16:58:22 -070028
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