File tree Expand file tree Collapse file tree 8 files changed +29
-4
lines changed
charts/network-operator/templates/crd
internal/provider/cisco/nxos Expand file tree Collapse file tree 8 files changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,12 @@ type VRFSpec struct {
2626 // +kubebuilder:validation:MaxLength=32
2727 Name string `json:"name"`
2828
29+ // Description provides a human-readable description of the VRF.
30+ // +optional
31+ // +kubebuilder:validation:MinLength=1
32+ // +kubebuilder:validation:MaxLength=255
33+ Description string `json:"description,omitempty"`
34+
2935 // VNI is the VXLAN Network Identifier for the VRF (always an L3).
3036 // +optional
3137 // +kubebuilder:validation:Minimum=1
Original file line number Diff line number Diff line change 6060 spec defines the desired state of VRF
6161 More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
6262 properties :
63+ description :
64+ description : Description provides a human-readable description of
65+ the VRF.
66+ maxLength : 255
67+ minLength : 1
68+ type : string
6369 deviceRef :
6470 description : |-
6571 DeviceName is the name of the Device this object belongs to. The Device object must exist in the same namespace.
Original file line number Diff line number Diff line change 5454 spec defines the desired state of VRF
5555 More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
5656 properties :
57+ description :
58+ description : Description provides a human-readable description of
59+ the VRF.
60+ maxLength : 255
61+ minLength : 1
62+ type : string
5763 deviceRef :
5864 description : |-
5965 DeviceName is the name of the Device this object belongs to. The Device object must exist in the same namespace.
Original file line number Diff line number Diff line change @@ -1567,6 +1567,9 @@ func (p *Provider) DeleteSyslog(ctx context.Context) error {
15671567func (p * Provider ) EnsureVRF (ctx context.Context , req * provider.VRFRequest ) error {
15681568 v := new (VRF )
15691569 v .Name = req .VRF .Spec .Name
1570+ if req .VRF .Spec .Description != "" {
1571+ v .Descr = NewOption (req .VRF .Spec .Description )
1572+ }
15701573
15711574 if req .VRF .Spec .VNI > 0 {
15721575 v .L3Vni = true
Original file line number Diff line number Diff line change 55 "encap" : " vxlan-101" ,
66 "l3vni" : true ,
77 "name" : " CC-CLOUD01" ,
8+ "descr" : " CC-CLOUD01 VRF" ,
89 "dom-items" : {
910 "Dom-list" : [
1011 {
Original file line number Diff line number Diff line change 11vrf context CC-CLOUD01
22 vni 101 l3
3+ description CC-CLOUD01 VRF
34 rd 4269539332:101
45 address-family ipv4 unicast
56 route-target import 65148:1101
Original file line number Diff line number Diff line change @@ -11,10 +11,11 @@ const DefaultVRFName = "default"
1111var _ gnmiext.Configurable = (* VRF )(nil )
1212
1313type VRF struct {
14- Encap string `json:"encap"`
15- L3Vni bool `json:"l3vni"`
16- Name string `json:"name"`
17- DomItems * VRFDomItems `json:"dom-items,omitempty"`
14+ Encap string `json:"encap"`
15+ L3Vni bool `json:"l3vni"`
16+ Name string `json:"name"`
17+ Descr Option [string ] `json:"descr"`
18+ DomItems * VRFDomItems `json:"dom-items,omitempty"`
1819}
1920
2021func (* VRF ) IsListItem () {}
Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ func init() {
4343 Name : "CC-CLOUD01" ,
4444 L3Vni : true ,
4545 Encap : "vxlan-101" ,
46+ Descr : NewOption ("CC-CLOUD01 VRF" ),
4647 DomItems : & VRFDomItems {DomList : []* VRFDom {dom }},
4748 }
4849
You can’t perform that action at this time.
0 commit comments