CORD-714
initial set of roles/playbooks
bug fixes
fix docker-compose logging, pull xos-base image
dynamically add docker instances to ansible inventory after onboarding
Bootstrap the onboarding synchronizer
more defaults, reload vars after adding docker inventory
move TOSCA templates to cord-profilea, random password on admin
fixes for docker compose, paths in xos.yaml in jinja
don't try to mangle XOS _config files (yet)
create xos-test image
make xos-test use locally build xosproject/xos
add docker-compose v2 format networking
fix docker-compose template
path fixes, move ssh keys
service names/paths aren't so simple
added api-tests, teardown roles
scan the onboarded docker-compose file for ansible inventory
add various tests used by test-standalone profile
fixes for API tests
save test output to /tmp/<testname>.out, bugfixes
autogenerate openstack keystone admin password, fix tests
remove nonfunctional UI tests
change location of cord_profile, use inventory to specify profile
fix YAML escaping of backslashes in regex
bugfixes after path change, add teardown playbook
backout setting of cord_dir with ansible_user_dir which differs depending on context
gradle build fixes, renaming
fix yml/yaml naming issue
null xos_images default
added rcord/mcord frontend variants, exampleservice onboarding
add missing role, help text in cord-bootstrap.sh
bugfix
create/run deployment.yaml by default
allow teardown to handle partially built pods, bugfix to deployment.yaml generation
add defaults, fix path for exampleservice
revert yaml naming to ease testing, rename mocks
debugging
exampleservice onboarding, mounting volume in XOS container
bugfix
add volume mounts when creating xos_ui, don't double add to ansible inventory
post-onboard TOSCA cnfig
typo fixes, order of loading TOSCA
config bits for cord-pod, some var renaming
update documentation, rename to rcord
doc fixes
support for building just before XOS install, docs
fix tests, refactor how compute nodes are configed, split vtn service config from adding a node
remove build process from deploy repo
inclusion/merge of PKI support
typo
bugfixes and change to use cord instead of opencord for install dir
fix pki support
fix ssh key paths
update xos ui/bs ports, fix onboarding on vagrant
have compute enlist script use same config file as other playbooks
fix ports, add MaaS version of compute node enable script
fix port and nodes.yaml loading
generate API SSL cert for all profiles
remove cord-app-build which is vestigial
remove config dir
default xos_ui_port in xos-ready role
use xostosca from service-profie/cord-pod-ansible to handle POST form-encode
fix nodes.yaml, variable name in xostosca, and include openstack properly
copy cert chain to build into XOS container
increase onboarding timeouts, don't restart docker
fix ONOS app versions and network settings
fix management_hosts network optional include
fix management/fabric settings
avoid modifying service#ONOS_CORD when adding nodes
split out compute node and vtn config, put delay between
fix template generation and fail on file not found
rename vars to profile_manifests, fix redis include
whitespace fix
increase timeout
reenable platform-check
parameterize node_key path, set defaults and fix platform-check
workaround for onboarding sync, minor fixes
pause in middle of VTN bug workaround
reload openstack config as well
disable platform-check role as a test
fixed head-diag role
reapply VTN config during compute node enable
Create exampleservice instance during test

