Merge remote-tracking branch 'github/master' into v1.0.3
Conflicts: platform/mellanox/mlnx-fw-upgrade.sh src/sonic-sairedis src/sonic-swss
This commit is contained in:
commit
e13789c5af
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
|||||||
# Build system related
|
# Build system related
|
||||||
.platform
|
.platform
|
||||||
|
.screen
|
||||||
|
|
||||||
# Build artifacts
|
# Build artifacts
|
||||||
fsroot/
|
fsroot/
|
||||||
|
19
Makefile
19
Makefile
@ -12,7 +12,9 @@ $(shell rm -f .screen)
|
|||||||
|
|
||||||
MAKEFLAGS += -B
|
MAKEFLAGS += -B
|
||||||
|
|
||||||
SLAVE_TAG = $(shell shasum sonic-slave/Dockerfile | awk '{print substr($$1,0,11);}')
|
SLAVE_BASE_TAG = $(shell shasum sonic-slave/Dockerfile | awk '{print substr($$1,0,11);}')
|
||||||
|
SLAVE_TAG = $(shell shasum sonic-slave/Dockerfile.user | awk '{print substr($$1,0,11);}')
|
||||||
|
SLAVE_BASE_IMAGE = sonic-slave-base
|
||||||
SLAVE_IMAGE = sonic-slave-$(USER)
|
SLAVE_IMAGE = sonic-slave-$(USER)
|
||||||
|
|
||||||
DOCKER_RUN := docker run --rm=true --privileged \
|
DOCKER_RUN := docker run --rm=true --privileged \
|
||||||
@ -20,12 +22,18 @@ DOCKER_RUN := docker run --rm=true --privileged \
|
|||||||
-w /sonic \
|
-w /sonic \
|
||||||
-i$(if $(TERM),t,)
|
-i$(if $(TERM),t,)
|
||||||
|
|
||||||
|
DOCKER_BASE_BUILD = docker build --no-cache \
|
||||||
|
-t $(SLAVE_BASE_IMAGE) \
|
||||||
|
sonic-slave && \
|
||||||
|
docker tag $(SLAVE_BASE_IMAGE):latest $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG)
|
||||||
|
|
||||||
DOCKER_BUILD = docker build --no-cache \
|
DOCKER_BUILD = docker build --no-cache \
|
||||||
--build-arg user=$(USER) \
|
--build-arg user=$(USER) \
|
||||||
--build-arg uid=$(shell id -u) \
|
--build-arg uid=$(shell id -u) \
|
||||||
--build-arg guid=$(shell id -g) \
|
--build-arg guid=$(shell id -g) \
|
||||||
--build-arg hostname=$(shell echo $$HOSTNAME) \
|
--build-arg hostname=$(shell echo $$HOSTNAME) \
|
||||||
-t $(SLAVE_IMAGE) \
|
-t $(SLAVE_IMAGE) \
|
||||||
|
-f sonic-slave/Dockerfile.user \
|
||||||
sonic-slave && \
|
sonic-slave && \
|
||||||
docker tag $(SLAVE_IMAGE):latest $(SLAVE_IMAGE):$(SLAVE_TAG)
|
docker tag $(SLAVE_IMAGE):latest $(SLAVE_IMAGE):$(SLAVE_TAG)
|
||||||
|
|
||||||
@ -34,6 +42,9 @@ DOCKER_BUILD = docker build --no-cache \
|
|||||||
.DEFAULT_GOAL := all
|
.DEFAULT_GOAL := all
|
||||||
|
|
||||||
%::
|
%::
|
||||||
|
@docker inspect --type image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) &> /dev/null || \
|
||||||
|
{ echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Building... ; \
|
||||||
|
$(DOCKER_BASE_BUILD) ; }
|
||||||
@docker inspect --type image $(SLAVE_IMAGE):$(SLAVE_TAG) &> /dev/null || \
|
@docker inspect --type image $(SLAVE_IMAGE):$(SLAVE_TAG) &> /dev/null || \
|
||||||
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
|
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
|
||||||
$(DOCKER_BUILD) ; }
|
$(DOCKER_BUILD) ; }
|
||||||
@ -49,9 +60,13 @@ DOCKER_BUILD = docker build --no-cache \
|
|||||||
$@
|
$@
|
||||||
|
|
||||||
sonic-slave-build :
|
sonic-slave-build :
|
||||||
@$(DOCKER_BUILD)
|
$(DOCKER_BASE_BUILD)
|
||||||
|
$(DOCKER_BUILD)
|
||||||
|
|
||||||
sonic-slave-bash :
|
sonic-slave-bash :
|
||||||
|
@docker inspect --type image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) &> /dev/null || \
|
||||||
|
{ echo Image $(SLAVE_BASE_IMAGE):$(SLAVE_BASE_TAG) not found. Building... ; \
|
||||||
|
$(DOCKER_BASE_BUILD) ; }
|
||||||
@docker inspect --type image $(SLAVE_IMAGE):$(SLAVE_TAG) &> /dev/null || \
|
@docker inspect --type image $(SLAVE_IMAGE):$(SLAVE_TAG) &> /dev/null || \
|
||||||
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
|
{ echo Image $(SLAVE_IMAGE):$(SLAVE_TAG) not found. Building... ; \
|
||||||
$(DOCKER_BUILD) ; }
|
$(DOCKER_BUILD) ; }
|
||||||
|
41
device/accton/x86_64-accton_as7712_32x-r0/led_proc_init.soc
Executable file
41
device/accton/x86_64-accton_as7712_32x-r0/led_proc_init.soc
Executable file
@ -0,0 +1,41 @@
|
|||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=31 REMAP_PORT_1=30 REMAP_PORT_2=29 REMAP_PORT_3=28
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=27 REMAP_PORT_5=26 REMAP_PORT_6=25 REMAP_PORT_7=24
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=23 REMAP_PORT_9=22 REMAP_PORT_10=21 REMAP_PORT_11=20
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=19 REMAP_PORT_13=18 REMAP_PORT_14=17 REMAP_PORT_15=16
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=63 REMAP_PORT_17=62 REMAP_PORT_18=61 REMAP_PORT_19=60
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=59 REMAP_PORT_21=58 REMAP_PORT_22=57 REMAP_PORT_23=56
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=55 REMAP_PORT_25=54 REMAP_PORT_26=53 REMAP_PORT_27=52
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=51 REMAP_PORT_29=50 REMAP_PORT_30=49 REMAP_PORT_31=48
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=47 REMAP_PORT_33=46 REMAP_PORT_34=45 REMAP_PORT_35=44
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=43 REMAP_PORT_37=42 REMAP_PORT_38=41 REMAP_PORT_39=40
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=39 REMAP_PORT_41=38 REMAP_PORT_42=37 REMAP_PORT_43=36
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=35 REMAP_PORT_45=34 REMAP_PORT_46=33 REMAP_PORT_47=32
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=15 REMAP_PORT_49=14 REMAP_PORT_50=13 REMAP_PORT_51=12
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=11 REMAP_PORT_53=10 REMAP_PORT_54=9 REMAP_PORT_55=8
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=7 REMAP_PORT_57=6 REMAP_PORT_58=5 REMAP_PORT_59=4
|
||||||
|
m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=3 REMAP_PORT_61=2 REMAP_PORT_62=1 REMAP_PORT_63=0
|
||||||
|
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=35 REMAP_PORT_1=34 REMAP_PORT_2=33 REMAP_PORT_3=32
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=39 REMAP_PORT_5=38 REMAP_PORT_6=37 REMAP_PORT_7=36
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=43 REMAP_PORT_9=42 REMAP_PORT_10=41 REMAP_PORT_11=40
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=47 REMAP_PORT_13=46 REMAP_PORT_14=45 REMAP_PORT_15=44
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=3 REMAP_PORT_17=2 REMAP_PORT_18=1 REMAP_PORT_19=0
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=7 REMAP_PORT_21=6 REMAP_PORT_22=5 REMAP_PORT_23=4
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=11 REMAP_PORT_25=10 REMAP_PORT_26=9 REMAP_PORT_27=8
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=15 REMAP_PORT_29=14 REMAP_PORT_30=13 REMAP_PORT_31=12
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=19 REMAP_PORT_33=18 REMAP_PORT_34=17 REMAP_PORT_35=16
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=23 REMAP_PORT_37=22 REMAP_PORT_38=21 REMAP_PORT_39=20
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=27 REMAP_PORT_41=26 REMAP_PORT_42=25 REMAP_PORT_43=24
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=31 REMAP_PORT_45=30 REMAP_PORT_46=29 REMAP_PORT_47=28
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=51 REMAP_PORT_49=50 REMAP_PORT_50=49 REMAP_PORT_51=48
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=55 REMAP_PORT_53=54 REMAP_PORT_54=53 REMAP_PORT_55=52
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=59 REMAP_PORT_57=58 REMAP_PORT_58=57 REMAP_PORT_59=56
|
||||||
|
m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=63 REMAP_PORT_61=62 REMAP_PORT_62=61 REMAP_PORT_63=60
|
||||||
|
|
||||||
|
led 0 prog 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 E0 02 FB 42 40 06 F9 D2 00 74 1E 02 F9 42 03 67 AC 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 84 67 98 57 80 18 71 EB 67 98 67 84 57 67 84 67 84 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||||
|
led 0 start
|
||||||
|
|
||||||
|
led 1 prog 02 FD 42 80 02 FF 42 00 02 FE 42 00 02 FA 42 E0 02 FB 42 40 06 F9 D2 00 74 1E 02 F9 42 03 67 AC 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 67 C3 67 52 86 FE 06 FB D6 FE 74 1E 86 FC 3E FA 06 FE 88 4A 03 71 4C 67 84 57 67 84 57 67 98 57 06 FE 88 80 4A 00 27 97 75 4F 90 4A 00 27 4A 01 27 B7 97 71 69 77 42 06 F9 D6 FC 74 7C 02 F9 4A 07 37 4E 07 02 FC 42 00 4E 07 06 F9 0A 07 71 4F 77 42 16 FF 06 FD 17 4D DA 07 74 95 12 FF 52 00 86 FD 57 86 FF 57 16 FF 06 FD 07 4D DA 07 74 A9 12 FF 52 00 86 FD 57 86 FF 57 06 FE C2 FC 98 98 12 F4 50 C2 FC 98 98 F2 F0 14 06 F4 C2 03 88 77 D1 06 FE C2 FC 98 98 F2 E0 14 06 FE C2 03 88 18 71 E2 80 18 71 DD 67 98 67 98 57 67 84 67 98 57 80 18 71 EB 67 98 67 84 57 67 84 67 84 57 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
|
||||||
|
led 1 start
|
||||||
|
|
||||||
|
led auto on
|
@ -0,0 +1,67 @@
|
|||||||
|
# name lanes alias port
|
||||||
|
Ethernet0 77,78,79,80 Ethernet1/1 1
|
||||||
|
Ethernet4 65,66,67,68 Ethernet2/1 2
|
||||||
|
Ethernet8 85,86,87,88 Ethernet3/1 3
|
||||||
|
Ethernet12 89,90,91,92 Ethernet4/1 4
|
||||||
|
Ethernet16 109,110,111,112 Ethernet5/1 5
|
||||||
|
Ethernet20 97,98,99,100 Ethernet6/1 6
|
||||||
|
Ethernet24 117,118,119,120 Ethernet7/1 7
|
||||||
|
Ethernet28 5,6,7,8 Ethernet8/1 8
|
||||||
|
Ethernet32 17,18,19,20 Ethernet9/1 9
|
||||||
|
Ethernet36 13,14,15,16 Ethernet10/1 10
|
||||||
|
Ethernet40 29,30,31,32 Ethernet11/1 11
|
||||||
|
Ethernet44 37,38,39,40 Ethernet12/1 12
|
||||||
|
Ethernet48 49,50,51,52 Ethernet13/1 13
|
||||||
|
Ethernet52 45,46,47,48 Ethernet14/1 14
|
||||||
|
Ethernet56 61,62,63,64 Ethernet15/1 15
|
||||||
|
Ethernet60 121,122,123,124 Ethernet16/1 16
|
||||||
|
Ethernet64 193,194,195,196 Ethernet17/1 17
|
||||||
|
Ethernet68 133,134,135,136 Ethernet18/1 18
|
||||||
|
Ethernet72 205,206,207,208 Ethernet19/1 19
|
||||||
|
Ethernet76 213,214,215,216 Ethernet20/1 20
|
||||||
|
Ethernet80 225,226,227,228 Ethernet21/1 21
|
||||||
|
Ethernet84 221,222,223,224 Ethernet22/1 22
|
||||||
|
Ethernet88 237,238,239,240 Ethernet23/1 23
|
||||||
|
Ethernet92 245,246,247,248 Ethernet24/1 24
|
||||||
|
Ethernet96 141,142,143,144 Ethernet25/1 25
|
||||||
|
Ethernet100 249,250,251,252 Ethernet26/1 26
|
||||||
|
Ethernet104 149,150,151,152 Ethernet27/1 27
|
||||||
|
Ethernet108 153,154,155,156 Ethernet28/1 28
|
||||||
|
Ethernet112 173,174,175,176 Ethernet29/1 29
|
||||||
|
Ethernet116 161,162,163,164 Ethernet30/1 30
|
||||||
|
Ethernet120 181,182,183,184 Ethernet31/1 31
|
||||||
|
Ethernet124 185,186,187,188 Ethernet32/1 32
|
||||||
|
Ethernet128 69,70,71,72 Ethernet33/1 33
|
||||||
|
Ethernet132 73,74,75,76 Ethernet34/1 34
|
||||||
|
Ethernet136 93,94,95,96 Ethernet35/1 35
|
||||||
|
Ethernet140 81,82,83,84 Ethernet36/1 36
|
||||||
|
Ethernet144 101,102,103,104 Ethernet37/1 37
|
||||||
|
Ethernet148 105,106,107,108 Ethernet38/1 38
|
||||||
|
Ethernet152 1,2,3,4 Ethernet39/1 39
|
||||||
|
Ethernet156 113,114,115,116 Ethernet40/1 40
|
||||||
|
Ethernet160 9,10,11,12 Ethernet41/1 41
|
||||||
|
Ethernet164 21,22,23,24 Ethernet42/1 42
|
||||||
|
Ethernet168 33,34,35,36 Ethernet43/1 43
|
||||||
|
Ethernet172 25,26,27,28 Ethernet44/1 44
|
||||||
|
Ethernet176 41,42,43,44 Ethernet45/1 45
|
||||||
|
Ethernet180 53,54,55,56 Ethernet46/1 46
|
||||||
|
Ethernet184 125,126,127,128 Ethernet47/1 47
|
||||||
|
Ethernet188 57,58,59,60 Ethernet48/1 48
|
||||||
|
Ethernet192 129,130,131,132 Ethernet49/1 49
|
||||||
|
Ethernet196 197,198,199,200 Ethernet50/1 50
|
||||||
|
Ethernet200 209,210,211,212 Ethernet51/1 51
|
||||||
|
Ethernet204 201,202,203,204 Ethernet52/1 52
|
||||||
|
Ethernet208 217,218,219,220 Ethernet53/1 53
|
||||||
|
Ethernet212 229,230,231,232 Ethernet54/1 54
|
||||||
|
Ethernet216 241,242,243,244 Ethernet55/1 55
|
||||||
|
Ethernet220 233,234,235,236 Ethernet56/1 56
|
||||||
|
Ethernet224 253,254,255,256 Ethernet57/1 57
|
||||||
|
Ethernet228 137,138,139,140 Ethernet58/1 58
|
||||||
|
Ethernet232 157,158,159,160 Ethernet59/1 59
|
||||||
|
Ethernet236 145,146,147,148 Ethernet60/1 60
|
||||||
|
Ethernet240 165,166,167,168 Ethernet61/1 61
|
||||||
|
Ethernet244 169,170,171,172 Ethernet62/1 62
|
||||||
|
Ethernet248 189,190,191,192 Ethernet63/1 63
|
||||||
|
Ethernet252 177,178,179,180 Ethernet64/1 64
|
||||||
|
Ethernet256 257 Ethernet65 65
|
||||||
|
Ethernet260 259 Ethernet66 66
|
@ -0,0 +1 @@
|
|||||||
|
SAI_INIT_CONFIG_FILE=/etc/bcm/th2-a7260cx3-64-64x100G.config.bcm
|
848
device/arista/x86_64-arista_7260cx3_64/minigraph.xml
Normal file
848
device/arista/x86_64-arista_7260cx3_64/minigraph.xml
Normal file
@ -0,0 +1,848 @@
|
|||||||
|
<DeviceMiniGraph xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="Microsoft.Search.Autopilot.Evolution">
|
||||||
|
<CpgDec>
|
||||||
|
<IsisRouters xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
|
||||||
|
<PeeringSessions>
|
||||||
|
</PeeringSessions>
|
||||||
|
<Routers xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||||
|
</Routers>
|
||||||
|
</CpgDec>
|
||||||
|
<DpgDec>
|
||||||
|
<DeviceDataPlaneInfo>
|
||||||
|
<IPSecTunnels/>
|
||||||
|
<LoopbackIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||||
|
<a:LoopbackIPInterface>
|
||||||
|
<Name>HostIP</Name>
|
||||||
|
<AttachTo>Loopback0</AttachTo>
|
||||||
|
<a:Prefix xmlns:b="Microsoft.Search.Autopilot.Evolution">
|
||||||
|
<b:IPPrefix>10.1.0.32/32</b:IPPrefix>
|
||||||
|
</a:Prefix>
|
||||||
|
<a:PrefixStr>10.1.0.32/32</a:PrefixStr>
|
||||||
|
</a:LoopbackIPInterface>
|
||||||
|
</LoopbackIPInterfaces>
|
||||||
|
<ManagementIPInterfaces xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||||
|
</ManagementIPInterfaces>
|
||||||
|
<MplsInterfaces/>
|
||||||
|
<MplsTeInterfaces/>
|
||||||
|
<RsvpInterfaces/>
|
||||||
|
<Hostname>sonic</Hostname>
|
||||||
|
<PortChannelInterfaces/>
|
||||||
|
<VlanInterfaces/>
|
||||||
|
<IPInterfaces>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet1/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.0/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet2/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.2/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet3/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.4/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet4/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.6/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet5/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.8/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet6/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.10/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet7/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.12/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet8/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.14/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet9/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.16/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet10/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.18/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet11/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.20/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet12/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.22/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet13/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.24/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet14/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.26/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet15/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.28/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet16/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.30/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet17/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.32/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet18/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.34/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet19/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.36/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet20/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.38/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet21/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.40/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet22/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.42/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet23/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.44/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet24/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.46/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet25/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.48/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet26/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.50/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet27/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.52/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet28/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.54/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet29/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.56/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet30/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.58/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet31/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.60/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet32/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.62/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet33/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.64/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet34/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.66/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet35/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.68/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet36/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.70/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet37/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.72/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet38/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.74/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet39/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.76/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet40/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.78/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet41/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.80/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet42/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.82/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet43/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.84/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet44/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.86/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet45/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.88/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet46/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.90/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet47/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.92/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet48/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.94/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet49/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.96/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet50/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.98/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet51/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.100/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet52/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.102/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet53/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.104/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet54/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.106/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet55/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.108/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet56/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.110/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet57/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.112/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet58/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.114/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet59/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.116/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet60/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.118/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet61/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.120/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet62/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.122/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet63/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.124/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
<IPInterface>
|
||||||
|
<Name i:Name="true"/>
|
||||||
|
<AttachTo>Ethernet64/1</AttachTo>
|
||||||
|
<Prefix>10.0.0.126/31</Prefix>
|
||||||
|
</IPInterface>
|
||||||
|
</IPInterfaces>
|
||||||
|
<DataAcls/>
|
||||||
|
<AclInterfaces/>
|
||||||
|
<DownstreamSummaries/>
|
||||||
|
<DownstreamSummarySet xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
|
||||||
|
</DeviceDataPlaneInfo>
|
||||||
|
</DpgDec>
|
||||||
|
<PngDec>
|
||||||
|
<DeviceInterfaceLinks>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet1/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet1/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet2/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet2/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet3/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet3/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet4/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet4/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet5/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet5/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet6/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet6/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet7/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet7/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet8/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet8/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet9/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet9/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet10/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet10/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet11/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet11/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet12/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet12/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet13/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet13/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet14/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet14/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet15/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet15/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet16/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet16/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet17/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet17/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet18/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet18/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet19/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet19/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet20/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet20/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet21/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet21/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet22/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet22/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet23/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet23/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet24/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet24/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet25/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet25/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet26/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet26/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet27/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet27/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet28/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet28/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet29/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet29/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet30/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet30/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet31/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet31/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet32/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet32/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet33/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet33/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet34/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet34/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet35/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet35/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet36/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet36/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet37/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet37/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet38/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet38/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet39/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet39/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet40/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet40/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet41/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet41/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet42/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet42/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet43/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet43/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet44/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet44/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet45/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet45/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet46/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet46/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet47/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet47/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet48/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet48/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet49/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet49/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet50/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet50/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet51/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet51/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet52/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet52/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet53/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet53/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet54/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet54/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet55/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet55/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet56/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet56/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet57/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet57/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet58/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet58/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet59/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet59/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet60/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet60/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet61/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet61/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet62/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet62/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet63/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet63/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
<DeviceLinkBase>
|
||||||
|
<ElementType>DeviceInterfaceLink</ElementType>
|
||||||
|
<EndDevice>sonic-target</EndDevice>
|
||||||
|
<EndPort>Ethernet64/1</EndPort>
|
||||||
|
<StartDevice>sonic</StartDevice>
|
||||||
|
<StartPort>Ethernet64/1</StartPort>
|
||||||
|
</DeviceLinkBase>
|
||||||
|
</DeviceInterfaceLinks>
|
||||||
|
<Devices>
|
||||||
|
<Device i:type="LeafRouter">
|
||||||
|
<Hostname>sonic</Hostname>
|
||||||
|
<HwSku>Arista-7260CX3-64</HwSku>
|
||||||
|
</Device>
|
||||||
|
</Devices>
|
||||||
|
</PngDec>
|
||||||
|
<MetadataDeclaration>
|
||||||
|
<Devices xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||||
|
<a:DeviceMetadata>
|
||||||
|
<a:Name>sonic</a:Name>
|
||||||
|
<a:Properties>
|
||||||
|
<a:DeviceProperty>
|
||||||
|
<a:Name>DhcpResources</a:Name>
|
||||||
|
<a:Reference i:nil="true"/>
|
||||||
|
<a:Value></a:Value>
|
||||||
|
</a:DeviceProperty>
|
||||||
|
<a:DeviceProperty>
|
||||||
|
<a:Name>NtpResources</a:Name>
|
||||||
|
<a:Reference i:nil="true"/>
|
||||||
|
<a:Value>0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org</a:Value>
|
||||||
|
</a:DeviceProperty>
|
||||||
|
<a:DeviceProperty>
|
||||||
|
<a:Name>SyslogResources</a:Name>
|
||||||
|
<a:Reference i:nil="true"/>
|
||||||
|
<a:Value></a:Value>
|
||||||
|
</a:DeviceProperty>
|
||||||
|
<a:DeviceProperty>
|
||||||
|
<a:Name>ErspanDestinationIpv4</a:Name>
|
||||||
|
<a:Reference i:nil="true"/>
|
||||||
|
<a:Value>2.2.2.2</a:Value>
|
||||||
|
</a:DeviceProperty>
|
||||||
|
</a:Properties>
|
||||||
|
</a:DeviceMetadata>
|
||||||
|
</Devices>
|
||||||
|
<Properties xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution"/>
|
||||||
|
</MetadataDeclaration>
|
||||||
|
<Hostname>sonic</Hostname>
|
||||||
|
<HwSku>Arista-7260CX3-64</HwSku>
|
||||||
|
</DeviceMiniGraph>
|
13
device/arista/x86_64-arista_7260cx3_64/plugins/eeprom.py
Normal file
13
device/arista/x86_64-arista_7260cx3_64/plugins/eeprom.py
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
"""
|
||||||
|
Arista 7260CX3-64 eeprom plugin
|
||||||
|
Uses the arista driver library to obtain the TlvInfoDecoder
|
||||||
|
"""
|
||||||
|
|
||||||
|
try:
|
||||||
|
import arista.utils.sonic_eeprom as arista_eeprom
|
||||||
|
except ImportError, e:
|
||||||
|
raise ImportError (str(e) + "- required module not found")
|
||||||
|
|
||||||
|
board = arista_eeprom.getTlvInfoDecoder()
|
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
try:
|
||||||
|
import arista.utils.sonic_sfputil as arista_sfputil
|
||||||
|
except ImportError, e:
|
||||||
|
raise ImportError (str(e) + "- required module not found")
|
||||||
|
|
||||||
|
sfputil = arista_sfputil.getSfpUtil()
|
53
device/arista/x86_64-arista_7260cx3_64/sensors.conf
Normal file
53
device/arista/x86_64-arista_7260cx3_64/sensors.conf
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# libsensors configuration file for DCS-7260CX3-64
|
||||||
|
# ------------------------------------------------#
|
||||||
|
|
||||||
|
bus "i2c-1" "SCD 0000:06:00.0 SMBus master 0 bus 0"
|
||||||
|
bus "i2c-3" "SCD 0000:06:00.0 SMBus master 0 bus 2"
|
||||||
|
bus "i2c-4" "SCD 0000:06:00.0 SMBus master 0 bus 3"
|
||||||
|
bus "i2c-73" "SCD 0000:ff:0b.3 SMBus master 0 bus 0"
|
||||||
|
bus "i2c-88" "SCD 0000:ff:0b.3 SMBus master 3 bus 3"
|
||||||
|
|
||||||
|
chip "max6658-i2c-1-4c"
|
||||||
|
label temp1 "Temp sensor near TH2"
|
||||||
|
|
||||||
|
set temp1_max 65
|
||||||
|
set temp1_crit 75
|
||||||
|
|
||||||
|
ignore temp2
|
||||||
|
|
||||||
|
chip "pmbus-i2c-3-58"
|
||||||
|
label temp1 "PSU1 primary hotspot temp"
|
||||||
|
label temp2 "PSU1 inlet temp"
|
||||||
|
label temp3 "PSU1 exhaust temp"
|
||||||
|
|
||||||
|
# setting maximum and critical thresholds is not supported for this psu
|
||||||
|
# fault and warning limits defined internally by hardware
|
||||||
|
|
||||||
|
ignore fan2
|
||||||
|
ignore fan3
|
||||||
|
|
||||||
|
chip "pmbus-i2c-4-58"
|
||||||
|
label temp1 "PSU2 primary hotspot temp"
|
||||||
|
label temp2 "PSU2 inlet temp"
|
||||||
|
label temp3 "PSU2 exhaust temp"
|
||||||
|
|
||||||
|
# setting maximum and critical thresholds is not supported for this psu
|
||||||
|
# fault and warning limits defined internally by hardware
|
||||||
|
|
||||||
|
ignore fan2
|
||||||
|
ignore fan3
|
||||||
|
|
||||||
|
chip "max6658-i2c-73-4c"
|
||||||
|
label temp1 "Rear air temp1"
|
||||||
|
label temp2 "Rear air temp2"
|
||||||
|
|
||||||
|
set temp1_max 65
|
||||||
|
set temp1_crit 75
|
||||||
|
set temp2_max 65
|
||||||
|
set temp2_crit 75
|
||||||
|
|
||||||
|
chip "lm73-i2c-88-48"
|
||||||
|
label temp1 "Front air temp"
|
||||||
|
|
||||||
|
set temp1_max 65
|
||||||
|
set temp1_crit 75
|
@ -18,7 +18,7 @@ log facility local4
|
|||||||
!
|
!
|
||||||
! bgp multiple-instance
|
! bgp multiple-instance
|
||||||
!
|
!
|
||||||
router bgp {{ minigraph_bgp_asn }}
|
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||||
bgp log-neighbor-changes
|
bgp log-neighbor-changes
|
||||||
bgp bestpath as-path multipath-relax
|
bgp bestpath as-path multipath-relax
|
||||||
{# TODO: use lo[0] for backward compatibility, will revisit the case with multiple lo interfaces #}
|
{# TODO: use lo[0] for backward compatibility, will revisit the case with multiple lo interfaces #}
|
||||||
@ -46,16 +46,16 @@ router bgp {{ minigraph_bgp_asn }}
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock vlan_advertisement %}
|
{% endblock vlan_advertisement %}
|
||||||
{% block bgp_sessions %}
|
{% block bgp_sessions %}
|
||||||
{% for bgp_session in minigraph_bgp %}
|
{% for neighbor_addr, bgp_session in BGP_NEIGHBOR.iteritems() %}
|
||||||
{% if bgp_session['asn'] != 0 %}
|
{% if bgp_session['asn'] != 0 %}
|
||||||
neighbor {{ bgp_session['addr'] }} remote-as {{ bgp_session['asn'] }}
|
neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }}
|
||||||
neighbor {{ bgp_session['addr'] }} description {{ bgp_session['name'] }}
|
neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }}
|
||||||
{% if minigraph_devices[inventory_hostname]['type'] == 'ToRRouter' %}
|
{% if minigraph_devices[inventory_hostname]['type'] == 'ToRRouter' %}
|
||||||
neighbor {{ bgp_session['addr'] }} allowas-in 1
|
neighbor {{ neighbor_addr }} allowas-in 1
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if bgp_session['addr'] | ipv6 %}
|
{% if neighbor_addr | ipv6 %}
|
||||||
address-family ipv6
|
address-family ipv6
|
||||||
neighbor {{ bgp_session['addr'] }} activate
|
neighbor {{ neighbor_addr }} activate
|
||||||
maximum-paths 64
|
maximum-paths 64
|
||||||
exit-address-family
|
exit-address-family
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -66,5 +66,5 @@ router bgp {{ minigraph_bgp_asn }}
|
|||||||
maximum-paths 64
|
maximum-paths 64
|
||||||
!
|
!
|
||||||
route-map ISOLATE permit 10
|
route-map ISOLATE permit 10
|
||||||
set as-path prepend {{ minigraph_bgp_asn }}
|
set as-path prepend {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||||
!
|
!
|
||||||
|
@ -8,13 +8,13 @@ exit $?
|
|||||||
## vtysh script start from next line, which line number MUST eqaul in 'sed' command above
|
## vtysh script start from next line, which line number MUST eqaul in 'sed' command above
|
||||||
|
|
||||||
configure terminal
|
configure terminal
|
||||||
router bgp {{ minigraph_bgp_asn }}
|
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||||
{% for bgp_session in minigraph_bgp %}
|
{% for neighbor_addr in BGP_NEIGHBOR %}
|
||||||
neighbor {{ bgp_session['addr'] }} route-map ISOLATE out
|
neighbor {{ neighbor_addr }} route-map ISOLATE out
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
exit
|
exit
|
||||||
exit
|
exit
|
||||||
|
|
||||||
{% for bgp_session in minigraph_bgp %}
|
{% for neighbor_addr in BGP_NEIGHBOR %}
|
||||||
clear ip bgp {{ bgp_session['addr'] }} soft out
|
clear ip bgp {{ neighbor_addr }} soft out
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -8,13 +8,13 @@ exit $?
|
|||||||
## vtysh script start from next line, which line number MUST eqaul in 'sed' command above
|
## vtysh script start from next line, which line number MUST eqaul in 'sed' command above
|
||||||
|
|
||||||
configure terminal
|
configure terminal
|
||||||
router bgp {{ minigraph_bgp_asn }}
|
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||||
{% for bgp_session in minigraph_bgp %}
|
{% for neighbor_ip in BGP_NEIGHBOR %}
|
||||||
no neighbor {{ bgp_session['addr'] }} route-map ISOLATE out
|
no neighbor {{ neighbor_ip }} route-map ISOLATE out
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
exit
|
exit
|
||||||
exit
|
exit
|
||||||
|
|
||||||
{% for bgp_session in minigraph_bgp %}
|
{% for neighbor_ip in BGP_NEIGHBOR %}
|
||||||
clear ip bgp {{ bgp_session['addr'] }} soft out
|
clear ip bgp {{ neighbor_ip }} soft out
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
[global.config]
|
[global.config]
|
||||||
as = {{ minigraph_bgp_asn }}
|
as = {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||||
router-id = "{{ minigraph_lo_interfaces[0]['addr'] }}"
|
router-id = "{{ minigraph_lo_interfaces[0]['addr'] }}"
|
||||||
{% for bgp_session in minigraph_bgp %}
|
{% for neighbor_addr, bgp_session in BGP_NEIGHBOR.iteritems() %}
|
||||||
{% if bgp_session['asn'] != 0 %}
|
{% if bgp_session['asn'] != 0 %}
|
||||||
[[neighbors]]
|
[[neighbors]]
|
||||||
[neighbors.config]
|
[neighbors.config]
|
||||||
peer-as = {{ bgp_session['asn'] }}
|
peer-as = {{ bgp_session['asn'] }}
|
||||||
neighbor-address = "{{ bgp_session['addr'] }}"
|
neighbor-address = "{{ neighbor_addr }}"
|
||||||
[neighbors.graceful-restart.config]
|
[neighbors.graceful-restart.config]
|
||||||
enabled = true
|
enabled = true
|
||||||
[[neighbors.afi-safis]]
|
[[neighbors.afi-safis]]
|
||||||
[neighbors.afi-safis.config]
|
[neighbors.afi-safis.config]
|
||||||
{% if bgp_session['addr'] | ipv6 %}
|
{% if neighbor_addr | ipv6 %}
|
||||||
afi-safi-name = "ipv6-unicast"
|
afi-safi-name = "ipv6-unicast"
|
||||||
{% else %}
|
{% else %}
|
||||||
afi-safi-name = "ipv4-unicast"
|
afi-safi-name = "ipv4-unicast"
|
||||||
|
@ -2,23 +2,3 @@
|
|||||||
|
|
||||||
echo Not implemented yet
|
echo Not implemented yet
|
||||||
exit
|
exit
|
||||||
|
|
||||||
## vtysh only accepts script in stdin, so cannot be directly used in shebang
|
|
||||||
## Cut the tail of this script and feed vtysh stdin
|
|
||||||
sed -n -e '9,$p' < "$0" | vtysh "$@"
|
|
||||||
## Exit with vtysh return code
|
|
||||||
exit $?
|
|
||||||
|
|
||||||
## vtysh script start from next line, which line number MUST eqaul in 'sed' command above
|
|
||||||
|
|
||||||
configure terminal
|
|
||||||
router bgp {{ minigraph_bgp_asn }}
|
|
||||||
{% for bgp_session in minigraph_bgp %}
|
|
||||||
neighbor {{ bgp_session['addr'] }} route-map ISOLATE out
|
|
||||||
{% endfor %}
|
|
||||||
exit
|
|
||||||
exit
|
|
||||||
|
|
||||||
{% for bgp_session in minigraph_bgp %}
|
|
||||||
clear ip bgp {{ bgp_session['addr'] }} soft out
|
|
||||||
{% endfor %}
|
|
||||||
|
@ -3,22 +3,3 @@
|
|||||||
echo Not implemented yet
|
echo Not implemented yet
|
||||||
exit
|
exit
|
||||||
|
|
||||||
## vtysh only accepts script in stdin, so cannot be directly used in shebang
|
|
||||||
## Cut the tail of this script and feed vtysh stdin
|
|
||||||
sed -n -e '9,$p' < "$0" | vtysh "$@"
|
|
||||||
## Exit with vtysh return code
|
|
||||||
exit $?
|
|
||||||
|
|
||||||
## vtysh script start from next line, which line number MUST eqaul in 'sed' command above
|
|
||||||
|
|
||||||
configure terminal
|
|
||||||
router bgp {{ minigraph_bgp_asn }}
|
|
||||||
{% for bgp_session in minigraph_bgp %}
|
|
||||||
no neighbor {{ bgp_session['addr'] }} route-map ISOLATE out
|
|
||||||
{% endfor %}
|
|
||||||
exit
|
|
||||||
exit
|
|
||||||
|
|
||||||
{% for bgp_session in minigraph_bgp %}
|
|
||||||
clear ip bgp {{ bgp_session['addr'] }} soft out
|
|
||||||
{% endfor %}
|
|
||||||
|
@ -6,37 +6,60 @@ import subprocess
|
|||||||
import syslog
|
import syslog
|
||||||
from swsssdk import ConfigDBConnector
|
from swsssdk import ConfigDBConnector
|
||||||
|
|
||||||
# Returns BGP ASN as a string
|
class BGPConfigDaemon:
|
||||||
def _get_bgp_asn_from_minigraph():
|
|
||||||
# Get BGP ASN from minigraph
|
|
||||||
proc = subprocess.Popen(
|
|
||||||
['sonic-cfggen', '-m', '/etc/sonic/minigraph.xml', '-v', 'minigraph_bgp_asn'],
|
|
||||||
stdout=subprocess.PIPE,
|
|
||||||
shell=False,
|
|
||||||
stderr=subprocess.STDOUT)
|
|
||||||
stdout = proc.communicate()[0]
|
|
||||||
proc.wait()
|
|
||||||
return stdout.rstrip('\n')
|
|
||||||
|
|
||||||
def bgp_config(asn, ip, config):
|
def __init__(self):
|
||||||
syslog.syslog(syslog.LOG_INFO, '[bgp cfgd] value for {} changed to {}'.format(ip, config))
|
self.config_db = ConfigDBConnector()
|
||||||
# Currently dynamic config is supported only for bgp admin status
|
self.config_db.connect()
|
||||||
if config.has_key('admin_status'):
|
self.bgp_asn = self.config_db.get_entry('DEVICE_METADATA', 'localhost')['bgp_asn']
|
||||||
command_mod = 'no ' if config['admin_status'] == 'up' else ''
|
self.bgp_neighbor = self.config_db.get_table('BGP_NEIGHBOR')
|
||||||
command = "vtysh -c 'configure terminal' -c 'router bgp {}' -c '{}neighbor {} shutdown'".format(asn, command_mod, ip)
|
|
||||||
|
|
||||||
|
def __run_command(self, command):
|
||||||
|
# print command
|
||||||
p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
|
p = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE)
|
||||||
stdout = p.communicate()[0]
|
stdout = p.communicate()[0]
|
||||||
p.wait()
|
p.wait()
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
syslog.syslog(syslog.LOG_ERR, '[bgp cfgd] command execution returned {}. Command: "{}", stdout: "{}"'.format(p.returncode, command, stdout))
|
syslog.syslog(syslog.LOG_ERR, '[bgp cfgd] command execution returned {}. Command: "{}", stdout: "{}"'.format(p.returncode, command, stdout))
|
||||||
|
|
||||||
def main():
|
def metadata_handler(self, key, data):
|
||||||
sub = ConfigDBConnector()
|
if key == 'localhost' and data.has_key('bgp_asn'):
|
||||||
bgp_asn = _get_bgp_asn_from_minigraph()
|
if data['bgp_asn'] != self.bgp_asn:
|
||||||
handler = lambda table, key, data: bgp_config(bgp_asn, key, data)
|
syslog.syslog(syslog.LOG_INFO, '[bgp cfgd] ASN changed to {} from {}, restart BGP...'.format(data['bgp_asn'], self.bgp_asn))
|
||||||
sub.subscribe('BGP_NEIGHBOR', handler)
|
self.__run_command("supervisorctl restart start.sh")
|
||||||
sub.connect()
|
self.__run_command("service quagga restart")
|
||||||
sub.listen()
|
self.bgp_asn = data['bgp_asn']
|
||||||
|
|
||||||
main()
|
def bgp_handler(self, key, data):
|
||||||
|
syslog.syslog(syslog.LOG_INFO, '[bgp cfgd] value for {} changed to {}'.format(key, data))
|
||||||
|
if not data:
|
||||||
|
# Neighbor is deleted
|
||||||
|
command = "vtysh -c 'configure terminal' -c 'router bgp {}' -c 'no neighbor {}'".format(self.bgp_asn, key)
|
||||||
|
self.__run_command(command)
|
||||||
|
self.bgp_neighbor.pop(key)
|
||||||
|
else:
|
||||||
|
command = "vtysh -c 'configure terminal' -c 'router bgp {}' -c 'neighbor {} remote-as {}'".format(self.bgp_asn, key, data['asn'])
|
||||||
|
self.__run_command(command)
|
||||||
|
if data.has_key('name'):
|
||||||
|
command = "vtysh -c 'configure terminal' -c 'router bgp {}' -c 'neighbor {} description {}'".format(self.bgp_asn, key, data['name'])
|
||||||
|
self.__run_command(command)
|
||||||
|
if data.has_key('admin_status'):
|
||||||
|
command_mod = 'no ' if data['admin_status'] == 'up' else ''
|
||||||
|
command = "vtysh -c 'configure terminal' -c 'router bgp {}' -c '{}neighbor {} shutdown'".format(self.bgp_asn, command_mod, key)
|
||||||
|
self.__run_command(command)
|
||||||
|
self.bgp_neighbor[key] = data
|
||||||
|
|
||||||
|
def start(self):
|
||||||
|
self.config_db.subscribe('BGP_NEIGHBOR',
|
||||||
|
lambda table, key, data: self.bgp_handler(key, data))
|
||||||
|
self.config_db.subscribe('DEVICE_METADATA',
|
||||||
|
lambda table, key, data: self.metadata_handler(key, data))
|
||||||
|
self.config_db.listen()
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
daemon = BGPConfigDaemon()
|
||||||
|
daemon.start()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
|
@ -14,7 +14,7 @@ log facility local4
|
|||||||
! enable password {# {{ en_passwd }} TODO: param needed #}
|
! enable password {# {{ en_passwd }} TODO: param needed #}
|
||||||
{% endblock system_init %}
|
{% endblock system_init %}
|
||||||
!
|
!
|
||||||
{% if minigraph_bgp_asn is not none %}
|
{% if DEVICE_METADATA['localhost'].has_key('bgp_asn') %}
|
||||||
{% block bgp_init %}
|
{% block bgp_init %}
|
||||||
!
|
!
|
||||||
! bgp multiple-instance
|
! bgp multiple-instance
|
||||||
@ -23,7 +23,7 @@ route-map FROM_BGP_SPEAKER_V4 permit 10
|
|||||||
!
|
!
|
||||||
route-map TO_BGP_SPEAKER_V4 deny 10
|
route-map TO_BGP_SPEAKER_V4 deny 10
|
||||||
!
|
!
|
||||||
router bgp {{ minigraph_bgp_asn }}
|
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||||
bgp log-neighbor-changes
|
bgp log-neighbor-changes
|
||||||
bgp bestpath as-path multipath-relax
|
bgp bestpath as-path multipath-relax
|
||||||
{# Advertise graceful restart capability for ToR #}
|
{# Advertise graceful restart capability for ToR #}
|
||||||
@ -50,24 +50,24 @@ router bgp {{ minigraph_bgp_asn }}
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock vlan_advertisement %}
|
{% endblock vlan_advertisement %}
|
||||||
{% block bgp_sessions %}
|
{% block bgp_sessions %}
|
||||||
{% for bgp_session in minigraph_bgp %}
|
{% for neighbor_addr, bgp_session in BGP_NEIGHBOR.iteritems() %}
|
||||||
{% if bgp_session['asn'] != 0 %}
|
{% if bgp_session['asn'] != 0 %}
|
||||||
neighbor {{ bgp_session['addr'] }} remote-as {{ bgp_session['asn'] }}
|
neighbor {{ neighbor_addr }} remote-as {{ bgp_session['asn'] }}
|
||||||
neighbor {{ bgp_session['addr'] }} description {{ bgp_session['name'] }}
|
neighbor {{ neighbor_addr }} description {{ bgp_session['name'] }}
|
||||||
{% if bgp_admin_state and bgp_admin_state.has_key(bgp_session['addr']) and bgp_admin_state[bgp_session['addr']]==False or bgp_admin_state and not bgp_admin_state.has_key(bgp_session['addr']) and bgp_admin_state.has_key('all') and bgp_admin_state['all']==False %}
|
{% if bgp_session.has_key('admin_status') and bgp_session['admin_status'] == 'down' or not bgp_session.has_key('admin_status') and DEVICE_METADATA['localhost'].has_key('default_bgp_status') and DEVICE_METADATA['localhost']['default_bgp_status'] == 'down' %}
|
||||||
neighbor {{ bgp_session['addr'] }} shutdown
|
neighbor {{ neighbor_addr }} shutdown
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if bgp_session['addr'] | ipv4 %}
|
{% if neighbor_addr | ipv4 %}
|
||||||
{% if minigraph_devices[inventory_hostname]['type'] == 'ToRRouter' %}
|
{% if minigraph_devices[inventory_hostname]['type'] == 'ToRRouter' %}
|
||||||
neighbor {{ bgp_session['addr'] }} allowas-in 1
|
neighbor {{ neighbor_addr }} allowas-in 1
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if bgp_session['addr'] | ipv6 %}
|
{% if neighbor_addr | ipv6 %}
|
||||||
address-family ipv6
|
address-family ipv6
|
||||||
{% if minigraph_devices[inventory_hostname]['type'] == 'ToRRouter' %}
|
{% if minigraph_devices[inventory_hostname]['type'] == 'ToRRouter' %}
|
||||||
neighbor {{ bgp_session['addr'] }} allowas-in 1
|
neighbor {{ neighbor_addr }} allowas-in 1
|
||||||
{% endif %}
|
{% endif %}
|
||||||
neighbor {{ bgp_session['addr'] }} activate
|
neighbor {{ neighbor_addr }} activate
|
||||||
maximum-paths 64
|
maximum-paths 64
|
||||||
exit-address-family
|
exit-address-family
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@ -75,7 +75,7 @@ router bgp {{ minigraph_bgp_asn }}
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock bgp_sessions %}
|
{% endblock bgp_sessions %}
|
||||||
{% block bgp_peers_with_range %}
|
{% block bgp_peers_with_range %}
|
||||||
{% for bgp_peer in minigraph_bgp_peers_with_range %}
|
{% for bgp_peer in BGP_PEER_RANGE.values() %}
|
||||||
neighbor {{ bgp_peer['name'] }} peer-group
|
neighbor {{ bgp_peer['name'] }} peer-group
|
||||||
neighbor {{ bgp_peer['name'] }} passive
|
neighbor {{ bgp_peer['name'] }} passive
|
||||||
neighbor {{ bgp_peer['name'] }} remote-as {{deployment_id_asn_map[deployment_id] }}
|
neighbor {{ bgp_peer['name'] }} remote-as {{deployment_id_asn_map[deployment_id] }}
|
||||||
@ -90,10 +90,10 @@ router bgp {{ minigraph_bgp_asn }}
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endblock bgp_peers_with_range %}
|
{% endblock bgp_peers_with_range %}
|
||||||
!
|
!
|
||||||
{% if minigraph_bgp_asn is not none %}
|
{% if DEVICE_METADATA['localhost'].has_key('bgp_asn') %}
|
||||||
maximum-paths 64
|
maximum-paths 64
|
||||||
!
|
!
|
||||||
route-map ISOLATE permit 10
|
route-map ISOLATE permit 10
|
||||||
set as-path prepend {{ minigraph_bgp_asn }}
|
set as-path prepend {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
!
|
!
|
||||||
|
@ -8,13 +8,13 @@ exit $?
|
|||||||
## vtysh script start from next line, which line number MUST eqaul in 'sed' command above
|
## vtysh script start from next line, which line number MUST eqaul in 'sed' command above
|
||||||
|
|
||||||
configure terminal
|
configure terminal
|
||||||
router bgp {{ minigraph_bgp_asn }}
|
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||||
{% for bgp_session in minigraph_bgp %}
|
{% for neighbor_addr in BGP_NEIGHBOR %}
|
||||||
neighbor {{ bgp_session['addr'] }} route-map ISOLATE out
|
neighbor {{ neighbor_addr }} route-map ISOLATE out
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
exit
|
exit
|
||||||
exit
|
exit
|
||||||
|
|
||||||
{% for bgp_session in minigraph_bgp %}
|
{% for neighbor_addr in BGP_NEIGHBOR %}
|
||||||
clear ip bgp {{ bgp_session['addr'] }} soft out
|
clear ip bgp {{ neighbor_addr }} soft out
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
mkdir -p /etc/quagga
|
mkdir -p /etc/quagga
|
||||||
sonic-cfggen -m -d -y /etc/sonic/deployment_id_asn_map.yml -t /usr/share/sonic/templates/bgpd.conf.j2 > /etc/quagga/bgpd.conf
|
sonic-cfggen -m -d -y /etc/sonic/deployment_id_asn_map.yml -t /usr/share/sonic/templates/bgpd.conf.j2 > /etc/quagga/bgpd.conf
|
||||||
|
|
||||||
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/zebra.conf.j2 > /etc/quagga/zebra.conf
|
sonic-cfggen -m -d -t /usr/share/sonic/templates/zebra.conf.j2 > /etc/quagga/zebra.conf
|
||||||
|
|
||||||
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/isolate.j2 > /usr/sbin/bgp-isolate
|
sonic-cfggen -m -d -t /usr/share/sonic/templates/isolate.j2 > /usr/sbin/bgp-isolate
|
||||||
chown root:root /usr/sbin/bgp-isolate
|
chown root:root /usr/sbin/bgp-isolate
|
||||||
chmod 0755 /usr/sbin/bgp-isolate
|
chmod 0755 /usr/sbin/bgp-isolate
|
||||||
|
|
||||||
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/unisolate.j2 > /usr/sbin/bgp-unisolate
|
sonic-cfggen -m -d -t /usr/share/sonic/templates/unisolate.j2 > /usr/sbin/bgp-unisolate
|
||||||
chown root:root /usr/sbin/bgp-unisolate
|
chown root:root /usr/sbin/bgp-unisolate
|
||||||
chmod 0755 /usr/sbin/bgp-unisolate
|
chmod 0755 /usr/sbin/bgp-unisolate
|
||||||
|
|
||||||
|
@ -8,13 +8,13 @@ exit $?
|
|||||||
## vtysh script start from next line, which line number MUST eqaul in 'sed' command above
|
## vtysh script start from next line, which line number MUST eqaul in 'sed' command above
|
||||||
|
|
||||||
configure terminal
|
configure terminal
|
||||||
router bgp {{ minigraph_bgp_asn }}
|
router bgp {{ DEVICE_METADATA['localhost']['bgp_asn'] }}
|
||||||
{% for bgp_session in minigraph_bgp %}
|
{% for neighbor_ip in BGP_NEIGHBOR %}
|
||||||
no neighbor {{ bgp_session['addr'] }} route-map ISOLATE out
|
no neighbor {{ neighbor_ip }} route-map ISOLATE out
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
exit
|
exit
|
||||||
exit
|
exit
|
||||||
|
|
||||||
{% for bgp_session in minigraph_bgp %}
|
{% for neighbor_ip in BGP_NEIGHBOR %}
|
||||||
clear ip bgp {{ bgp_session['addr'] }} soft out
|
clear ip bgp {{ neighbor_ip }} soft out
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
{% for member in minigraph_ports.keys() %}
|
{% for member in minigraph_ports.keys() %}
|
||||||
|
{% if member in minigraph_neighbors %}
|
||||||
configure ports {{ member }} lldp portidsubtype local {{ minigraph_ports[member]['alias'] }} description {{ minigraph_neighbors[member]['name'] }}:{{ minigraph_neighbors[member]['port'] }}
|
configure ports {{ member }} lldp portidsubtype local {{ minigraph_ports[member]['alias'] }} description {{ minigraph_neighbors[member]['name'] }}:{{ minigraph_neighbors[member]['port'] }}
|
||||||
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -65,6 +65,9 @@ extract_image() {
|
|||||||
|
|
||||||
## vfat does not support symbol link
|
## vfat does not support symbol link
|
||||||
if [ -n "$sonic_upgrade" ] || [ "$rootfs_type" != "vfat" ]; then
|
if [ -n "$sonic_upgrade" ] || [ "$rootfs_type" != "vfat" ]; then
|
||||||
|
## on ext4, other doesn't have access to the flash by default
|
||||||
|
chmod o+rx "$target_path"
|
||||||
|
|
||||||
mkdir -p "$image_path/{{ DOCKERFS_DIR }}"
|
mkdir -p "$image_path/{{ DOCKERFS_DIR }}"
|
||||||
|
|
||||||
if [ -n "$sonic_upgrade" ]; then
|
if [ -n "$sonic_upgrade" ]; then
|
||||||
@ -108,7 +111,7 @@ platform_specific() {
|
|||||||
local sid="$(grep -Eo 'sid=[^ ]+' /etc/cmdline | cut -f2 -d=)"
|
local sid="$(grep -Eo 'sid=[^ ]+' /etc/cmdline | cut -f2 -d=)"
|
||||||
|
|
||||||
# set varlog size to 100MB
|
# set varlog size to 100MB
|
||||||
echo "varlog_size=100" >>/tmp/append
|
local varlog_size=100
|
||||||
|
|
||||||
# This is temporary as the platform= and sid= parameters don't provide enough
|
# This is temporary as the platform= and sid= parameters don't provide enough
|
||||||
# information to identify the SKU
|
# information to identify the SKU
|
||||||
@ -122,10 +125,19 @@ platform_specific() {
|
|||||||
aboot_machine=arista_7050_qx32s
|
aboot_machine=arista_7050_qx32s
|
||||||
echo "modprobe.blacklist=radeon" >>/tmp/append
|
echo "modprobe.blacklist=radeon" >>/tmp/append
|
||||||
fi
|
fi
|
||||||
if [ "$sid" = "Upperlake" ]; then
|
if [ "$sid" = "Upperlake" ] || [ "$sid" = "UpperlakeES" ]; then
|
||||||
aboot_machine=arista_7060_cx32s
|
aboot_machine=arista_7060_cx32s
|
||||||
echo "amd_iommu=off" >> /tmp/append
|
echo "amd_iommu=off" >> /tmp/append
|
||||||
fi
|
fi
|
||||||
|
if [ "$sid" = "Gardena" ] || [ "$sid" = "GardenaSsd" ]; then
|
||||||
|
aboot_machine=arista_7260cx3_64
|
||||||
|
fi
|
||||||
|
if [ "$platform" = "rook" ]; then
|
||||||
|
varlog_size=200
|
||||||
|
readprefdl -f /tmp/.system-prefdl -d > /mnt/flash/.system-prefdl
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "varlog_size=$varlog_size" >>/tmp/append
|
||||||
}
|
}
|
||||||
|
|
||||||
# check the hash file in the image, and determine to install or just skip
|
# check the hash file in the image, and determine to install or just skip
|
||||||
|
@ -106,7 +106,7 @@ sudo cp $IMAGE_CONFIGS/rsyslog/rsyslog.conf.j2 $FILESYSTEM_ROOT/usr/share/sonic/
|
|||||||
sudo cp $IMAGE_CONFIGS/rsyslog/rsyslog.d/* $FILESYSTEM_ROOT/etc/rsyslog.d/
|
sudo cp $IMAGE_CONFIGS/rsyslog/rsyslog.d/* $FILESYSTEM_ROOT/etc/rsyslog.d/
|
||||||
|
|
||||||
# Copy logrotate.d configuration files
|
# Copy logrotate.d configuration files
|
||||||
sudo cp -f $IMAGE_CONFIGS/logrotate.d/rsyslog $FILESYSTEM_ROOT/etc/logrotate.d/
|
sudo cp -f $IMAGE_CONFIGS/logrotate/logrotate.d/* $FILESYSTEM_ROOT/etc/logrotate.d/
|
||||||
|
|
||||||
# Copy systemd-journald configuration files
|
# Copy systemd-journald configuration files
|
||||||
sudo cp -f $IMAGE_CONFIGS/systemd/journald.conf $FILESYSTEM_ROOT/etc/systemd/
|
sudo cp -f $IMAGE_CONFIGS/systemd/journald.conf $FILESYSTEM_ROOT/etc/systemd/
|
||||||
@ -132,7 +132,7 @@ sudo bash -c "echo dhcp_as_static=true >> $FILESYSTEM_ROOT/etc/sonic/updategraph
|
|||||||
sudo bash -c "echo enabled=false > $FILESYSTEM_ROOT/etc/sonic/updategraph.conf"
|
sudo bash -c "echo enabled=false > $FILESYSTEM_ROOT/etc/sonic/updategraph.conf"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if shutdown_bgp_on_start == "y" %}
|
{% if shutdown_bgp_on_start == "y" %}
|
||||||
sudo bash -c "echo '{ \"bgp_admin_state\": { \"all\": false } }' >> $FILESYSTEM_ROOT/etc/sonic/config_db.json"
|
sudo bash -c "echo '{ \"DEVICE_METADATA\": { \"localhost\": { \"default_bgp_status\": \"down\" } } }' >> $FILESYSTEM_ROOT/etc/sonic/init_cfg.json"
|
||||||
{% endif %}
|
{% endif %}
|
||||||
# Copy SNMP configuration files
|
# Copy SNMP configuration files
|
||||||
sudo cp $IMAGE_CONFIGS/snmp/snmp.yml $FILESYSTEM_ROOT/etc/sonic/
|
sudo cp $IMAGE_CONFIGS/snmp/snmp.yml $FILESYSTEM_ROOT/etc/sonic/
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
# Attempt to rotate system logs once per minute
|
# Attempt to rotate system logs once per minute
|
||||||
* * * * * root /usr/sbin/logrotate /etc/logrotate.d/rsyslog
|
* * * * * root /usr/sbin/logrotate /etc/logrotate.conf > /dev/null 2>&1
|
||||||
|
@ -1,62 +0,0 @@
|
|||||||
/var/log/syslog
|
|
||||||
/var/log/quagga/*.log
|
|
||||||
/var/log/teamd.log
|
|
||||||
{
|
|
||||||
rotate 7
|
|
||||||
daily
|
|
||||||
maxsize 100M
|
|
||||||
missingok
|
|
||||||
notifempty
|
|
||||||
compress
|
|
||||||
delaycompress
|
|
||||||
postrotate
|
|
||||||
# Calling kill directly instead of 'service rsyslog rotate >/dev/null' due
|
|
||||||
# to bug in init-system-helpers. Bug has apparently been fixed in v1.47.
|
|
||||||
# However, Debian Jessie is still using v1.22.
|
|
||||||
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672218
|
|
||||||
kill -HUP $(cat /var/run/rsyslogd.pid)
|
|
||||||
endscript
|
|
||||||
}
|
|
||||||
/var/log/swss/*.rec
|
|
||||||
{
|
|
||||||
rotate 7
|
|
||||||
daily
|
|
||||||
maxsize 20M
|
|
||||||
missingok
|
|
||||||
notifempty
|
|
||||||
compress
|
|
||||||
delaycompress
|
|
||||||
sharedscripts
|
|
||||||
postrotate
|
|
||||||
pgrep -x orchagent | xargs /bin/kill -HUP 2>/dev/null || true
|
|
||||||
endscript
|
|
||||||
}
|
|
||||||
/var/log/mail.info
|
|
||||||
/var/log/mail.warn
|
|
||||||
/var/log/mail.err
|
|
||||||
/var/log/mail.log
|
|
||||||
/var/log/daemon.log
|
|
||||||
/var/log/kern.log
|
|
||||||
/var/log/auth.log
|
|
||||||
/var/log/user.log
|
|
||||||
/var/log/lpr.log
|
|
||||||
/var/log/cron.log
|
|
||||||
/var/log/debug
|
|
||||||
/var/log/messages
|
|
||||||
{
|
|
||||||
rotate 4
|
|
||||||
daily
|
|
||||||
maxsize 50M
|
|
||||||
missingok
|
|
||||||
notifempty
|
|
||||||
compress
|
|
||||||
delaycompress
|
|
||||||
sharedscripts
|
|
||||||
postrotate
|
|
||||||
# Calling kill directly instead of 'service rsyslog rotate >/dev/null' due
|
|
||||||
# to bug in init-system-helpers. Bug has apparently been fixed in v1.47.
|
|
||||||
# However, Debian Jessie is still using v1.22.
|
|
||||||
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672218
|
|
||||||
kill -HUP $(cat /var/run/rsyslogd.pid)
|
|
||||||
endscript
|
|
||||||
}
|
|
32
files/image_config/logrotate/logrotate.conf
Normal file
32
files/image_config/logrotate/logrotate.conf
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
# see "man logrotate" for details
|
||||||
|
# Rotate log files daily by default
|
||||||
|
daily
|
||||||
|
|
||||||
|
# Keep 4 days worth of backlogs by default
|
||||||
|
rotate 4
|
||||||
|
|
||||||
|
# create new (empty) log files after rotating old ones
|
||||||
|
create
|
||||||
|
|
||||||
|
# uncomment this if you want your log files compressed
|
||||||
|
#compress
|
||||||
|
|
||||||
|
# packages drop log rotation information into this directory
|
||||||
|
include /etc/logrotate.d
|
||||||
|
|
||||||
|
# no packages own wtmp, or btmp -- we'll rotate them here
|
||||||
|
/var/log/wtmp {
|
||||||
|
missingok
|
||||||
|
size 100k
|
||||||
|
create 0664 root utmp
|
||||||
|
rotate 1
|
||||||
|
}
|
||||||
|
|
||||||
|
/var/log/btmp {
|
||||||
|
missingok
|
||||||
|
size 100k
|
||||||
|
create 0660 root utmp
|
||||||
|
rotate 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# system-specific logs may be configured here
|
15
files/image_config/logrotate/logrotate.d/apt
Normal file
15
files/image_config/logrotate/logrotate.d/apt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/var/log/apt/term.log {
|
||||||
|
size 100k
|
||||||
|
rotate 1
|
||||||
|
compress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
}
|
||||||
|
|
||||||
|
/var/log/apt/history.log {
|
||||||
|
size 100k
|
||||||
|
rotate 1
|
||||||
|
compress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
}
|
18
files/image_config/logrotate/logrotate.d/dpkg
Normal file
18
files/image_config/logrotate/logrotate.d/dpkg
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/var/log/dpkg.log {
|
||||||
|
size 100k
|
||||||
|
rotate 1
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
create 644 root root
|
||||||
|
}
|
||||||
|
/var/log/alternatives.log {
|
||||||
|
size 100k
|
||||||
|
rotate 1
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
create 644 root root
|
||||||
|
}
|
12
files/image_config/logrotate/logrotate.d/monit
Normal file
12
files/image_config/logrotate/logrotate.d/monit
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/var/log/monit.log {
|
||||||
|
size 100k
|
||||||
|
rotate 1
|
||||||
|
missingok
|
||||||
|
create 640 root adm
|
||||||
|
notifempty
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
postrotate
|
||||||
|
invoke-rc.d monit reload > /dev/null
|
||||||
|
endscript
|
||||||
|
}
|
96
files/image_config/logrotate/logrotate.d/rsyslog
Normal file
96
files/image_config/logrotate/logrotate.d/rsyslog
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
# These logs should no longer get created. However, in case they do get created,
|
||||||
|
# we should keep them to a small size and rotate them also.
|
||||||
|
/var/log/mail.info
|
||||||
|
/var/log/mail.warn
|
||||||
|
/var/log/mail.err
|
||||||
|
/var/log/mail.log
|
||||||
|
/var/log/daemon.log
|
||||||
|
/var/log/kern.log
|
||||||
|
/var/log/user.log
|
||||||
|
/var/log/lpr.log
|
||||||
|
/var/log/debug
|
||||||
|
/var/log/messages
|
||||||
|
{
|
||||||
|
size 10k
|
||||||
|
rotate 1
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
sharedscripts
|
||||||
|
postrotate
|
||||||
|
# calling kill directly instead of 'service rsyslog rotate >/dev/null' due
|
||||||
|
# to bug in init-system-helpers. bug has apparently been fixed in v1.47.
|
||||||
|
# however, debian jessie is still using v1.22.
|
||||||
|
# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672218
|
||||||
|
kill -hup $(cat /var/run/rsyslogd.pid)
|
||||||
|
endscript
|
||||||
|
}
|
||||||
|
|
||||||
|
/var/log/auth.log
|
||||||
|
/var/log/cron.log
|
||||||
|
/var/log/syslog
|
||||||
|
/var/log/teamd.log
|
||||||
|
/var/log/quagga/bgpd.log
|
||||||
|
/var/log/quagga/zebra.log
|
||||||
|
/var/log/swss/sairedis.rec
|
||||||
|
/var/log/swss/swss.rec
|
||||||
|
{
|
||||||
|
size 1M
|
||||||
|
rotate 5000
|
||||||
|
missingok
|
||||||
|
notifempty
|
||||||
|
compress
|
||||||
|
delaycompress
|
||||||
|
nosharedscripts
|
||||||
|
prerotate
|
||||||
|
# Adjust NUM_LOGS_TO_ROTATE to reflect number of log files that trigger this block specified above
|
||||||
|
NUM_LOGS_TO_ROTATE=8
|
||||||
|
|
||||||
|
# Adjust LOG_FILE_ROTATE_SIZE_KB to reflect the "size" parameter specified above, in kB
|
||||||
|
LOG_FILE_ROTATE_SIZE_KB=1024
|
||||||
|
|
||||||
|
# Reserve space for btmp, wtmp, dpkg.log, monit.log, etc., as well as logs that
|
||||||
|
# should be disabled, just in case they get created and rotated
|
||||||
|
RESERVED_SPACE_KB=4096
|
||||||
|
|
||||||
|
VAR_LOG_SIZE_KB=$(df -k /var/log | sed -n 2p | awk '{ print $2 }')
|
||||||
|
|
||||||
|
# Limit usable space to 95% of the partition minus the reserved space for other logs
|
||||||
|
USABLE_SPACE_KB=$(( (VAR_LOG_SIZE_KB * 95 / 100) - RESERVED_SPACE_KB))
|
||||||
|
|
||||||
|
# Set our threshold so as to maintain enough space to write all logs from empty to full
|
||||||
|
# Most likely, some logs will have non-zero size when this is called, so this errs on the side
|
||||||
|
# of caution, giving us a bit of a cushion if a log grows quickly and passes its rotation size
|
||||||
|
THRESHOLD_KB=$((USABLE_SPACE_KB - (NUM_LOGS_TO_ROTATE * LOG_FILE_ROTATE_SIZE_KB * 2)))
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
USED_KB=$(du -s /var/log | awk '{ print $1; }')
|
||||||
|
|
||||||
|
if [ $USED_KB -lt $THRESHOLD_KB ]; then
|
||||||
|
break
|
||||||
|
else
|
||||||
|
OLDEST_ARCHIVE_FILE=$(find /var/log -type f -printf '%T+ %p\n' | grep -E '.+\.[0-9]+(\.gz)?$' | sort | head -n 1 | awk '{ print $2; }')
|
||||||
|
|
||||||
|
if [ -z "$OLDEST_ARCHIVE_FILE" ]; then
|
||||||
|
logger -p syslog.err -t "logrotate" "No archive file to delete -- potential for filling up /var/log partition!"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
|
logger -p syslog.info -t "logrotate" "Deleting archive file $OLDEST_ARCHIVE_FILE to free up space"
|
||||||
|
rm -rf "$OLDEST_ARCHIVE_FILE"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
endscript
|
||||||
|
postrotate
|
||||||
|
if [ $(echo $1 | grep -c "/var/log/swss/") -gt 0 ]; then
|
||||||
|
pgrep -x orchagent | xargs /bin/kill -HUP 2>/dev/null || true
|
||||||
|
else
|
||||||
|
# Calling kill directly instead of 'service rsyslog rotate >/dev/null' due
|
||||||
|
# to bug in init-system-helpers. Bug has apparently been fixed in v1.47.
|
||||||
|
# However, Debian Jessie is still using v1.22.
|
||||||
|
# See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=672218
|
||||||
|
kill -HUP $(cat /var/run/rsyslogd.pid)
|
||||||
|
fi
|
||||||
|
endscript
|
||||||
|
}
|
@ -35,8 +35,20 @@ if [ -f /host/image-$sonic_version/platform/firsttime ]; then
|
|||||||
mv -f /host/old_config/* /etc/sonic/
|
mv -f /host/old_config/* /etc/sonic/
|
||||||
elif [ -f /host/minigraph.xml ]; then
|
elif [ -f /host/minigraph.xml ]; then
|
||||||
mv /host/minigraph.xml /etc/sonic/
|
mv /host/minigraph.xml /etc/sonic/
|
||||||
|
# Combine information in minigraph and init_cfg.json to form initiate config DB dump file.
|
||||||
|
# TODO: After moving all information from minigraph to DB, sample config DB dump should be provide
|
||||||
|
if [ -f /etc/sonic/init_cfg.json ]; then
|
||||||
|
sonic-cfggen -m -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json
|
||||||
|
else
|
||||||
|
sonic-cfggen -m --print-data > /etc/sonic/config_db.json
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
cp /usr/share/sonic/device/$platform/minigraph.xml /etc/sonic/
|
cp /usr/share/sonic/device/$platform/minigraph.xml /etc/sonic/
|
||||||
|
if [ -f /etc/sonic/init_cfg.json ]; then
|
||||||
|
sonic-cfggen -m -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json
|
||||||
|
else
|
||||||
|
sonic-cfggen -m --print-data > /etc/sonic/config_db.json
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d /host/image-$sonic_version/platform/$platform ]; then
|
if [ -d /host/image-$sonic_version/platform/$platform ]; then
|
||||||
|
@ -1,61 +1,18 @@
|
|||||||
#
|
#
|
||||||
# First some standard log files. Log by facility.
|
# First some standard log files. Log by facility.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# Log all facilities to /var/log/syslog except cron, auth
|
||||||
|
# and authpriv. They are noisy - log them to their own files
|
||||||
|
*.*;cron,auth,authpriv.none -/var/log/syslog
|
||||||
auth,authpriv.* /var/log/auth.log
|
auth,authpriv.* /var/log/auth.log
|
||||||
*.*;auth,authpriv.none -/var/log/syslog
|
|
||||||
cron.* /var/log/cron.log
|
cron.* /var/log/cron.log
|
||||||
# Do not redirect daemon, kernel or lpr logs to
|
|
||||||
# their own files. Let them log to /var/log/syslog
|
|
||||||
#daemon.* -/var/log/daemon.log
|
|
||||||
#kern.* -/var/log/kern.log
|
|
||||||
#kern.* -/var/persist/log/kern.log
|
|
||||||
#lpr.* -/var/log/lpr.log
|
|
||||||
mail.* -/var/log/mail.log
|
|
||||||
user.* -/var/log/user.log
|
|
||||||
|
|
||||||
#
|
|
||||||
# Logging for the mail system. Split it up so that
|
|
||||||
# it is easy to write scripts to parse these files.
|
|
||||||
#
|
|
||||||
mail.info -/var/log/mail.info
|
|
||||||
mail.warn -/var/log/mail.warn
|
|
||||||
mail.err /var/log/mail.err
|
|
||||||
|
|
||||||
#
|
|
||||||
# Logging for INN news system.
|
|
||||||
#
|
|
||||||
news.crit /var/log/news/news.crit
|
|
||||||
news.err /var/log/news/news.err
|
|
||||||
news.notice -/var/log/news/news.notice
|
|
||||||
|
|
||||||
#
|
|
||||||
# Some "catch-all" log files.
|
|
||||||
#
|
|
||||||
*.=debug;\
|
|
||||||
auth,authpriv.none;\
|
|
||||||
news.none;mail.none -/var/log/debug
|
|
||||||
#
|
|
||||||
# Removed as duplicates:
|
|
||||||
#*.=info;*.=notice;*.=warn;\
|
|
||||||
# auth,authpriv.none;\
|
|
||||||
# cron,daemon.none;\
|
|
||||||
# mail,news.none -/var/log/messages
|
|
||||||
#
|
|
||||||
*.=crit;*.=alert;*.=emerg -/var/persist/log/alarms
|
|
||||||
#
|
#
|
||||||
# Emergencies are sent to everybody logged in.
|
# Emergencies are sent to everybody logged in.
|
||||||
#
|
#
|
||||||
*.emerg :omusrmsg:*
|
*.emerg :omusrmsg:*
|
||||||
|
|
||||||
#
|
|
||||||
# I like to have messages displayed on the console, but only on a virtual
|
|
||||||
# console I usually leave idle.
|
|
||||||
#
|
|
||||||
#daemon,mail.*;\
|
|
||||||
# news.=crit;news.=err;news.=notice;\
|
|
||||||
# *.=debug;*.=info;\
|
|
||||||
# *.=notice;*.=warn /dev/tty8
|
|
||||||
|
|
||||||
# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
|
# The named pipe /dev/xconsole is for the `xconsole' utility. To use it,
|
||||||
# you must invoke `xconsole' with the `-file' option:
|
# you must invoke `xconsole' with the `-file' option:
|
||||||
#
|
#
|
||||||
|
@ -68,6 +68,13 @@ while true; do
|
|||||||
sleep 5
|
sleep 5
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo "Regenerating config DB from minigraph..."
|
||||||
|
if [ -f /etc/sonic/init_cfg.json ]; then
|
||||||
|
sonic-cfggen -m -j /etc/sonic/init_cfg.json --print-data > /etc/sonic/config_db.json
|
||||||
|
else
|
||||||
|
sonic-cfggen -m --print-data > /etc/sonic/config_db.json
|
||||||
|
fi
|
||||||
|
|
||||||
# Mark as disabled after graph is successfully downloaded
|
# Mark as disabled after graph is successfully downloaded
|
||||||
sed -i "/enabled=/d" /etc/sonic/updategraph.conf
|
sed -i "/enabled=/d" /etc/sonic/updategraph.conf
|
||||||
echo "enabled=false" >> /etc/sonic/updategraph.conf
|
echo "enabled=false" >> /etc/sonic/updategraph.conf
|
||||||
|
@ -178,7 +178,7 @@ umount "$root_mnt"
|
|||||||
|
|
||||||
# Create a new partition table (content in flash_dev will be deleted)
|
# Create a new partition table (content in flash_dev will be deleted)
|
||||||
err_msg="Error: repartitioning $flash_dev failed"
|
err_msg="Error: repartitioning $flash_dev failed"
|
||||||
cmd="echo ';' | sfdisk $flash_dev"
|
cmd="echo ';' | sfdisk $flash_dev || (sleep 3; blockdev --rereadpt $flash_dev && fdisk -l $flash_dev | grep -q ${root_dev}.*Linux)"
|
||||||
run_cmd "$cmd" "$err_msg"
|
run_cmd "$cmd" "$err_msg"
|
||||||
|
|
||||||
sleep 5
|
sleep 5
|
||||||
|
@ -8,15 +8,18 @@ supervisorctl start rsyslogd
|
|||||||
|
|
||||||
supervisorctl start syncd
|
supervisorctl start syncd
|
||||||
|
|
||||||
# If this platform has an initialization file for the Broadcom LED microprocessor, load it
|
# Function: wait until syncd has created the socket for bcmcmd to connect to
|
||||||
if [ -r ${PLATFORM_DIR}/led_proc_init.soc ]; then
|
wait_syncd() {
|
||||||
# Wait until syncd has created the socket for bcmcmd to connect to
|
|
||||||
while true; do
|
while true; do
|
||||||
if [ -e /var/run/sswsyncd/sswsyncd.socket ]; then
|
if [ -e /var/run/sswsyncd/sswsyncd.socket ]; then
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# If this platform has an initialization file for the Broadcom LED microprocessor, load it
|
||||||
|
if [ -r ${PLATFORM_DIR}/led_proc_init.soc ]; then
|
||||||
|
wait_syncd
|
||||||
/usr/bin/bcmcmd -t 60 "rcload ${PLATFORM_DIR}/led_proc_init.soc"
|
/usr/bin/bcmcmd -t 60 "rcload ${PLATFORM_DIR}/led_proc_init.soc"
|
||||||
fi
|
fi
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 75e84737680f5451eb9c947d01968b972d989bb3
|
Subproject commit a90b9fc5b085cdb99d10d338a23daa66c7f351b2
|
@ -1,7 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
query_retry_count_max="10"
|
query_retry_count_max="10"
|
||||||
required_fw_version="13.1400.0126"
|
|
||||||
fw_file=/etc/mlnx/fw-SPC.mfa
|
fw_file=/etc/mlnx/fw-SPC.mfa
|
||||||
|
|
||||||
run_or_fail() {
|
run_or_fail() {
|
||||||
@ -14,37 +13,35 @@ run_or_fail() {
|
|||||||
|
|
||||||
# wait until devices will be available
|
# wait until devices will be available
|
||||||
query_retry_count="0"
|
query_retry_count="0"
|
||||||
mlxfwmanager --query > /dev/null
|
query_cmd="mlxfwmanager --query -i ${fw_file}"
|
||||||
|
${query_cmd} > /dev/null
|
||||||
|
|
||||||
while [[ (${query_retry_count} -lt ${query_retry_count_max}) && ($? -ne "0") ]]; do
|
while [[ (${query_retry_count} -lt ${query_retry_count_max}) && ($? -ne "0") ]]; do
|
||||||
sleep 1
|
sleep 1
|
||||||
query_retry_count=$[${query_retry_count}+1]
|
query_retry_count=$[${query_retry_count}+1]
|
||||||
mlxfwmanager --query > /dev/null
|
${query_cmd} > /dev/null
|
||||||
done
|
done
|
||||||
|
|
||||||
run_or_fail "mlxfwmanager --query" > /tmp/mlnxfwmanager-query.txt
|
run_or_fail "${query_cmd}" > /tmp/mlnxfwmanager-query.txt
|
||||||
|
|
||||||
# get current firmware version
|
# get current firmware version and required version
|
||||||
found_fw=false
|
fw_info=$(grep FW /tmp/mlnxfwmanager-query.txt)
|
||||||
for word in `cat /tmp/mlnxfwmanager-query.txt`
|
fw_current=$(echo $fw_info | cut -f2 -d' ')
|
||||||
do
|
fw_required=$(echo $fw_info | cut -f3 -d' ')
|
||||||
if [[ ${found_fw} == true ]]; then
|
|
||||||
fw_version=${word}
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
if [[ ${word} == FW ]]; then
|
|
||||||
found_fw=true
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ -z ${fw_version} ]]; then
|
if [[ -z ${fw_current} ]]; then
|
||||||
echo "Could not retreive current FW version."
|
echo "Could not retreive current FW version."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${required_fw_version} == ${fw_version} ]]; then
|
if [[ -z ${fw_required} ]]; then
|
||||||
|
echo "Could not retreive required FW version."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ${fw_current} == ${fw_required} ]]; then
|
||||||
echo "Mellanox firmware is up to date."
|
echo "Mellanox firmware is up to date."
|
||||||
else
|
else
|
||||||
echo "Mellanox firmware required version is ${required_fw_version}. Installing compatible version..."
|
echo "Mellanox firmware required version is ${fw_required}. Installing compatible version..."
|
||||||
run_or_fail "mlxfwmanager -i ${fw_file} -u -f -y"
|
run_or_fail "mlxfwmanager -i ${fw_file} -u -f -y"
|
||||||
fi
|
fi
|
||||||
|
@ -254,31 +254,3 @@ RUN add-apt-repository \
|
|||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-jessie
|
RUN apt-get install -y docker-ce=17.03.2~ce-0~debian-jessie
|
||||||
RUN echo "DOCKER_OPTS=\"--experimental\"" >> /etc/default/docker
|
RUN echo "DOCKER_OPTS=\"--experimental\"" >> /etc/default/docker
|
||||||
|
|
||||||
# Add user
|
|
||||||
ARG user
|
|
||||||
ARG uid
|
|
||||||
ARG guid
|
|
||||||
ARG hostname
|
|
||||||
|
|
||||||
ENV BUILD_HOSTNAME $hostname
|
|
||||||
ENV USER $user
|
|
||||||
|
|
||||||
RUN groupadd -f -r -g $guid g$user
|
|
||||||
|
|
||||||
RUN useradd $user -l -u $uid -g $guid -d /var/$user -m -s /bin/bash
|
|
||||||
|
|
||||||
RUN gpasswd -a $user docker
|
|
||||||
|
|
||||||
# Config git for stg
|
|
||||||
RUN su $user -c "git config --global user.name $user"
|
|
||||||
RUN su $user -c "git config --global user.email $user@contoso.com"
|
|
||||||
|
|
||||||
COPY sonic-jenkins-id_rsa.pub /var/$user/.ssh/authorized_keys2
|
|
||||||
RUN chown $user /var/$user/.ssh -R
|
|
||||||
RUN chmod go= /var/$user/.ssh -R
|
|
||||||
|
|
||||||
# Add user to sudoers
|
|
||||||
RUN echo "$user ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers
|
|
||||||
|
|
||||||
USER $user
|
|
||||||
|
29
sonic-slave/Dockerfile.user
Normal file
29
sonic-slave/Dockerfile.user
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
FROM sonic-slave-base
|
||||||
|
|
||||||
|
# Add user
|
||||||
|
ARG user
|
||||||
|
ARG uid
|
||||||
|
ARG guid
|
||||||
|
ARG hostname
|
||||||
|
|
||||||
|
ENV BUILD_HOSTNAME $hostname
|
||||||
|
ENV USER $user
|
||||||
|
|
||||||
|
RUN groupadd -f -r -g $guid g$user
|
||||||
|
|
||||||
|
RUN useradd $user -l -u $uid -g $guid -d /var/$user -m -s /bin/bash
|
||||||
|
|
||||||
|
RUN gpasswd -a $user docker
|
||||||
|
|
||||||
|
# Config git for stg
|
||||||
|
RUN su $user -c "git config --global user.name $user"
|
||||||
|
RUN su $user -c "git config --global user.email $user@contoso.com"
|
||||||
|
|
||||||
|
COPY sonic-jenkins-id_rsa.pub /var/$user/.ssh/authorized_keys2
|
||||||
|
RUN chown $user /var/$user/.ssh -R
|
||||||
|
RUN chmod go= /var/$user/.ssh -R
|
||||||
|
|
||||||
|
# Add user to sudoers
|
||||||
|
RUN echo "$user ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers
|
||||||
|
|
||||||
|
USER $user
|
@ -249,9 +249,9 @@ def parse_dpg(dpg, hname):
|
|||||||
|
|
||||||
|
|
||||||
def parse_cpg(cpg, hname):
|
def parse_cpg(cpg, hname):
|
||||||
bgp_sessions = []
|
bgp_sessions = {}
|
||||||
myasn = None
|
myasn = None
|
||||||
bgp_peers_with_range = []
|
bgp_peers_with_range = {}
|
||||||
for child in cpg:
|
for child in cpg:
|
||||||
tag = child.tag
|
tag = child.tag
|
||||||
if tag == str(QName(ns, "PeeringSessions")):
|
if tag == str(QName(ns, "PeeringSessions")):
|
||||||
@ -261,17 +261,15 @@ def parse_cpg(cpg, hname):
|
|||||||
end_router = session.find(str(QName(ns, "EndRouter"))).text
|
end_router = session.find(str(QName(ns, "EndRouter"))).text
|
||||||
end_peer = session.find(str(QName(ns, "EndPeer"))).text
|
end_peer = session.find(str(QName(ns, "EndPeer"))).text
|
||||||
if end_router == hname:
|
if end_router == hname:
|
||||||
bgp_sessions.append({
|
bgp_sessions[start_peer] = {
|
||||||
'name': start_router,
|
'name': start_router,
|
||||||
'addr': start_peer,
|
'local_addr': end_peer
|
||||||
'peer_addr': end_peer
|
}
|
||||||
})
|
|
||||||
else:
|
else:
|
||||||
bgp_sessions.append({
|
bgp_sessions[end_peer] = {
|
||||||
'name': end_router,
|
'name': end_router,
|
||||||
'addr': end_peer,
|
'local_addr': start_peer
|
||||||
'peer_addr': start_peer
|
}
|
||||||
})
|
|
||||||
elif child.tag == str(QName(ns, "Routers")):
|
elif child.tag == str(QName(ns, "Routers")):
|
||||||
for router in child.findall(str(QName(ns1, "BGPRouterDeclaration"))):
|
for router in child.findall(str(QName(ns1, "BGPRouterDeclaration"))):
|
||||||
asn = router.find(str(QName(ns1, "ASN"))).text
|
asn = router.find(str(QName(ns1, "ASN"))).text
|
||||||
@ -285,12 +283,13 @@ def parse_cpg(cpg, hname):
|
|||||||
name = bgpPeer.find(str(QName(ns1, "Name"))).text
|
name = bgpPeer.find(str(QName(ns1, "Name"))).text
|
||||||
ip_range = bgpPeer.find(str(QName(ns1, "PeersRange"))).text
|
ip_range = bgpPeer.find(str(QName(ns1, "PeersRange"))).text
|
||||||
ip_range_group = ip_range.split(';') if ip_range and ip_range != "" else []
|
ip_range_group = ip_range.split(';') if ip_range and ip_range != "" else []
|
||||||
bgp_peers_with_range.append({
|
bgp_peers_with_range[name] = {
|
||||||
'name': name,
|
'name': name,
|
||||||
'ip_range': ip_range_group
|
'ip_range': ip_range_group
|
||||||
})
|
}
|
||||||
else:
|
else:
|
||||||
for bgp_session in bgp_sessions:
|
for peer in bgp_sessions:
|
||||||
|
bgp_session = bgp_sessions[peer]
|
||||||
if hostname == bgp_session['name']:
|
if hostname == bgp_session['name']:
|
||||||
bgp_session['asn'] = int(asn)
|
bgp_session['asn'] = int(asn)
|
||||||
|
|
||||||
@ -447,9 +446,9 @@ def parse_xml(filename, platform=None, port_config_file=None):
|
|||||||
# sorting by lambdas are not easily done without custom filters.
|
# sorting by lambdas are not easily done without custom filters.
|
||||||
# TODO: add jinja2 filter to accept a lambda to sort a list of dictionaries by attribute.
|
# TODO: add jinja2 filter to accept a lambda to sort a list of dictionaries by attribute.
|
||||||
# TODO: alternatively (preferred), implement class containers for multiple-attribute entries, enabling sort by attr
|
# TODO: alternatively (preferred), implement class containers for multiple-attribute entries, enabling sort by attr
|
||||||
results['minigraph_bgp'] = sorted(bgp_sessions, key=lambda x: x['addr'])
|
results['BGP_NEIGHBOR'] = bgp_sessions
|
||||||
results['minigraph_bgp_asn'] = bgp_asn
|
results['DEVICE_METADATA'] = {'localhost': { 'bgp_asn': bgp_asn }}
|
||||||
results['minigraph_bgp_peers_with_range'] = bgp_peers_with_range
|
results['BGP_PEER_RANGE'] = bgp_peers_with_range
|
||||||
# TODO: sort does not work properly on all interfaces of varying lengths. Need to sort by integer group(s).
|
# TODO: sort does not work properly on all interfaces of varying lengths. Need to sort by integer group(s).
|
||||||
|
|
||||||
phyport_intfs = []
|
phyport_intfs = []
|
||||||
|
@ -73,37 +73,25 @@ TODO(taoyl): Current version of config db only supports BGP admin states.
|
|||||||
"""
|
"""
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def db_to_output(db_data):
|
def db_to_output(db_data):
|
||||||
data_bgp_admin = {}
|
return db_data
|
||||||
for table_name, content in db_data.iteritems():
|
|
||||||
if table_name == 'BGP_NEIGHBOR':
|
|
||||||
for key, value in content.iteritems():
|
|
||||||
if value.has_key('admin_status'):
|
|
||||||
data_bgp_admin[key] = (value['admin_status'] == 'up')
|
|
||||||
elif table_name == 'DEVICE_METADATA':
|
|
||||||
if content['localhost'].has_key('bgp_default_status'):
|
|
||||||
data_bgp_admin['all'] = (content['localhost']['bgp_default_status'] == 'up')
|
|
||||||
|
|
||||||
output_data = {'bgp_admin_state': data_bgp_admin} if data_bgp_admin else {}
|
|
||||||
return output_data
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def output_to_db(output_data):
|
def output_to_db(output_data):
|
||||||
db_data = {}
|
db_data = {}
|
||||||
for key, value in output_data.iteritems():
|
for table_name in output_data:
|
||||||
if key == 'bgp_admin_state':
|
if table_name == 'BGP_NEIGHBOR' or table_name == 'BGP_PEER_RANGE' or table_name == 'DEVICE_METADATA':
|
||||||
for neighbor, state in value.iteritems():
|
db_data[table_name] = output_data[table_name]
|
||||||
if neighbor == 'all':
|
|
||||||
if not db_data.has_key('DEVICE_METADATA'):
|
|
||||||
db_data['DEVICE_METADATA'] = {'localhost': {}}
|
|
||||||
db_data['DEVICE_METADATA']['localhost']['bgp_default_status'] = 'up' if state else 'down'
|
|
||||||
else:
|
|
||||||
if not db_data.has_key('BGP_NEIGHBOR'):
|
|
||||||
db_data['BGP_NEIGHBOR'] = {}
|
|
||||||
if not db_data['BGP_NEIGHBOR'].has_key(neighbor):
|
|
||||||
db_data['BGP_NEIGHBOR'][neighbor] = {}
|
|
||||||
db_data['BGP_NEIGHBOR'][neighbor]['admin_status'] = 'up' if state else 'down'
|
|
||||||
return db_data
|
return db_data
|
||||||
|
|
||||||
|
def deep_update(dst, src):
|
||||||
|
for key, value in src.iteritems():
|
||||||
|
if isinstance(value, dict):
|
||||||
|
node = dst.setdefault(key, {})
|
||||||
|
deep_update(node, value)
|
||||||
|
else:
|
||||||
|
dst[key] = value
|
||||||
|
return dst
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser=argparse.ArgumentParser(description="Render configuration file from minigraph data and jinja2 template.")
|
parser=argparse.ArgumentParser(description="Render configuration file from minigraph data and jinja2 template.")
|
||||||
@ -126,7 +114,7 @@ def main():
|
|||||||
data = {}
|
data = {}
|
||||||
machine_info = get_machine_info()
|
machine_info = get_machine_info()
|
||||||
if machine_info != None:
|
if machine_info != None:
|
||||||
data.update(machine_info)
|
deep_update(data, machine_info)
|
||||||
platform_info = get_platform_info(machine_info)
|
platform_info = get_platform_info(machine_info)
|
||||||
if platform_info != None:
|
if platform_info != None:
|
||||||
data['platform'] = platform_info
|
data['platform'] = platform_info
|
||||||
@ -135,34 +123,34 @@ def main():
|
|||||||
minigraph = args.minigraph
|
minigraph = args.minigraph
|
||||||
if data.has_key('platform'):
|
if data.has_key('platform'):
|
||||||
if args.port_config != None:
|
if args.port_config != None:
|
||||||
data.update(parse_xml(minigraph, data['platform'], args.port_config))
|
deep_update(data, parse_xml(minigraph, data['platform'], args.port_config))
|
||||||
else:
|
else:
|
||||||
data.update(parse_xml(minigraph, data['platform']))
|
deep_update(data, parse_xml(minigraph, data['platform']))
|
||||||
else:
|
else:
|
||||||
if args.port_config != None:
|
if args.port_config != None:
|
||||||
data.update(parse_xml(minigraph, port_config_file=args.port_config))
|
deep_update(data, parse_xml(minigraph, port_config_file=args.port_config))
|
||||||
else:
|
else:
|
||||||
data.update(parse_xml(minigraph))
|
deep_update(data, parse_xml(minigraph))
|
||||||
|
|
||||||
if args.device_description != None:
|
if args.device_description != None:
|
||||||
data.update(parse_device_desc_xml(args.device_description))
|
deep_update(data, parse_device_desc_xml(args.device_description))
|
||||||
|
|
||||||
for yaml_file in args.yaml:
|
for yaml_file in args.yaml:
|
||||||
with open(yaml_file, 'r') as stream:
|
with open(yaml_file, 'r') as stream:
|
||||||
additional_data = yaml.load(stream)
|
additional_data = yaml.load(stream)
|
||||||
data.update(additional_data)
|
deep_update(data, additional_data)
|
||||||
|
|
||||||
for json_file in args.json:
|
for json_file in args.json:
|
||||||
with open(json_file, 'r') as stream:
|
with open(json_file, 'r') as stream:
|
||||||
data.update(json.load(stream))
|
deep_update(data, json.load(stream))
|
||||||
|
|
||||||
if args.additional_data != None:
|
if args.additional_data != None:
|
||||||
data.update(json.loads(args.additional_data))
|
deep_update(data, json.loads(args.additional_data))
|
||||||
|
|
||||||
if args.from_db:
|
if args.from_db:
|
||||||
configdb = ConfigDBConnector()
|
configdb = ConfigDBConnector()
|
||||||
configdb.connect()
|
configdb.connect()
|
||||||
data.update(FormatConverter.db_to_output(configdb.get_config()))
|
deep_update(data, FormatConverter.db_to_output(configdb.get_config()))
|
||||||
|
|
||||||
if args.template != None:
|
if args.template != None:
|
||||||
template_file = os.path.abspath(args.template)
|
template_file = os.path.abspath(args.template)
|
||||||
|
@ -111,7 +111,7 @@ class TestCfgGen(TestCase):
|
|||||||
self.assertEqual(output.strip(), "{'Ethernet116': {'name': 'ARISTA02T1', 'port': 'Ethernet1/1'}, 'Ethernet124': {'name': 'ARISTA04T1', 'port': 'Ethernet1/1'}, 'Ethernet112': {'name': 'ARISTA01T1', 'port': 'Ethernet1/1'}, 'Ethernet120': {'name': 'ARISTA03T1', 'port': 'Ethernet1/1'}}")
|
self.assertEqual(output.strip(), "{'Ethernet116': {'name': 'ARISTA02T1', 'port': 'Ethernet1/1'}, 'Ethernet124': {'name': 'ARISTA04T1', 'port': 'Ethernet1/1'}, 'Ethernet112': {'name': 'ARISTA01T1', 'port': 'Ethernet1/1'}, 'Ethernet120': {'name': 'ARISTA03T1', 'port': 'Ethernet1/1'}}")
|
||||||
|
|
||||||
def test_minigraph_peers_with_range(self):
|
def test_minigraph_peers_with_range(self):
|
||||||
argument = '-m "' + self.sample_graph_bgp_speaker + '" -p "' + self.port_config + '" -v minigraph_bgp_peers_with_range'
|
argument = '-m "' + self.sample_graph_bgp_speaker + '" -p "' + self.port_config + '" -v BGP_PEER_RANGE.values\(\)'
|
||||||
output = self.run_script(argument)
|
output = self.run_script(argument)
|
||||||
self.assertEqual(output.strip(), "[{'name': 'BGPSLBPassive', 'ip_range': ['10.10.10.10/26', '100.100.100.100/26']}]")
|
self.assertEqual(output.strip(), "[{'name': 'BGPSLBPassive', 'ip_range': ['10.10.10.10/26', '100.100.100.100/26']}]")
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit f0a32153728f7e2de6d4624a1d352ae85c8a4406
|
Subproject commit 47122bfbc1b0adf4e266bd1cf8abd92c48dbc3ca
|
@ -1 +1 @@
|
|||||||
Subproject commit 72cd3f6c4c174d7341f95dbd3b5ecc4f5debf362
|
Subproject commit 12b86e707669c54b58fa1106b5eecd5e16523e39
|
@ -1 +1 @@
|
|||||||
Subproject commit 6c7e22362fbc05ba455e7e336e2a88430de0de18
|
Subproject commit c7f6ff677b54eb401e7b2fd3a3d9c4072325bb78
|
Loading…
Reference in New Issue
Block a user