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

