Added dat,json file for tls mode and modified SConscript in cloud sample
authorJung Seungho <shonest.jung@samsung.com>
Thu, 2 Feb 2017 05:11:57 +0000 (14:11 +0900)
committerJee Hyeok Kim <jihyeok13.kim@samsung.com>
Thu, 2 Feb 2017 10:39:25 +0000 (10:39 +0000)
Change-Id: I836e665c86da12c1469c7da2cc32290584737bfc
Signed-off-by: Jung Seungho <shonest.jung@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/17009
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
16 files changed:
cloud/messagequeue/src/main/java/org/iotivity/cloud/mqserver/MessageQueueServer.java
cloud/samples/client/SConscript
cloud/samples/client/aircon_controlee.dat [new file with mode: 0644]
cloud/samples/client/aircon_controlee.json [new file with mode: 0644]
cloud/samples/client/aircon_controller.dat [new file with mode: 0644]
cloud/samples/client/aircon_controller.json [new file with mode: 0644]
cloud/samples/client/group_invite.dat [new file with mode: 0644]
cloud/samples/client/group_invite.json [new file with mode: 0644]
cloud/samples/client/group_light_share.dat [new file with mode: 0644]
cloud/samples/client/group_light_share.json [new file with mode: 0644]
cloud/samples/client/mq_publisher.dat [new file with mode: 0644]
cloud/samples/client/mq_publisher.json [new file with mode: 0644]
cloud/samples/client/mq_subscriber.dat [new file with mode: 0644]
cloud/samples/client/mq_subscriber.json [new file with mode: 0644]
cloud/samples/client/thin_room_light.dat [new file with mode: 0644]
cloud/samples/client/thin_room_light.json [new file with mode: 0644]

