Title: Complex Types and Typed Instance Identifiers
1Complex Types and Typed Instance Identifiers
- IETF 76
- NETMOD WG
- bernd.linowski.ext_at_nsn.com
- mehmet.ersue_at_nsn.com
2Changes since IETF 75
- Complex types as YANG extensions
- Modified complex type syntax
- Renamed element(-list) to instance-(list)
- New extension keyword instance-type
- Update rules for complex types added
- Complex type feature added
- IANA considerations addressed
-gt Semantics of complex types unchanged!
3Complex Types and Typed Instance Identifiers
Specified in form of a YANG module
module complex-types //
prefix "ct" // extension
complex-type description "Defines a
complex-type." reference "chapter
2.2., complex-type extension statement"
argument type-identifier
yin-element true
extension extends description
"Defines the base type of a complex-type."
reference "chapter 2.5., extends extension
statement" argument
base-type-identifier
yin-element true
// . feature complex-types
description "This feature indicates that the
agent supports complex
types and instance identifiers."
Extension definitions
Feature indicating complex type support
4Further steps
- pyang plug-ins
- complex type validation (under construction)
- mapping to XSD and RelaxNG (planned)
- Anything to add to the draft?
- We welcome any comments
- Is anybody interested to co-author?
- How should we proceed?
- Proposed standard or Experimental?
5Thank You! Question?
6Support for High-Level abstractions
TMF SID
- Complex types
- Blueprint for instances
ctcomplex-type Equipment ctextends
PyhsicalContainer ctabstract true leaf
installStatus ctinstance-list equipment
type Equipment ctcomplex-type Card
ctextends Equipment
- Complex type instances
- single
- list
Complex types Extensions
7Recursive Structures in Model and Payload
Complex type nesting
ctcomplex-type EquipmentHolder ctextends
ManagedHardware ctabstract true ctinstance-l
ist equipment type Equipment
ctinstance-list holder type
EquipmentHolder
Recursive containment with unknown depth
8Recursive Structures in Model and Payload
ltholdergt ltobjectIdgtRack-A2lt/objectIdgt ltholder
gt ltobjectIdgtSubrack-1lt/objectIdgt ltequipmen
tgt ltobjectIdgtCard-1lt/objectIdgt lt/equipm
entgt ltholdergt ltobjectIdgtBackplane-Alt/objectId
gt ltequipmentgt ltobjectIdgtCard-1lt/object
Idgt lt/equipmentgt lt/holdergt lt/holdergt lt
/holdergt ltholdergt // more holders lt/holdergt
NETCONF payload reflects instance nesting
Simple filter to select sub-tree under a
particular tree node
ltfilter type"subtree"gt lttop xmlns"http//examp
le.com/hw"gt ltholdergt ltobjectIdgtRack-A2lt/obj
ectIdgt lt/holdergt lt/topgt lt/filtergt
9Base Type Substitution
ctcomplex-type PhysicalPort
ctabstract true key portNumber
leaf portNumber type int32
mandatory true ctcomplex-type Card
ctinstance-list port type
PhysicalPort ctcomplex-type
PluginModule ctinstance-list port type
PhysicalPort
Derived complex-type
ctcomplex-type ExtPhysicalPort
ctextends PhysicalPort
- Substitution of base type instance with derived
type instances - wherever the base type is used
- no need to know all places it is used
10Rich Type Definitions
- Definition of abstract types
- enforce common attributes
- must be extended to be instantiated
ctcomplex-type PhysicalPort ctabstract
true key portNumber leaf portNumber type
int32 mandatory true ctcomplex-type Card
ctinstance-list port type
PhysicalPort ctcomplex-type PluginModule
ctinstance-list port type
PhysicalPort
- Definition of types with a key
- no need to add key definitions at every place of
use
11Type Information In Payload
ltholdergt ltobjectIdgtR31s2lt/objectIdgt ltcttypegthw
Slotlt/cttypegt ltslotNumbergt1lt/slotNumbergt ltymit
ypegthwEquipmentHolderlt/ymitypegt ltequipmentgt lt
objectIdgtATM-45252lt/objectIdgt ltcttypegthwSTMCar
dlt/cttypegt ltlevelgt16lt/levelgt ltcttypegthwCard
lt/cttypegt ltusedSlotsgt1lt/usedSlotsgt ltinstalled
gttruelt/installedgt ltversiongtA2lt/versiongt ltredun
dancygt1lt/redundancygt ltserialNumbergtA-778911-blt/s
erialNumbergt ltcommonNamegtATM-ADM
2lt/commonNamegt lt/equipmentgt ltserialNumbergtT-K473
3890x45lt/serialNumbergt ltcommonNamegtCU-Slotlt/commo
nNamegt lt/holdergt
- Use of predefined set of properties controlled by
a type
- Type information in the payload
- Enables handling of unknown derived types
- Does not require explicit type codes
- Filtering types including derived types
12Instance Identifiers Restricted by Type
ctcomplex-type PhysicalPort
ctextends ManagedHardware leaf
portNumber type int32 mandatory true
ctcomplex-type PhysicalLink ctextends
ManagedHardware leaf-list connectedPort
type instance-identifier ctinstance-type
PhysicalPort min-elements 2
Constrains what type of entity may be identified
- Allows to refer to instances of
- referred type
- derived types added later