Change-Id: I87e171bcfa429e65e1075a1ee4c97de1e90a7dd5
diff --git a/roles/test-subscriber-config/defaults/main.yml b/roles/test-subscriber-config/defaults/main.yml
new file mode 100644
index 0000000..3fbf456
--- /dev/null
+++ b/roles/test-subscriber-config/defaults/main.yml
@@ -0,0 +1,5 @@
+---
+# test-subscriber-config/defaults/main.yml
+
+cord_profile_dir: "{{ ansible_user_dir + '/cord_profile' }}"
+
diff --git a/roles/test-subscriber-config/tasks/main.yml b/roles/test-subscriber-config/tasks/main.yml
new file mode 100644
index 0000000..46c1642
--- /dev/null
+++ b/roles/test-subscriber-config/tasks/main.yml
@@ -0,0 +1,10 @@
+---
+# test-subscriber/tasks/main.yml
+
+- name: Create test-subscriber.yaml TOSCA config
+  template:
+    src: test-subscriber.yaml.j2
+    dest: "{{ cord_profile_dir }}/test-subscriber.yaml"
+    owner: "{{ ansible_user_id }}"
+    mode: 0644
+
diff --git a/roles/test-subscriber-config/templates/test-subscriber.yaml.j2 b/roles/test-subscriber-config/templates/test-subscriber.yaml.j2
new file mode 100644
index 0000000..59d9cfe
--- /dev/null
+++ b/roles/test-subscriber-config/templates/test-subscriber.yaml.j2
@@ -0,0 +1,121 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: Creates a CORD test subscriber, created by platform-install
+
+imports:
+   - custom_types/xos.yaml
+
+topology_template:
+  node_templates:
+
+# site, fully created in deployment.yaml
+    {{ site_name }}:
+      type: tosca.nodes.Site
+      properties:
+        no-delete: true
+        no-create: true
+        no-update: true
+
+# vsg slice, volt service, fully created in cord-services.yaml
+    {{ site_name }}_vsg:
+      type: tosca.nodes.Slice
+      properties:
+        no-delete: true
+        no-create: true
+        no-update: true
+
+    service#volt:
+      type: tosca.nodes.VOLTService
+      properties:
+        no-delete: true
+        no-create: true
+        no-update: true
+
+# Test subscriber
+
+    # Let's add a user who can be administrator of the household
+    johndoe@myhouse.com:
+      type: tosca.nodes.User
+      properties:
+        password: letmein
+        firstname: john
+        lastname: doe
+      requirements:
+        - site:
+            node: {{ site_name }}
+            relationship: tosca.relationships.MemberOfSite
+        - dependency:
+            node: {{ site_name }}_vsg
+            relationship: tosca.relationships.DependsOn
+
+    # A subscriber
+    My House:
+      type: tosca.nodes.CORDSubscriber
+      properties:
+        service_specific_id: 123
+        firewall_enable: false
+        cdn_enable: false
+        url_filter_enable: false
+        url_filter_level: R
+      requirements:
+        - house_admin:
+            node: johndoe@myhouse.com
+            relationship: tosca.relationships.AdminPrivilege
+
+    Mom's PC:
+      type: tosca.nodes.CORDUser
+      properties:
+        mac: 01:02:03:04:05:06
+        level: PG_13
+      requirements:
+        - household:
+            node: My House
+            relationship: tosca.relationships.SubscriberDevice
+
+    Dad's PC:
+      type: tosca.nodes.CORDUser
+      properties:
+        mac: 90:E2:BA:82:F9:75
+        level: PG_13
+      requirements:
+        - household:
+            node: My House
+            relationship: tosca.relationships.SubscriberDevice
+
+    Jack's Laptop:
+      type: tosca.nodes.CORDUser
+      properties:
+        mac: 68:5B:35:9D:91:D5
+        level: PG_13
+      requirements:
+        - household:
+            node: My House
+            relationship: tosca.relationships.SubscriberDevice
+
+    Jill's Laptop:
+      type: tosca.nodes.CORDUser
+      properties:
+        mac: 34:36:3B:C9:B6:A6
+        level: PG_13
+      requirements:
+        - household:
+            node: My House
+            relationship: tosca.relationships.SubscriberDevice
+
+    My Volt:
+      type: tosca.nodes.VOLTTenant
+      properties:
+        service_specific_id: 123
+        s_tag: 222
+        c_tag: 111
+      requirements:
+        - provider_service:
+            node: service#volt
+            relationship: tosca.relationships.MemberOfService
+        - subscriber:
+            node: My House
+            relationship: tosca.relationships.BelongsToSubscriber
+        - dependency:
+            node: {{ site_name }}_vsg
+            relationship: tosca.relationships.DependsOn
+