blob: 36fc7499908419d8ae8b55f7a49eec9503689ebc [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 Scandolo485b7132017-06-30 11:46:47 -07004 @echo "test-call: Send a sample tosca recipe"
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -07005 @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 Scandolo9ce18252017-06-22 10:48:25 -07008
Matteo Scandolodf2600b2017-07-05 17:01:29 -07009tests: tosca
Matteo Scandolo485b7132017-06-30 11:46:47 -070010 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 -070011
12build:
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -070013 docker build -t xosproject/xos-tosca --no-cache=true .
14
15start: build
16 docker run -p 9200:9200 --name xos-tosca -d xosproject/xos-tosca
Matteo Scandolo9ce18252017-06-22 10:48:25 -070017
18clean:
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -070019 docker rm -f xos-tosca || true
20 docker rmi -f xosproject/xos-tosca || true
Matteo Scandolo9ce18252017-06-22 10:48:25 -070021
22test-call:
Matteo Scandolo21dde412017-07-11 18:54:12 -070023 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 -070024
Matteo Scandolodf2600b2017-07-05 17:01:29 -070025tosca:
Matteo Scandolo485b7132017-06-30 11:46:47 -070026 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