blob: b91ee2812c9734519d2ff50d4e839592123eb519 [file] [log] [blame]
Matteo Scandolo9ce18252017-06-22 10:48:25 -07001help:
Zack Williamsf584f7c2018-08-30 15:34:15 -07002 @echo "tests: Run unit tests (need the xos dev 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
Zack Williamsf584f7c2018-08-30 15:34:15 -070011 nose2 --verbose --coverage-report xml --coverage-report term --junit-xml
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
Zack Williamsf584f7c2018-08-30 15:34:15 -070032 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