index a08cac3..787d2a6 100644 (file)
@@ -36,7 +36,7 @@ public class MessageQueueServer {
 
         System.out.println("-----MQ SERVER-----");
 
-        if (!(args.length != 6 || args.length == 8)) {
+        if (!(args.length == 6 || args.length == 8)) {
             Log.e("coap server port, Kafka_zookeeper_Address port"
                     + " and Kafka_broker_Address Port and TLS mode required\n"
                     + " and WebSocketLog-Server <Address> <Port> (optional)\n"
index 555cbfa..8493650 100644 (file)
@@ -67,8 +67,16 @@ cc_cloud_src_dir = src_dir + '/cloud/samples/client/'
 
 tlsOption = env.get('SECURED')
 if tlsOption is '1':
-       cc_sample_app_env.Install('.', cc_cloud_src_dir + 'rootca.crt')
        cc_sample_app_env.PrependUnique(LIBS = ['ocpmapi'])
+       Command("rootca.crt", cc_cloud_src_dir + "rootca.crt", Copy("$TARGET", "$SOURCE"))
+       Command("aircon_controlee.dat", cc_cloud_src_dir + "aircon_controlee.dat", Copy("$TARGET", "$SOURCE"))
+       Command("aircon_controller.dat", cc_cloud_src_dir + "aircon_controller.dat", Copy("$TARGET", "$SOURCE"))
+       Command("group_invite.dat", cc_cloud_src_dir + "group_invite.dat", Copy("$TARGET", "$SOURCE"))
+       Command("group_light_share.dat", cc_cloud_src_dir + "group_light_share.dat", Copy("$TARGET", "$SOURCE"))
+       Command("mq_publisher.dat", cc_cloud_src_dir + "mq_publisher.dat", Copy("$TARGET", "$SOURCE"))
+       Command("mq_subscriber.dat", cc_cloud_src_dir + "mq_subscriber.dat", Copy("$TARGET", "$SOURCE"))
+       Command("thin_room_light.dat", cc_cloud_src_dir + "thin_room_light.dat", Copy("$TARGET", "$SOURCE"))
+
 
 ######################################################################
 # Sample for the thin cloud device
diff --git a/cloud/samples/client/aircon_controlee.dat b/cloud/samples/client/aircon_controlee.dat
new file mode 100644 (file)
index 0000000..755174f
Binary files /dev/null and b/cloud/samples/client/aircon_controlee.dat differ
diff --git a/cloud/samples/client/aircon_controlee.json b/cloud/samples/client/aircon_controlee.json
new file mode 100644 (file)
index 0000000..21d504b
--- /dev/null
@@ -0,0 +1,79 @@
+{
+    "acl": {
+        "aclist": {
+            "aces": [
+                {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "/oic/res",
+                            "rel": "",
+                            "rt": ["oic.wk.res"],
+                            "if": ["oic.if.ll"]
+                        },{
+                            "href": "/oic/d",
+                            "rel": "",
+                            "rt": ["oic.wk.d"],
+                            "if": ["oic.if.baseline", "oic.if.r"]
+                        },{
+                            "href": "/oic/p",
+                            "rel": "",
+                            "rt": ["oic.wk.p"],
+                            "if": ["oic.if.baseline", "oic.if.r"]
+                        }
+                    ],
+                    "permission": 2
+                },
+                {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "/oic/sec/doxm",
+                            "rel": "",
+                            "rt": ["oic.r.doxm"],
+                            "if": ["oic.if.baseline"]
+                        },
+                        {
+                            "href": "/oic/sec/pstat",
+                            "rel": "",
+                            "rt": ["oic.r.pstat"],
+                            "if": ["oic.if.baseline"]
+                        }
+                    ],
+                    "permission": 2
+                }, 
+               {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "*",
+                            "rel": "",
+                            "rt": ["*"],
+                            "if": ["*"]
+                        }
+                    ],
+                    "permission": 31
+                }
+            ]
+        },
+        "rowneruuid" : "61646D69-6E44-6576-6963-234231423444"
+    },
+    "pstat": {
+        "isop": true,
+        "cm": 0,
+        "tm": 0,
+        "om": 4,
+        "sm": 4,
+        "deviceuuid": "61646D69-6E44-6576-6963-234231423444",
+        "rowneruuid": "61646D69-6E44-6576-6963-234231423444"
+    },
+    "doxm": {
+        "oxms": [0],
+        "oxmsel": 0,
+        "sct": 1,
+        "owned": true,
+        "deviceuuid": "61646D69-6E44-6576-6963-234231423444",
+        "devowneruuid": "61646D69-6E44-6576-6963-234231423444",
+        "rowneruuid": "61646D69-6E44-6576-6963-234231423444"
+    }
+}
diff --git a/cloud/samples/client/aircon_controller.dat b/cloud/samples/client/aircon_controller.dat
new file mode 100644 (file)
index 0000000..6e78547
Binary files /dev/null and b/cloud/samples/client/aircon_controller.dat differ
diff --git a/cloud/samples/client/aircon_controller.json b/cloud/samples/client/aircon_controller.json
new file mode 100644 (file)
index 0000000..5ffc26d
--- /dev/null
@@ -0,0 +1,79 @@
+{
+    "acl": {
+        "aclist": {
+            "aces": [
+                {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "/oic/res",
+                            "rel": "",
+                            "rt": ["oic.wk.res"],
+                            "if": ["oic.if.ll"]
+                        },{
+                            "href": "/oic/d",
+                            "rel": "",
+                            "rt": ["oic.wk.d"],
+                            "if": ["oic.if.baseline", "oic.if.r"]
+                        },{
+                            "href": "/oic/p",
+                            "rel": "",
+                            "rt": ["oic.wk.p"],
+                            "if": ["oic.if.baseline", "oic.if.r"]
+                        }
+                    ],
+                    "permission": 2
+                },
+                {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "/oic/sec/doxm",
+                            "rel": "",
+                            "rt": ["oic.r.doxm"],
+                            "if": ["oic.if.baseline"]
+                        },
+                        {
+                            "href": "/oic/sec/pstat",
+                            "rel": "",
+                            "rt": ["oic.r.pstat"],
+                            "if": ["oic.if.baseline"]
+                        }
+                    ],
+                    "permission": 2
+                },
+               {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "*",
+                            "rel": "",
+                            "rt": ["*"],
+                            "if": ["*"]
+                        }
+                    ],
+                    "permission": 31
+                }
+            ]
+        },
+        "rowneruuid" : "61646D69-6E44-6576-6963-655575696430"
+    },
+    "pstat": {
+        "isop": true,
+        "cm": 0,
+        "tm": 0,
+        "om": 4,
+        "sm": 4,
+        "deviceuuid": "61646D69-6E44-6576-6963-655575696430",
+        "rowneruuid": "61646D69-6E44-6576-6963-655575696430"
+    },
+    "doxm": {
+        "oxms": [0],
+        "oxmsel": 0,
+        "sct": 1,
+        "owned": true,
+        "deviceuuid": "61646D69-6E44-6576-6963-655575696430",
+        "devowneruuid": "61646D69-6E44-6576-6963-655575696430",
+        "rowneruuid": "61646D69-6E44-6576-6963-655575696430"
+    }
+}
diff --git a/cloud/samples/client/group_invite.dat b/cloud/samples/client/group_invite.dat
new file mode 100644 (file)
index 0000000..b607659
Binary files /dev/null and b/cloud/samples/client/group_invite.dat differ
diff --git a/cloud/samples/client/group_invite.json b/cloud/samples/client/group_invite.json
new file mode 100644 (file)
index 0000000..254e4df
--- /dev/null
@@ -0,0 +1,79 @@
+{
+    "acl": {
+        "aclist": {
+            "aces": [
+                {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "/oic/res",
+                            "rel": "",
+                            "rt": ["oic.wk.res"],
+                            "if": ["oic.if.ll"]
+                        },{
+                            "href": "/oic/d",
+                            "rel": "",
+                            "rt": ["oic.wk.d"],
+                            "if": ["oic.if.baseline", "oic.if.r"]
+                        },{
+                            "href": "/oic/p",
+                            "rel": "",
+                            "rt": ["oic.wk.p"],
+                            "if": ["oic.if.baseline", "oic.if.r"]
+                        }
+                    ],
+                    "permission": 2
+                },
+                {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "/oic/sec/doxm",
+                            "rel": "",
+                            "rt": ["oic.r.doxm"],
+                            "if": ["oic.if.baseline"]
+                        },
+                        {
+                            "href": "/oic/sec/pstat",
+                            "rel": "",
+                            "rt": ["oic.r.pstat"],
+                            "if": ["oic.if.baseline"]
+                        }
+                    ],
+                    "permission": 2
+                },
+               {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "*",
+                            "rel": "",
+                            "rt": ["*"],
+                            "if": ["*"]
+                        }
+                    ],
+                    "permission": 31
+                }
+            ]
+        },
+        "rowneruuid" : "61646D69-6E44-6576-6963-H45Y64HGH453"
+    },
+    "pstat": {
+        "isop": true,
+        "cm": 0,
+        "tm": 0,
+        "om": 4,
+        "sm": 4,
+        "deviceuuid": "61646D69-6E44-6576-6963-H45Y64HGH453",
+        "rowneruuid": "61646D69-6E44-6576-6963-H45Y64HGH453"
+    },
+    "doxm": {
+        "oxms": [0],
+        "oxmsel": 0,
+        "sct": 1,
+        "owned": true,
+        "deviceuuid": "61646D69-6E44-6576-6963-H45Y64HGH453",
+        "devowneruuid": "61646D69-6E44-6576-6963-H45Y64HGH453",
+        "rowneruuid": "61646D69-6E44-6576-6963-H45Y64HGH453"
+    }
+}
diff --git a/cloud/samples/client/group_light_share.dat b/cloud/samples/client/group_light_share.dat
new file mode 100644 (file)
index 0000000..5fd9538
Binary files /dev/null and b/cloud/samples/client/group_light_share.dat differ
diff --git a/cloud/samples/client/group_light_share.json b/cloud/samples/client/group_light_share.json
new file mode 100644 (file)
index 0000000..d33e280
--- /dev/null
@@ -0,0 +1,79 @@
+{
+    "acl": {
+        "aclist": {
+            "aces": [
+                {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "/oic/res",
+                            "rel": "",
+                            "rt": ["oic.wk.res"],
+                            "if": ["oic.if.ll"]
+                        },{
+                            "href": "/oic/d",
+                            "rel": "",
+                            "rt": ["oic.wk.d"],
+                            "if": ["oic.if.baseline", "oic.if.r"]
+                        },{
+                            "href": "/oic/p",
+                            "rel": "",
+                            "rt": ["oic.wk.p"],
+                            "if": ["oic.if.baseline", "oic.if.r"]
+                        }
+                    ],
+                    "permission": 2
+                },
+                {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "/oic/sec/doxm",
+                            "rel": "",
+                            "rt": ["oic.r.doxm"],
+                            "if": ["oic.if.baseline"]
+                        },
+                        {
+                            "href": "/oic/sec/pstat",
+                            "rel": "",
+                            "rt": ["oic.r.pstat"],
+                            "if": ["oic.if.baseline"]
+                        }
+                    ],
+                    "permission": 2
+                },
+               {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "*",
+                            "rel": "",
+                            "rt": ["*"],
+                            "if": ["*"]
+                        }
+                    ],
+                    "permission": 31
+                }
+            ]
+        },
+        "rowneruuid" : "61646D69-6E44-6576-6963-MNJHB223B4MN"
+    },
+    "pstat": {
+        "isop": true,
+        "cm": 0,
+        "tm": 0,
+        "om": 4,
+        "sm": 4,
+        "deviceuuid": "61646D69-6E44-6576-6963-MNJHB223B4MN",
+        "rowneruuid": "61646D69-6E44-6576-6963-MNJHB223B4MN"
+    },
+    "doxm": {
+        "oxms": [0],
+        "oxmsel": 0,
+        "sct": 1,
+        "owned": true,
+        "deviceuuid": "61646D69-6E44-6576-6963-MNJHB223B4MN",
+        "devowneruuid": "61646D69-6E44-6576-6963-MNJHB223B4MN",
+        "rowneruuid": "61646D69-6E44-6576-6963-MNJHB223B4MN"
+    }
+}
diff --git a/cloud/samples/client/mq_publisher.dat b/cloud/samples/client/mq_publisher.dat
new file mode 100644 (file)
index 0000000..66133e9
Binary files /dev/null and b/cloud/samples/client/mq_publisher.dat differ
diff --git a/cloud/samples/client/mq_publisher.json b/cloud/samples/client/mq_publisher.json
new file mode 100644 (file)
index 0000000..10abff0
--- /dev/null
@@ -0,0 +1,79 @@
+{
+    "acl": {
+        "aclist": {
+            "aces": [
+                {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "/oic/res",
+                            "rel": "",
+                            "rt": ["oic.wk.res"],
+                            "if": ["oic.if.ll"]
+                        },{
+                            "href": "/oic/d",
+                            "rel": "",
+                            "rt": ["oic.wk.d"],
+                            "if": ["oic.if.baseline", "oic.if.r"]
+                        },{
+                            "href": "/oic/p",
+                            "rel": "",
+                            "rt": ["oic.wk.p"],
+                            "if": ["oic.if.baseline", "oic.if.r"]
+                        }
+                    ],
+                    "permission": 2
+                },
+                {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "/oic/sec/doxm",
+                            "rel": "",
+                            "rt": ["oic.r.doxm"],
+                            "if": ["oic.if.baseline"]
+                        },
+                        {
+                            "href": "/oic/sec/pstat",
+                            "rel": "",
+                            "rt": ["oic.r.pstat"],
+                            "if": ["oic.if.baseline"]
+                        }
+                    ],
+                    "permission": 2
+                },
+               {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "*",
+                            "rel": "",
+                            "rt": ["*"],
+                            "if": ["*"]
+                        }
+                    ],
+                    "permission": 31
+                }
+            ]
+        },
+        "rowneruuid" : "61646D69-6E44-6576-6963-T2C3F4UKV3G4"
+    },
+    "pstat": {
+        "isop": true,
+        "cm": 0,
+        "tm": 0,
+        "om": 4,
+        "sm": 4,
+        "deviceuuid": "61646D69-6E44-6576-6963-T2C3F4UKV3G4",
+        "rowneruuid": "61646D69-6E44-6576-6963-T2C3F4UKV3G4"
+    },
+    "doxm": {
+        "oxms": [0],
+        "oxmsel": 0,
+        "sct": 1,
+        "owned": true,
+        "deviceuuid": "61646D69-6E44-6576-6963-T2C3F4UKV3G4",
+        "devowneruuid": "61646D69-6E44-6576-6963-T2C3F4UKV3G4",
+        "rowneruuid": "61646D69-6E44-6576-6963-T2C3F4UKV3G4"
+    }
+}
diff --git a/cloud/samples/client/mq_subscriber.dat b/cloud/samples/client/mq_subscriber.dat
new file mode 100644 (file)
index 0000000..f37de83
Binary files /dev/null and b/cloud/samples/client/mq_subscriber.dat differ
diff --git a/cloud/samples/client/mq_subscriber.json b/cloud/samples/client/mq_subscriber.json
new file mode 100644 (file)
index 0000000..ec86d2d
--- /dev/null
@@ -0,0 +1,79 @@
+{
+    "acl": {
+        "aclist": {
+            "aces": [
+                {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "/oic/res",
+                            "rel": "",
+                            "rt": ["oic.wk.res"],
+                            "if": ["oic.if.ll"]
+                        },{
+                            "href": "/oic/d",
+                            "rel": "",
+                            "rt": ["oic.wk.d"],
+                            "if": ["oic.if.baseline", "oic.if.r"]
+                        },{
+                            "href": "/oic/p",
+                            "rel": "",
+                            "rt": ["oic.wk.p"],
+                            "if": ["oic.if.baseline", "oic.if.r"]
+                        }
+                    ],
+                    "permission": 2
+                },
+                {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "/oic/sec/doxm",
+                            "rel": "",
+                            "rt": ["oic.r.doxm"],
+                            "if": ["oic.if.baseline"]
+                        },
+                        {
+                            "href": "/oic/sec/pstat",
+                            "rel": "",
+                            "rt": ["oic.r.pstat"],
+                            "if": ["oic.if.baseline"]
+                        }
+                    ],
+                    "permission": 2
+                },
+               {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "*",
+                            "rel": "",
+                            "rt": ["*"],
+                            "if": ["*"]
+                        }
+                    ],
+                    "permission": 31
+                }
+            ]
+        },
+        "rowneruuid" : "61646D69-6E44-6576-6963-67234KFBSEJ2"
+    },
+    "pstat": {
+        "isop": true,
+        "cm": 0,
+        "tm": 0,
+        "om": 4,
+        "sm": 4,
+        "deviceuuid": "61646D69-6E44-6576-6963-67234KFBSEJ2",
+        "rowneruuid": "61646D69-6E44-6576-6963-67234KFBSEJ2"
+    },
+    "doxm": {
+        "oxms": [0],
+        "oxmsel": 0,
+        "sct": 1,
+        "owned": true,
+        "deviceuuid": "61646D69-6E44-6576-6963-67234KFBSEJ2",
+        "devowneruuid": "61646D69-6E44-6576-6963-67234KFBSEJ2",
+        "rowneruuid": "61646D69-6E44-6576-6963-67234KFBSEJ2"
+    }
+}
diff --git a/cloud/samples/client/thin_room_light.dat b/cloud/samples/client/thin_room_light.dat
new file mode 100644 (file)
index 0000000..c2e5187
Binary files /dev/null and b/cloud/samples/client/thin_room_light.dat differ
diff --git a/cloud/samples/client/thin_room_light.json b/cloud/samples/client/thin_room_light.json
new file mode 100644 (file)
index 0000000..261d8d9
--- /dev/null
@@ -0,0 +1,79 @@
+{
+    "acl": {
+        "aclist": {
+            "aces": [
+                {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "/oic/res",
+                            "rel": "",
+                            "rt": ["oic.wk.res"],
+                            "if": ["oic.if.ll"]
+                        },{
+                            "href": "/oic/d",
+                            "rel": "",
+                            "rt": ["oic.wk.d"],
+                            "if": ["oic.if.baseline", "oic.if.r"]
+                        },{
+                            "href": "/oic/p",
+                            "rel": "",
+                            "rt": ["oic.wk.p"],
+                            "if": ["oic.if.baseline", "oic.if.r"]
+                        }
+                    ],
+                    "permission": 2
+                },
+                {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "/oic/sec/doxm",
+                            "rel": "",
+                            "rt": ["oic.r.doxm"],
+                            "if": ["oic.if.baseline"]
+                        },
+                        {
+                            "href": "/oic/sec/pstat",
+                            "rel": "",
+                            "rt": ["oic.r.pstat"],
+                            "if": ["oic.if.baseline"]
+                        }
+                    ],
+                    "permission": 2
+                },
+               {
+                    "subjectuuid": "*",
+                    "resources": [
+                        {
+                            "href": "*",
+                            "rel": "",
+                            "rt": ["*"],
+                            "if": ["*"]
+                        }
+                    ],
+                    "permission": 31
+                }
+            ]
+        },
+        "rowneruuid" : "61646D69-6E44-6576-6963-0H8H980H980D"
+    },
+    "pstat": {
+        "isop": true,
+        "cm": 0,
+        "tm": 0,
+        "om": 4,
+        "sm": 4,
+        "deviceuuid": "61646D69-6E44-6576-6963-0H8H980H980D",
+        "rowneruuid": "61646D69-6E44-6576-6963-0H8H980H980D"
+    },
+    "doxm": {
+        "oxms": [0],
+        "oxmsel": 0,
+        "sct": 1,
+        "owned": true,
+        "deviceuuid": "61646D69-6E44-6576-6963-0H8H980H980D",
+        "devowneruuid": "61646D69-6E44-6576-6963-0H8H980H980D",
+        "rowneruuid": "61646D69-6E44-6576-6963-0H8H980H980D"
+    }
+}