blob: d0f6c43835b554f0a9915f899dba8c3fd9925546 [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 Scandolo1bd10762017-10-18 09:53:14 +020014 docker build -t xosproject/xos-tosca .
15 docker tag xosproject/xos-tosca:latest xosproject/xos-tosca:candidate
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -070016
17start: build
18 docker run -p 9200:9200 --name xos-tosca -d xosproject/xos-tosca
Matteo Scandolo9ce18252017-06-22 10:48:25 -070019
20clean:
Matteo Scandolo5c0af1b2017-07-05 14:51:21 -070021 docker rm -f xos-tosca || true
22 docker rmi -f xosproject/xos-tosca || true
Matteo Scandolo9ce18252017-06-22 10:48:25 -070023
Matteo Scandolo78ca3eb2017-07-13 16:58:22 -070024test-create:
Matteo Scandolo2c1a0012017-09-12 17:08:04 -070025 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 -070026
Matteo Scandolo78ca3eb2017-07-13 16:58:22 -070027test-delete:
Matteo Scandolo2c1a0012017-09-12 17:08:04 -070028 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 -070029
Matteo Scandolodf2600b2017-07-05 17:01:29 -070030tosca:
Matteo Scandolo1bd10762017-10-18 09:53:14 +020031 xosgenx --target=src/tosca/xtarget/tosca.xtarget --output=src/tosca/custom_types --write-to-file=target ../xos/xos/core/models/core.xproto
32 xosgenx --target=src/tosca/xtarget/tosca_keys.xtarget --output=src/grpc_client/ --write-to-file=single --dest-file=KEYS.py ../xos/xos/core/models/core.xproto