Newer
Older
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) NewSubSwitchControl(ConnectionUuid string, SwitchControlUuid string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.SubSwitchControl == nil {
t.SubSwitchControl = make(map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl)
key := TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl_Key{
ConnectionUuid: ConnectionUuid,
SwitchControlUuid: SwitchControlUuid,
}
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.SubSwitchControl[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list SubSwitchControl", key)
t.SubSwitchControl[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl{
ConnectionUuid: &ConnectionUuid,
SwitchControlUuid: &SwitchControlUuid,
// NewSwitch creates a new entry in the Switch list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) NewSwitch(LocalId string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Switch == nil {
t.Switch = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Switch[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Switch", key)
t.Switch[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch{
LocalId: &LocalId,
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) ΛListKeyMap() (map[string]interface{}, error) {
if t.Uuid == nil {
return nil, fmt.Errorf("nil value for key Uuid")
}
return map[string]interface{}{
"uuid": *t.Uuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name represents the /tapi-common/context/connectivity-context/connection/switch-control/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType represents the /tapi-common/context/connectivity-context/connection/switch-control/resilience-type YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType struct {
ProtectionType E_TapiTopology_ProtectionType `path:"protection-type" module:"tapi-connectivity"`
RestorationPolicy E_TapiTopology_RestorationPolicy `path:"restoration-policy" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType"], t, opts...); err != nil {
return err
}
return nil
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResilienceType) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint struct {
LocalId *string `path:"local-id" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name `path:"name" module:"tapi-connectivity"`
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
RoutingConstraint *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint `path:"routing-constraint" module:"tapi-connectivity"`
TopologyConstraint *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint `path:"topology-constraint" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
t.Name[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name{
ValueName: &ValueName,
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint) ΛListKeyMap() (map[string]interface{}, error) {
if t.LocalId == nil {
return nil, fmt.Errorf("nil value for key LocalId")
}
return map[string]interface{}{
"local-id": *t.LocalId,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint"], t, opts...); err != nil {
return err
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name"], t, opts...); err != nil {
return err
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint struct {
CostCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic `path:"cost-characteristic" module:"tapi-connectivity"`
DiversityPolicy E_TapiPathComputation_DiversityPolicy `path:"diversity-policy" module:"tapi-connectivity"`
IsExclusive *bool `path:"is-exclusive" module:"tapi-connectivity"`
LatencyCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic `path:"latency-characteristic" module:"tapi-connectivity"`
MaxAllowedCost *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost `path:"max-allowed-cost" module:"tapi-connectivity"`
MaxAllowedDelay *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay `path:"max-allowed-delay" module:"tapi-connectivity"`
MaxAllowedHops *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops `path:"max-allowed-hops" module:"tapi-connectivity"`
RiskDiversityCharacteristic map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic `path:"risk-diversity-characteristic" module:"tapi-connectivity"`
RouteObjectiveFunction E_TapiPathComputation_RouteObjectiveFunction `path:"route-objective-function" module:"tapi-connectivity"`
TolerableImpact E_TapiPathComputation_GradesOfImpact `path:"tolerable-impact" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) IsYANGGoStruct() {}
// NewCostCharacteristic creates a new entry in the CostCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) NewCostCharacteristic(CostName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.CostCharacteristic == nil {
t.CostCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.CostCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list CostCharacteristic", key)
t.CostCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic{
CostName: &CostName,
return t.CostCharacteristic[key], nil
// NewLatencyCharacteristic creates a new entry in the LatencyCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) NewLatencyCharacteristic(TrafficPropertyName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.LatencyCharacteristic == nil {
t.LatencyCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.LatencyCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list LatencyCharacteristic", key)
t.LatencyCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic{
TrafficPropertyName: &TrafficPropertyName,
return t.LatencyCharacteristic[key], nil
// NewRiskDiversityCharacteristic creates a new entry in the RiskDiversityCharacteristic list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) NewRiskDiversityCharacteristic(RiskCharacteristicName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.RiskDiversityCharacteristic == nil {
t.RiskDiversityCharacteristic = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic)
}
key := RiskCharacteristicName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.RiskDiversityCharacteristic[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list RiskDiversityCharacteristic", key)
t.RiskDiversityCharacteristic[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic{
return t.RiskDiversityCharacteristic[key], nil
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint"], t, opts...); err != nil {
return err
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/cost-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic struct {
CostAlgorithm *string `path:"cost-algorithm" module:"tapi-connectivity"`
CostName *string `path:"cost-name" module:"tapi-connectivity"`
CostValue *string `path:"cost-value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.CostName == nil {
return nil, fmt.Errorf("nil value for key CostName")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_CostCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/latency-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic struct {
FixedLatencyCharacteristic *string `path:"fixed-latency-characteristic" module:"tapi-connectivity"`
JitterCharacteristic *string `path:"jitter-characteristic" module:"tapi-connectivity"`
QueingLatencyCharacteristic *string `path:"queing-latency-characteristic" module:"tapi-connectivity"`
TrafficPropertyName *string `path:"traffic-property-name" module:"tapi-connectivity"`
WanderCharacteristic *string `path:"wander-characteristic" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.TrafficPropertyName == nil {
return nil, fmt.Errorf("nil value for key TrafficPropertyName")
}
return map[string]interface{}{
"traffic-property-name": *t.TrafficPropertyName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_LatencyCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/max-allowed-cost YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedCost) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/max-allowed-delay YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedDelay) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/max-allowed-hops YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops struct {
Priority *uint64 `path:"priority" module:"tapi-connectivity"`
Value *uint64 `path:"value" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops) IsYANGGoStruct() {}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_MaxAllowedHops) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/routing-constraint/risk-diversity-characteristic YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic struct {
RiskCharacteristicName *string `path:"risk-characteristic-name" module:"tapi-connectivity"`
RiskIdentifierList []string `path:"risk-identifier-list" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) ΛListKeyMap() (map[string]interface{}, error) {
if t.RiskCharacteristicName == nil {
return nil, fmt.Errorf("nil value for key RiskCharacteristicName")
"risk-characteristic-name": *t.RiskCharacteristicName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_RoutingConstraint_RiskDiversityCharacteristic) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/topology-constraint YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint struct {
AvoidTopology *string `path:"avoid-topology" module:"tapi-connectivity"`
ConstraintWeight *uint64 `path:"constraint-weight" module:"tapi-connectivity"`
ExcludeLink *string `path:"exclude-link" module:"tapi-connectivity"`
ExcludeNode *string `path:"exclude-node" module:"tapi-connectivity"`
ExcludeNodeEdgePoint *string `path:"exclude-node-edge-point" module:"tapi-connectivity"`
ExcludePath *string `path:"exclude-path" module:"tapi-connectivity"`
IncludeLink *string `path:"include-link" module:"tapi-connectivity"`
IncludeNode *string `path:"include-node" module:"tapi-connectivity"`
IncludeNodeEdgePoint *string `path:"include-node-edge-point" module:"tapi-connectivity"`
IncludePath *string `path:"include-path" module:"tapi-connectivity"`
IncludeTopology *string `path:"include-topology" module:"tapi-connectivity"`
LocalId *string `path:"local-id" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name `path:"name" module:"tapi-connectivity"`
PreferredTransportLayer E_TapiPathComputation_LayerProtocolName `path:"preferred-transport-layer" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint) IsYANGGoStruct() {}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name)
key := ValueName
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
t.Name[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name{
ValueName: &ValueName,
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name represents the /tapi-common/context/connectivity-context/connection/switch-control/resiliency-route-constraint/topology-constraint/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_ResiliencyRouteConstraint_TopologyConstraint_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl represents the /tapi-common/context/connectivity-context/connection/switch-control/sub-switch-control YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl struct {
ConnectionUuid *string `path:"connection-uuid" module:"tapi-connectivity"`
SwitchControlUuid *string `path:"switch-control-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectionUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectionUuid")
}
if t.SwitchControlUuid == nil {
return nil, fmt.Errorf("nil value for key SwitchControlUuid")
"connection-uuid": *t.ConnectionUuid,
"switch-control-uuid": *t.SwitchControlUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_SubSwitchControl) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch represents the /tapi-common/context/connectivity-context/connection/switch-control/switch YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct {
LocalId *string `path:"local-id" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name `path:"name" module:"tapi-connectivity"`
SelectedConnectionEndPoint map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint `path:"selected-connection-end-point" module:"tapi-connectivity"`
SelectedRoute map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute `path:"selected-route" module:"tapi-connectivity"`
SelectionReason E_TapiConnectivity_SelectionReason `path:"selection-reason" module:"tapi-connectivity"`
SwitchDirection E_TapiConnectivity_PortDirection `path:"switch-direction" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) IsYANGGoStruct() {}
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key represents the key for list SelectedConnectionEndPoint of element /tapi-common/context/connectivity-context/connection/switch-control/switch.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key struct {
TopologyUuid string `path:"topology-uuid"`
NodeUuid string `path:"node-uuid"`
NodeEdgePointUuid string `path:"node-edge-point-uuid"`
ConnectionEndPointUuid string `path:"connection-end-point-uuid"`
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key represents the key for list SelectedRoute of element /tapi-common/context/connectivity-context/connection/switch-control/switch.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key struct {
ConnectionUuid string `path:"connection-uuid"`
RouteLocalId string `path:"route-local-id"`
}
// NewName creates a new entry in the Name list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) NewName(ValueName string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Name == nil {
t.Name = make(map[string]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name)
}
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Name[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Name", key)
t.Name[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name{
ValueName: &ValueName,
}
return t.Name[key], nil
// NewSelectedConnectionEndPoint creates a new entry in the SelectedConnectionEndPoint list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) NewSelectedConnectionEndPoint(TopologyUuid string, NodeUuid string, NodeEdgePointUuid string, ConnectionEndPointUuid string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.SelectedConnectionEndPoint == nil {
t.SelectedConnectionEndPoint = make(map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint)
}
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
key := TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint_Key{
TopologyUuid: TopologyUuid,
NodeUuid: NodeUuid,
NodeEdgePointUuid: NodeEdgePointUuid,
ConnectionEndPointUuid: ConnectionEndPointUuid,
}
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.SelectedConnectionEndPoint[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list SelectedConnectionEndPoint", key)
}
t.SelectedConnectionEndPoint[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint{
TopologyUuid: &TopologyUuid,
NodeUuid: &NodeUuid,
NodeEdgePointUuid: &NodeEdgePointUuid,
ConnectionEndPointUuid: &ConnectionEndPointUuid,
}
return t.SelectedConnectionEndPoint[key], nil
// NewSelectedRoute creates a new entry in the SelectedRoute list of the
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct. The keys of the list are populated from the input
// arguments.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) NewSelectedRoute(ConnectionUuid string, RouteLocalId string) (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute, error){
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
// Initialise the list within the receiver struct if it has not already been
// created.
if t.SelectedRoute == nil {
t.SelectedRoute = make(map[TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key]*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute)
}
key := TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute_Key{
ConnectionUuid: ConnectionUuid,
RouteLocalId: RouteLocalId,
}
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.SelectedRoute[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list SelectedRoute", key)
}
t.SelectedRoute[key] = &TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute{
ConnectionUuid: &ConnectionUuid,
RouteLocalId: &RouteLocalId,
}
return t.SelectedRoute[key], nil
}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) ΛListKeyMap() (map[string]interface{}, error) {
if t.LocalId == nil {
return nil, fmt.Errorf("nil value for key LocalId")
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name represents the /tapi-common/context/connectivity-context/connection/switch-control/switch/name YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name struct {
Value *string `path:"value" module:"tapi-connectivity"`
ValueName *string `path:"value-name" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name) ΛListKeyMap() (map[string]interface{}, error) {
if t.ValueName == nil {
return nil, fmt.Errorf("nil value for key ValueName")
}
return map[string]interface{}{
"value-name": *t.ValueName,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_Name) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint represents the /tapi-common/context/connectivity-context/connection/switch-control/switch/selected-connection-end-point YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint struct {
ConnectionEndPointUuid *string `path:"connection-end-point-uuid" module:"tapi-connectivity"`
NodeEdgePointUuid *string `path:"node-edge-point-uuid" module:"tapi-connectivity"`
NodeUuid *string `path:"node-uuid" module:"tapi-connectivity"`
TopologyUuid *string `path:"topology-uuid" module:"tapi-connectivity"`
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectionEndPointUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectionEndPointUuid")
}
if t.NodeEdgePointUuid == nil {
return nil, fmt.Errorf("nil value for key NodeEdgePointUuid")
}
if t.NodeUuid == nil {
return nil, fmt.Errorf("nil value for key NodeUuid")
if t.TopologyUuid == nil {
return nil, fmt.Errorf("nil value for key TopologyUuid")
return map[string]interface{}{
"connection-end-point-uuid": *t.ConnectionEndPointUuid,
"node-edge-point-uuid": *t.NodeEdgePointUuid,
"node-uuid": *t.NodeUuid,
"topology-uuid": *t.TopologyUuid,
}, nil
}
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint"], t, opts...); err != nil {
return err
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedConnectionEndPoint) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute represents the /tapi-common/context/connectivity-context/connection/switch-control/switch/selected-route YANG schema element.
type TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute struct {
ConnectionUuid *string `path:"connection-uuid" module:"tapi-connectivity"`
RouteLocalId *string `path:"route-local-id" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute) IsYANGGoStruct() {}
// ΛListKeyMap returns the keys of the TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute struct, which is a YANG list entry.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute) ΛListKeyMap() (map[string]interface{}, error) {
if t.ConnectionUuid == nil {
return nil, fmt.Errorf("nil value for key ConnectionUuid")
if t.RouteLocalId == nil {
return nil, fmt.Errorf("nil value for key RouteLocalId")
}
return map[string]interface{}{
"connection-uuid": *t.ConnectionUuid,
"route-local-id": *t.RouteLocalId,
}, nil
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
// Validate validates s against the YANG schema corresponding to its type.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute) Validate(opts ...ygot.ValidationOption) error {
if err := ytypes.Validate(SchemaTree["TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute"], t, opts...); err != nil {
return err
}
return nil
}
// ΛEnumTypeMap returns a map, keyed by YANG schema path, of the enumerated types
// that are included in the generated code.
func (t *TapiCommon_Context_ConnectivityContext_Connection_SwitchControl_Switch_SelectedRoute) ΛEnumTypeMap() map[string][]reflect.Type { return ΛEnumTypes }
// TapiCommon_Context_ConnectivityContext_ConnectivityService represents the /tapi-common/context/connectivity-context/connectivity-service YANG schema element.
type TapiCommon_Context_ConnectivityContext_ConnectivityService struct {
AdministrativeState E_TapiCommon_AdministrativeState `path:"administrative-state" module:"tapi-connectivity"`
Connection map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection `path:"connection" module:"tapi-connectivity"`
ConnectivityConstraint *TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityConstraint `path:"connectivity-constraint" module:"tapi-connectivity"`
ConnectivityService map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService `path:"connectivity-service" module:"tapi-connectivity"`
Direction E_TapiConnectivity_ForwardingDirection `path:"direction" module:"tapi-connectivity"`
EndPoint map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_EndPoint `path:"end-point" module:"tapi-connectivity"`
LifecycleState E_TapiCommon_LifecycleState `path:"lifecycle-state" module:"tapi-connectivity"`
Name map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_Name `path:"name" module:"tapi-connectivity"`
OperationalState E_TapiCommon_OperationalState `path:"operational-state" module:"tapi-connectivity"`
ResilienceConstraint *TapiCommon_Context_ConnectivityContext_ConnectivityService_ResilienceConstraint `path:"resilience-constraint" module:"tapi-connectivity"`
RoutingConstraint *TapiCommon_Context_ConnectivityContext_ConnectivityService_RoutingConstraint `path:"routing-constraint" module:"tapi-connectivity"`
TopologyConstraint map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_TopologyConstraint `path:"topology-constraint" module:"tapi-connectivity"`
Uuid *string `path:"uuid" module:"tapi-connectivity"`
}
// IsYANGGoStruct ensures that TapiCommon_Context_ConnectivityContext_ConnectivityService implements the yang.GoStruct
// interface. This allows functions that need to handle this struct to
// identify it as being generated by ygen.
func (*TapiCommon_Context_ConnectivityContext_ConnectivityService) IsYANGGoStruct() {}
// NewConnection creates a new entry in the Connection list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) NewConnection(ConnectionUuid string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection, error){
// Initialise the list within the receiver struct if it has not already been
// created.
if t.Connection == nil {
t.Connection = make(map[string]*TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection)
// Ensure that this key has not already been used in the
// list. Keyed YANG lists do not allow duplicate keys to
// be created.
if _, ok := t.Connection[key]; ok {
return nil, fmt.Errorf("duplicate key %v for list Connection", key)
t.Connection[key] = &TapiCommon_Context_ConnectivityContext_ConnectivityService_Connection{
ConnectionUuid: &ConnectionUuid,
// NewConnectivityService creates a new entry in the ConnectivityService list of the
// TapiCommon_Context_ConnectivityContext_ConnectivityService struct. The keys of the list are populated from the input
func (t *TapiCommon_Context_ConnectivityContext_ConnectivityService) NewConnectivityService(ConnectivityServiceUuid string) (*TapiCommon_Context_ConnectivityContext_ConnectivityService_ConnectivityService, error){
// Initialise the list within the receiver struct if it has not already been
// created.