Merge "CORD-2866 Add some configuration and TOSCA examples"
diff --git a/examples/adminuser-values.yaml b/examples/adminuser-values.yaml
new file mode 100644
index 0000000..2d9f826
--- /dev/null
+++ b/examples/adminuser-values.yaml
@@ -0,0 +1,61 @@
+---
+
+# Copyright 2018-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Override XOS admin user and password values set in values.yaml
+#
+# helm install -f examples/adminuser-values.yaml xos-core -n xos-core
+# helm install -f examples/adminuser-values.yaml xos-profiles/rcord-lite -n rcord-lite
+
+xosAdminUser: &adminuser "cordadmin@foobar.com"
+xosAdminPassword: &adminpass "AVerySecurePassword"
+
+# initial_data_config is a list.
+# I don’t know how to override individual list items...
+configs:
+  initial_data_config:
+    - model: core.Site
+      fields:
+        name: "my_site"
+        abbreviated_name: "my_site"
+        login_base: "my_site"
+        site_url: "http://opencord.org/"
+        hosts_nodes: true
+    - model: core.User
+      fields:
+        email: *adminuser
+        password: *adminpass
+        firstname: "XOS"
+        lastname: "User"
+        is_admin: True
+      relations:
+        site:
+          fields:
+            name: "my_site"
+          model: core.Site
+
+serviceOverride: &serviceOverride
+  serviceConfig:
+    accessor:
+      username: *adminuser
+      password: *adminpass
+
+
+# Update the username / password for all the services
+addressmanager: *serviceOverride
+fabric:         *serviceOverride
+onos-service:   *serviceOverride
+volt:           *serviceOverride
+vsg-hw:         *serviceOverride
diff --git a/examples/fabric-values.yaml b/examples/fabric-values.yaml
new file mode 100644
index 0000000..2866f05
--- /dev/null
+++ b/examples/fabric-values.yaml
@@ -0,0 +1,43 @@
+---
+
+# Copyright 2018-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Override null fabric configuration set in rcord-lite's values.yaml
+#
+# helm install -f examples/fabric-values.yaml xos-profiles/rcord-lite -n rcord-lite
+
+fabricNetworkConfigJson: &netcfg |
+  {
+    "devices": {
+    },
+    "ports": {
+    },
+    "apps" : {
+      "org.onosproject.segmentrouting" : {
+        "segmentrouting" : {
+          "vRouterMacs" : [ "a4:23:05:06:01:01" ]
+        }
+      }
+    }
+  }
+
+toscaRecipes:
+  fabricService:
+    topology_template:
+      node_templates:
+        serviceattribute#fabric_network_cfg_json:
+          properties:
+            name: rest_onos/v1/network/configuration/
+            value: *netcfg
diff --git a/examples/sample-rcord-subscriber-tosca.yaml b/examples/sample-rcord-subscriber-tosca.yaml
new file mode 100644
index 0000000..4c589f9
--- /dev/null
+++ b/examples/sample-rcord-subscriber-tosca.yaml
@@ -0,0 +1,79 @@
+---
+
+# Copyright 2018-present Open Networking Foundation
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# TOSCA recipe for adding a sample R-CORD subscriber
+#
+# http POST $(minikube service xos-tosca --url)/run \
+#  xos-username:admin@opencord.org xos-password:letmein \
+#  @./sample-rcord-subscriber-tosca.yaml
+
+
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Creates a CORD test subscriber, created by platform-install
+
+imports:
+  - custom_types/cordsubscriberroot.yaml
+  - custom_types/voltservice.yaml
+  - custom_types/voltdevice.yaml
+  - custom_types/voltdeviceport.yaml
+  - custom_types/serviceinstancelink.yaml
+
+topology_template:
+  node_templates:
+
+    service#volt:
+      type: tosca.nodes.VOLTService
+      properties:
+        name: volt
+        must-exist: true
+
+    # Setup an OLT Device
+    volt_device:
+      type: tosca.nodes.VOLTDevice
+      properties:
+        name: test-volt-device
+        device_id: volt-1
+        host: 8.8.8.8
+        port: 2194
+      requirements:
+        - volt_service:
+            node: service#volt
+            relationship: tosca.relationships.BelongsToOne
+
+    volt_port:
+      type: tosca.nodes.VOLTDevicePort
+      properties:
+        port_id: volt-port-1
+        s_tag: 222
+      requirements:
+        - volt_device:
+            node: volt_device
+            relationship: tosca.relationships.BelongsToOne
+
+    # A subscriber
+    my_house:
+      type: tosca.nodes.CordSubscriberRoot
+      properties:
+        name: My House
+        service_specific_id: "123"
+        firewall_enable: false
+        cdn_enable: false
+        url_filter_enable: false
+        url_filter_level: R
+        c_tag: 111
+        olt_device: volt-1
+        olt_port: volt-port-1
\ No newline at end of file