Support new SADIS configuration to support multi-tcont
Change-Id: I4cf0d7495832a5883e4f75ba60d88e6bb0f79f1e
diff --git a/sadisTypes.go b/sadisTypes.go
index e0cc5be..c2a2546 100644
--- a/sadisTypes.go
+++ b/sadisTypes.go
@@ -27,31 +27,23 @@
ONOS SADIS subscriber format
*/
type sadisSubscriber struct {
- ID string `json:"id"`
- CTag int16 `json:"cTag"`
- STag int16 `json:"sTag"`
- NasPortID string `json:"nasPortId"`
- CircuitID string `json:"circuitId"`
- RemoteID string `json:"remoteId"`
- UpstreamBandwidthProfile string `json:"upstreamBandwidthProfile"`
- DownstreamBandwidthProfile string `json:"downstreamBandwidthProfile"`
- TechnologyProfileID int `json:"technologyProfileId"`
+ ID string `json:"id"`
+ NasPortID string `json:"nasPortId"`
+ CircuitID string `json:"circuitId"`
+ RemoteID string `json:"remoteId"`
+ UniTagList []*sadisUnitaginfo `json:"uniTagList"`
}
/*
XOS RCORD subscriber format
*/
type subscriber struct {
- ID int `json:"id"`
- CTag int16 `json:"c_tag"`
- STag int16 `json:"s_tag"`
- OnuSerialNumber string `json:"onu_device"`
- NasPortID string `json:"nas_port_id"`
- CircuitID string `json:"circuit_id"`
- RemoteID string `json:"remote_id"`
- UpstreamBandwidthProfile int `json:"upstream_bps_id"`
- DownstreamBandwidthProfile int `json:"downstream_bps_id"`
- TechnologyProfileID int `json:"tech_profile_id"`
+ ID int `json:"id"`
+ OnuSerialNumber string `json:"onu_device"`
+ NasPortID string `json:"nas_port_id"`
+ CircuitID string `json:"circuit_id"`
+ RemoteID string `json:"remote_id"`
+ UniTagListId []int `json:"unitaglist_ids"`
}
type subscribers struct {
@@ -59,6 +51,57 @@
}
/*
+ ONOS SADIS UNI Tag information format
+*/
+type sadisUnitaginfo struct {
+ //FIXME: which fields can be omitted??
+ UniTagMatch int16 `json:"uniTagMatch"`
+ PonCTag int16 `json:"ponCTag"`
+ PonSTag int16 `json:"ponSTag"`
+ UsPonCTagPriority int `json:"usPonCTagPriority"`
+ UsPonSTagPriority int `json:"usPonSTagPriority"`
+ DsPonCTagPriority int `json:"dsPonCTagPriority"`
+ DsPonSTagPriority int `json:"dsPonSTagPriority"`
+ TechnologyProfileID int `json:"technologyProfileId"`
+ UpstreamBandwidthProfile string `json:"upstreamBandwidthProfile"`
+ DownstreamBandwidthProfile string `json:"downstreamBandwidthProfile"`
+ ServiceName string `json:"serviceName"`
+ EnableMacLearning bool `json:"enableMacLearning"`
+ ConfiguredMacAddress *string `json:"configuredMacAddress,omitempty"`
+ IsDhcpRequired bool `json:"isDhcpRequired"`
+ IsIgmpRequired bool `json:"isIgmpRequired"`
+}
+
+type sadisUnitaginfolist struct {
+ SadisUniTagList []*sadisUnitaginfo `json:"items"`
+}
+
+/*
+ XOS RCORD UNI Tag information format
+*/
+
+type unitaginfo struct {
+ //FIXME: which fields can be empty and must be NOT be propagated? (for example see configured_mac_address)
+ ID int `json:"id"`
+ UniTagMatch int16 `json:"uni_tag_match"`
+ PonCTag int16 `json:"pon_c_tag"`
+ PonSTag int16 `json:"pon_s_tag"`
+ UsPonCTagPriority int `json:"us_pon_ctag_priority"`
+ UsPonSTagPriority int `json:"us_pon_stag_priority"`
+ DsPonCTagPriority int `json:"ds_pon_ctag_priority"`
+ DsPonSTagPriority int `json:"ds_pon_stag_priority"`
+ TechnologyProfileID int `json:"tech_profile_id"`
+ UpstreamBandwidthProfile int `json:"upstream_bps_id"`
+ DownstreamBandwidthProfile int `json:"downstream_bps_id"`
+ ServiceName string `json:"service_name"`
+ EnableMacLearning bool `json:"enable_mac_learning"`
+ ConfiguredMacAddress *string `json:"configured_mac_address"`
+ IsDhcpRequired bool `json:"is_dhcp_required"`
+ IsIgmpRequired bool `json:"is_igmp_required"`
+ Subscriber int `json:"subscriber_id"`
+}
+
+/*
XOS BandwidthProfile format
*/
type bandwidthprofile struct {