From 51bd2658b0a67ad91566515296e4c1f69a99d7ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Remseth?= Date: Thu, 11 Oct 2018 11:35:15 +0200 Subject: [PATCH 1/4] Fix bugs --- sample-agent/{apply-yaml.sh => apply_yaml.sh} | 0 sample-agent/generate-test-scripts.sh | 12 ++++++------ 2 files changed, 6 insertions(+), 6 deletions(-) rename sample-agent/{apply-yaml.sh => apply_yaml.sh} (100%) diff --git a/sample-agent/apply-yaml.sh b/sample-agent/apply_yaml.sh similarity index 100% rename from sample-agent/apply-yaml.sh rename to sample-agent/apply_yaml.sh diff --git a/sample-agent/generate-test-scripts.sh b/sample-agent/generate-test-scripts.sh index 4b47c29cf..6273a1ed1 100755 --- a/sample-agent/generate-test-scripts.sh +++ b/sample-agent/generate-test-scripts.sh @@ -130,15 +130,15 @@ EOF echo "$0: INFO Successfully created demo scripts in directyory $TARGET_DIR" echo "$0: INFO To initialize run initialization scripts:" echo "$0: INFO" -echo "$0: INFO apply_yaml.sh offer $TARGET_DIR/init1.yml" -echo "$0: INFO apply_yaml.sh offer $TARGET_DIR/init2.yml" -echo "$0: INFO apply_yaml.sh offer $TARGET_DIR/init3.yml" +echo "$0: INFO ./apply_yaml.sh offer $TARGET_DIR/init1.yml" +echo "$0: INFO ./apply_yaml.sh offer $TARGET_DIR/init2.yml" +echo "$0: INFO ./apply_yaml.sh offer $TARGET_DIR/init3.yml" echo "$0: INFO" echo "$0: INFO During the test, run the test steps:" echo "$0: INFO" -echo "$0: INFO apply_yaml.sh segments $TARGET_DIR/step1.yml" -echo "$0: INFO apply_yaml.sh segments $TARGET_DIR/setep2.yml" +echo "$0: INFO ./apply_yaml.sh segments $TARGET_DIR/step1.yml" +echo "$0: INFO ./apply_yaml.sh segments $TARGET_DIR/step2.yml" echo "$0: INFO" echo "$0: INFO To reset to initial state (e.g. before running a demo/test again):" echo "$0: INFO" -echo "$0: INFO apply_yaml.sh segments $TARGET_DIR/reset.yml" +echo "$0: INFO ./apply_yaml.sh segments $TARGET_DIR/reset.yml" From 770b9285567a0dcfef83a33b07bd6115f75ecd12 Mon Sep 17 00:00:00 2001 From: Vihang Patil Date: Thu, 11 Oct 2018 13:16:41 +0200 Subject: [PATCH 2/4] Changes in presentation properties of products --- sample-agent/generate-test-scripts.sh | 3 +++ tools/neo4j-admin-tools/src/main/resources/init.cypher | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/sample-agent/generate-test-scripts.sh b/sample-agent/generate-test-scripts.sh index 6273a1ed1..108e13964 100755 --- a/sample-agent/generate-test-scripts.sh +++ b/sample-agent/generate-test-scripts.sh @@ -50,6 +50,7 @@ createOffer: isDefault: true offerLabel: Top Up priceLabel: 200 NOK + productLabel: +1GB createSegments: - id: $SEGMENT_1 EOF @@ -69,6 +70,7 @@ createOffer: isDefault: true offerLabel: Top Up priceLabel: 200 NOK + productLabel: +2GB createSegments: - id: $SEGMENT_2 EOF @@ -87,6 +89,7 @@ createOffer: isDefault: true offerLabel: Special offer priceLabel: 50 NOK + productLabel: +1GB createSegments: - id: $SEGMENT_3 EOF diff --git a/tools/neo4j-admin-tools/src/main/resources/init.cypher b/tools/neo4j-admin-tools/src/main/resources/init.cypher index 0dace3e4c..53bf0113e 100644 --- a/tools/neo4j-admin-tools/src/main/resources/init.cypher +++ b/tools/neo4j-admin-tools/src/main/resources/init.cypher @@ -78,7 +78,6 @@ CREATE (:Product {`id`: '1GB_1SGD', CREATE (:Product {`id`: '3GB_1.5SGD', `presentation/isDefault`: 'true', - `presentation/isOffer`: 'true', `presentation/offerLabel`: 'Default Offer', `presentation/priceLabel`: '1.5 SGD', `presentation/productLabel`: '+3GB', From 49f216e4a757cb2c617f746adb0f94747de709bb Mon Sep 17 00:00:00 2001 From: Vihang Patil Date: Thu, 11 Oct 2018 13:19:38 +0200 Subject: [PATCH 3/4] More fixes in presentation properties --- tools/neo4j-admin-tools/src/main/resources/init.cypher | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/neo4j-admin-tools/src/main/resources/init.cypher b/tools/neo4j-admin-tools/src/main/resources/init.cypher index 53bf0113e..545f186fe 100644 --- a/tools/neo4j-admin-tools/src/main/resources/init.cypher +++ b/tools/neo4j-admin-tools/src/main/resources/init.cypher @@ -77,7 +77,6 @@ CREATE (:Product {`id`: '1GB_1SGD', `sku`: '1GB_1SGD'}); CREATE (:Product {`id`: '3GB_1.5SGD', - `presentation/isDefault`: 'true', `presentation/offerLabel`: 'Default Offer', `presentation/priceLabel`: '1.5 SGD', `presentation/productLabel`: '+3GB', From 96700c4a164bbfa37f50f633e1234030d9dd4910 Mon Sep 17 00:00:00 2001 From: Vihang Patil Date: Thu, 11 Oct 2018 14:37:07 +0200 Subject: [PATCH 4/4] Added free product for internal users --- .../src/main/resources/init.cypher | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/neo4j-admin-tools/src/main/resources/init.cypher b/tools/neo4j-admin-tools/src/main/resources/init.cypher index 545f186fe..605f88fe0 100644 --- a/tools/neo4j-admin-tools/src/main/resources/init.cypher +++ b/tools/neo4j-admin-tools/src/main/resources/init.cypher @@ -1,6 +1,15 @@ // For country:NO -CREATE (:Product {`id`: '1GB_249NOK', +CREATE (:Product {`id`: '1GB_0NOK', `presentation/isDefault`: 'true', + `presentation/offerLabel`: '', + `presentation/priceLabel`: 'Free', + `presentation/productLabel`: '+1GB', + `price/amount`: '0', + `price/currency`: '', + `properties/noOfBytes`: '1_000_000_000', + `sku`: '1GB_0NOK'}); + +CREATE (:Product {`id`: '1GB_249NOK', `presentation/offerLabel`: 'Default Offer', `presentation/priceLabel`: '249 NOK', `presentation/productLabel`: '+1GB', @@ -40,6 +49,11 @@ CREATE (:Segment {`id`: 'country-no'}); CREATE (:Offer {`id`: 'default_offer-no'}); +MATCH (n:Offer {id: 'default_offer-no'}) +WITH n +MATCH (m:Product {id: '1GB_0NOK'}) +CREATE (n)-[:OFFER_HAS_PRODUCT]->(m); + MATCH (n:Offer {id: 'default_offer-no'}) WITH n MATCH (m:Product {id: '1GB_249NOK'})