tosca_definitions_version: tosca_simple_yaml_1_0_0
node_types:
    policy.nodes.distance_to_location:
        derived_from: policy.nodes.Root
        properties:
            policyScope:
                type: list
                description: scope where the policy is applicable
                required: true
                matchable: true
                entry_schema:
                    type: string
            policyType:
                type: list
                description: type of a policy
                required: true
                matchable: true
                entry_schema:
                    type: string
                    consraints:
                    -   valid_values:
                        - distance_to_location
            identity:
                type: string
                required: true
            resources:
                type: list
                required: true
                entry_schema:
                    type: string
            applicableResources:
                type: list
                required: true
                entry_schema:
                    type: string
                    constraints:
                    -   valid_values:
                        - any
                        - all
            distanceProperties:
                type: policy.data.distanceProperties_properties
                required: false
data_types:
    policy.data.distanceProperties_properties:
        derived_from: tosca.nodes.Root
        properties:
            locationInfo:
                type: string
                required: true
            distance:
                type: policy.data.distance_properties
                required: false
    policy.data.distance_properties:
        derived_from: tosca.nodes.Root
        properties:
            value:
                type: string
                required: true
            operator:
                type: list
                required: true
                entry_schema:
                    type: string
                    constraints:
                    -   valid_values:
                        - <
                        - <=
                        - '>'
                        - '>='
                        - '='
            unit:
                type: list
                required: true
                entry_schema:
                    type: string
                    constraints:
                    -   valid_values:
                        - km
