ietf-ccamp-wg / ietf-ccamp-layer0-types-ext-RFC9093-bis

CCAMP WG repository for ietf-layer0-types-ext
3 stars 3 forks source link

PYANG compilation issue with type empty in an union #37

Closed italobusi closed 2 years ago

italobusi commented 2 years ago

When compiling layer0-type-ext in PR #36 , PYANG provides these errors:

ietf-layer0-types-ext.yang:977: error: the type "empty" (defined at ietf-layer0-types-ext.yang:979) cannot be part of a union

When compiling the optical-impairment-topology in PR https://github.com/ietf-ccamp-wg/draft-ietf-ccamp-optical-impairment-topology-yang/pull/104 , PYANG does not complain

According to section 9.12 of RFC7950, it seems valid to include a type empty in an union:

A member type can be of any built-in or derived type.

italobusi commented 2 years ago

The issue is caused by the fact that layer0-type-ext was not using YANG 1.1

Fixed with https://github.com/ietf-ccamp-wg/ietf-ccamp-layer0-types-ext/pull/36/commits/163f04b01914eafcb433f6e261b0302fd3aa2343