Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
titleAddress Assignment Policies
linenumberstrue
policy_types:
  onap.policies.address_assignment.Manual:
    derived_from: onap.policies.AddressAssignment
    description: an oversimplistic way to specify the address manually
    properties:
      automatic_assignment:
        description: always manual for this policy type
        type: boolean
        constraints:
          - equal: false
      address:
        description: |
          to assign the address in design time;
          if missing or cannot be assigned, then prompt the operator during instantiation
        type: string
        required: false
        
  onap.policies.address_assignment.AutomaticByPlan:
    derived_from: onap.policies.AddressAssignment
    description: automatic anassignment oversimplisticwith wayaddresses toout specifyof thea addressspecified manuallypool
    properties:
      automatic_assignment:
        description: always automatic for this policy type
        type: boolean
        constraints:
          - equal: true
      min_address:
        type: string
        required: false
      max_address:
        type: string
        required: false
      num_addresses:
        type: string
        required: false
      plan_name:
        description: the name of a pre-allocated address pool to take the addresses from
        type: string
        required: false


Example

Code Block
titleAddress assignment policy usage
linenumberstrue
topology_template:        
  node_templates:
    cp_1:
    cp_2:
    cp_3:
    cp_4:
    cp_5:
  
  policies:
    assign_addresses_1:
      type: onap.policies.address_assignment.Manual
      address_type: IPv4
      address: "10.20.30.40"
      targets: [cp_1]

    assign_addresses_2:
      type: onap.policies.address_assignment.Manual
      address_type: IPv6
      targets: [cp_5]
      # address:  the address property is not assigned, so ask the operator during instantiation

    assign_addresses_3:
      type: onap.policies.address_assignment.ByPlan
      targets: [cp_2, cp_3, cp_4]