[devices]: Added new Mellanox MSN2010 platform (#24)
This commit is contained in:
parent
cbf204ba01
commit
d50332f6f0
@ -0,0 +1,23 @@
|
||||
# name lanes
|
||||
Ethernet0 0
|
||||
Ethernet4 4
|
||||
Ethernet8 8
|
||||
Ethernet12 12
|
||||
Ethernet16 16
|
||||
Ethernet20 20
|
||||
Ethernet24 24
|
||||
Ethernet28 28
|
||||
Ethernet32 32
|
||||
Ethernet36 36
|
||||
Ethernet40 40
|
||||
Ethernet44 44
|
||||
Ethernet48 48
|
||||
Ethernet52 52
|
||||
Ethernet56 56
|
||||
Ethernet60 60
|
||||
Ethernet64 64
|
||||
Ethernet68 68
|
||||
Ethernet72 72,73,74,75
|
||||
Ethernet76 76,77,78,79
|
||||
Ethernet80 80,81,82,83
|
||||
Ethernet84 84,85,86,87
|
@ -0,0 +1 @@
|
||||
SAI_INIT_CONFIG_FILE=/usr/share/sai_2010.xml
|
1
device/mellanox/x86_64-mlnx_msn2010-r0/installer.conf
Normal file
1
device/mellanox/x86_64-mlnx_msn2010-r0/installer.conf
Normal file
@ -0,0 +1 @@
|
||||
ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="acpi_enforce_resources=lax acpi=noirq"
|
855
device/mellanox/x86_64-mlnx_msn2010-r0/minigraph.xml
Normal file
855
device/mellanox/x86_64-mlnx_msn2010-r0/minigraph.xml
Normal file
@ -0,0 +1,855 @@
|
||||
<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>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA01T0</StartRouter>
|
||||
<StartPeer>10.0.0.33</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.32</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.0</StartPeer>
|
||||
<EndRouter>ARISTA01T2</EndRouter>
|
||||
<EndPeer>10.0.0.1</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA02T0</StartRouter>
|
||||
<StartPeer>10.0.0.35</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.34</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.2</StartPeer>
|
||||
<EndRouter>ARISTA02T2</EndRouter>
|
||||
<EndPeer>10.0.0.3</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA03T0</StartRouter>
|
||||
<StartPeer>10.0.0.37</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.36</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.4</StartPeer>
|
||||
<EndRouter>ARISTA03T2</EndRouter>
|
||||
<EndPeer>10.0.0.5</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA04T0</StartRouter>
|
||||
<StartPeer>10.0.0.39</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.38</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.6</StartPeer>
|
||||
<EndRouter>ARISTA04T2</EndRouter>
|
||||
<EndPeer>10.0.0.7</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA05T0</StartRouter>
|
||||
<StartPeer>10.0.0.41</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.40</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.8</StartPeer>
|
||||
<EndRouter>ARISTA05T2</EndRouter>
|
||||
<EndPeer>10.0.0.9</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA06T0</StartRouter>
|
||||
<StartPeer>10.0.0.43</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.42</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.10</StartPeer>
|
||||
<EndRouter>ARISTA06T2</EndRouter>
|
||||
<EndPeer>10.0.0.11</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA07T0</StartRouter>
|
||||
<StartPeer>10.0.0.45</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.44</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.12</StartPeer>
|
||||
<EndRouter>ARISTA07T2</EndRouter>
|
||||
<EndPeer>10.0.0.13</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA08T0</StartRouter>
|
||||
<StartPeer>10.0.0.47</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.46</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.14</StartPeer>
|
||||
<EndRouter>ARISTA08T2</EndRouter>
|
||||
<EndPeer>10.0.0.15</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA09T0</StartRouter>
|
||||
<StartPeer>10.0.0.49</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.48</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.16</StartPeer>
|
||||
<EndRouter>ARISTA09T2</EndRouter>
|
||||
<EndPeer>10.0.0.17</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA10T0</StartRouter>
|
||||
<StartPeer>10.0.0.51</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.50</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.18</StartPeer>
|
||||
<EndRouter>ARISTA10T2</EndRouter>
|
||||
<EndPeer>10.0.0.19</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA11T0</StartRouter>
|
||||
<StartPeer>10.0.0.53</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.52</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.20</StartPeer>
|
||||
<EndRouter>ARISTA11T2</EndRouter>
|
||||
<EndPeer>10.0.0.21</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA12T0</StartRouter>
|
||||
<StartPeer>10.0.0.55</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.54</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.22</StartPeer>
|
||||
<EndRouter>ARISTA12T2</EndRouter>
|
||||
<EndPeer>10.0.0.23</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA13T0</StartRouter>
|
||||
<StartPeer>10.0.0.57</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.56</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.24</StartPeer>
|
||||
<EndRouter>ARISTA13T2</EndRouter>
|
||||
<EndPeer>10.0.0.25</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA14T0</StartRouter>
|
||||
<StartPeer>10.0.0.59</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.58</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.26</StartPeer>
|
||||
<EndRouter>ARISTA14T2</EndRouter>
|
||||
<EndPeer>10.0.0.27</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA15T0</StartRouter>
|
||||
<StartPeer>10.0.0.61</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.60</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.28</StartPeer>
|
||||
<EndRouter>ARISTA15T2</EndRouter>
|
||||
<EndPeer>10.0.0.29</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>ARISTA16T0</StartRouter>
|
||||
<StartPeer>10.0.0.63</StartPeer>
|
||||
<EndRouter>sonic</EndRouter>
|
||||
<EndPeer>10.0.0.62</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
<BGPSession>
|
||||
<StartRouter>sonic</StartRouter>
|
||||
<StartPeer>10.0.0.30</StartPeer>
|
||||
<EndRouter>ARISTA16T2</EndRouter>
|
||||
<EndPeer>10.0.0.31</EndPeer>
|
||||
<Multihop>1</Multihop>
|
||||
<HoldTime>180</HoldTime>
|
||||
<KeepAliveTime>60</KeepAliveTime>
|
||||
</BGPSession>
|
||||
</PeeringSessions>
|
||||
<Routers xmlns:a="http://schemas.datacontract.org/2004/07/Microsoft.Search.Autopilot.Evolution">
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>65100</a:ASN>
|
||||
<a:Hostname>sonic</a:Hostname>
|
||||
<a:Peers>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.33</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.1</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.35</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.3</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.37</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.5</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.39</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.7</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.41</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.9</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.43</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.11</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.45</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.13</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.47</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.15</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.49</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.17</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.51</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.19</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.53</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.21</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.55</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.23</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.57</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.25</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.59</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.27</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.61</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.29</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.63</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
<BGPPeer>
|
||||
<Address>10.0.0.31</Address>
|
||||
<RouteMapIn i:nil="true"/>
|
||||
<RouteMapOut i:nil="true"/>
|
||||
</BGPPeer>
|
||||
</a:Peers>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>64001</a:ASN>
|
||||
<a:Hostname>ARISTA01T0</a:Hostname>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>65200</a:ASN>
|
||||
<a:Hostname>ARISTA01T2</a:Hostname>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>64002</a:ASN>
|
||||
<a:Hostname>ARISTA02T0</a:Hostname>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>65200</a:ASN>
|
||||
<a:Hostname>ARISTA02T2</a:Hostname>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>64003</a:ASN>
|
||||
<a:Hostname>ARISTA03T0</a:Hostname>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>65200</a:ASN>
|
||||
<a:Hostname>ARISTA03T2</a:Hostname>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>64004</a:ASN>
|
||||
<a:Hostname>ARISTA04T0</a:Hostname>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>65200</a:ASN>
|
||||
<a:Hostname>ARISTA04T2</a:Hostname>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>64005</a:ASN>
|
||||
<a:Hostname>ARISTA05T0</a:Hostname>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>65200</a:ASN>
|
||||
<a:Hostname>ARISTA05T2</a:Hostname>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
<a:BGPRouterDeclaration>
|
||||
<a:ASN>64006</a:ASN>
|
||||
<a:Hostname>ARISTA06T0</a:Hostname>
|
||||
<a:RouteMaps/>
|
||||
</a:BGPRouterDeclaration>
|
||||
</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>Ethernet0</AttachTo>
|
||||
<Prefix>10.0.0.0/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet4</AttachTo>
|
||||
<Prefix>10.0.0.2/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet8</AttachTo>
|
||||
<Prefix>10.0.0.4/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet12</AttachTo>
|
||||
<Prefix>10.0.0.6/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet16</AttachTo>
|
||||
<Prefix>10.0.0.8/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet20</AttachTo>
|
||||
<Prefix>10.0.0.10/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet24</AttachTo>
|
||||
<Prefix>10.0.0.12/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet28</AttachTo>
|
||||
<Prefix>10.0.0.14/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet32</AttachTo>
|
||||
<Prefix>10.0.0.16/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet36</AttachTo>
|
||||
<Prefix>10.0.0.18/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet40</AttachTo>
|
||||
<Prefix>10.0.0.20/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet44</AttachTo>
|
||||
<Prefix>10.0.0.22/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet48</AttachTo>
|
||||
<Prefix>10.0.0.24/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet52</AttachTo>
|
||||
<Prefix>10.0.0.26/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet56</AttachTo>
|
||||
<Prefix>10.0.0.28/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet60</AttachTo>
|
||||
<Prefix>10.0.0.30/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet64</AttachTo>
|
||||
<Prefix>10.0.0.32/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet68</AttachTo>
|
||||
<Prefix>10.0.0.34/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet72</AttachTo>
|
||||
<Prefix>10.0.0.36/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet76</AttachTo>
|
||||
<Prefix>10.0.0.38/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet80</AttachTo>
|
||||
<Prefix>10.0.0.40/31</Prefix>
|
||||
</IPInterface>
|
||||
<IPInterface>
|
||||
<Name i:Name="true"/>
|
||||
<AttachTo>Ethernet84</AttachTo>
|
||||
<Prefix>10.0.0.42/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</EndDevice>
|
||||
<EndPort>Ethernet0</EndPort>
|
||||
<StartDevice>ARISTA01T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet4</EndPort>
|
||||
<StartDevice>ARISTA02T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet8</EndPort>
|
||||
<StartDevice>ARISTA03T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet12</EndPort>
|
||||
<StartDevice>ARISTA04T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet16</EndPort>
|
||||
<StartDevice>ARISTA05T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet20</EndPort>
|
||||
<StartDevice>ARISTA06T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet24</EndPort>
|
||||
<StartDevice>ARISTA07T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet28</EndPort>
|
||||
<StartDevice>ARISTA08T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet32</EndPort>
|
||||
<StartDevice>ARISTA09T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet36</EndPort>
|
||||
<StartDevice>ARISTA10T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet40</EndPort>
|
||||
<StartDevice>ARISTA11T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet44</EndPort>
|
||||
<StartDevice>ARISTA12T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet48</EndPort>
|
||||
<StartDevice>ARISTA13T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet52</EndPort>
|
||||
<StartDevice>ARISTA14T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet56</EndPort>
|
||||
<StartDevice>ARISTA15T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet60</EndPort>
|
||||
<StartDevice>ARISTA16T2</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet64</EndPort>
|
||||
<StartDevice>ARISTA01T0</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet68</EndPort>
|
||||
<StartDevice>ARISTA02T0</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet72</EndPort>
|
||||
<StartDevice>ARISTA03T0</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet76</EndPort>
|
||||
<StartDevice>ARISTA04T0</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet80</EndPort>
|
||||
<StartDevice>ARISTA05T0</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
<DeviceLinkBase>
|
||||
<ElementType>DeviceInterfaceLink</ElementType>
|
||||
<EndDevice>sonic</EndDevice>
|
||||
<EndPort>Ethernet84</EndPort>
|
||||
<StartDevice>ARISTA06T0</StartDevice>
|
||||
<StartPort>Ethernet1</StartPort>
|
||||
</DeviceLinkBase>
|
||||
</DeviceInterfaceLinks>
|
||||
<Devices>
|
||||
<Device i:type="LeafRouter">
|
||||
<Hostname>sonic</Hostname>
|
||||
<HwSku>ACS-MSN2010</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>ACS-MSN2010</HwSku>
|
||||
</DeviceMiniGraph>
|
||||
|
32
device/mellanox/x86_64-mlnx_msn2010-r0/plugins/eeprom.py
Normal file
32
device/mellanox/x86_64-mlnx_msn2010-r0/plugins/eeprom.py
Normal file
@ -0,0 +1,32 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
#############################################################################
|
||||
# Mellanox
|
||||
#
|
||||
# Platform and model specific eeprom subclass, inherits from the base class,
|
||||
# and provides the followings:
|
||||
# - the eeprom format definition
|
||||
# - specific encoder/decoder if there is special need
|
||||
#############################################################################
|
||||
|
||||
try:
|
||||
import exceptions
|
||||
import binascii
|
||||
import time
|
||||
import optparse
|
||||
import warnings
|
||||
import os
|
||||
import sys
|
||||
from sonic_eeprom import eeprom_base
|
||||
from sonic_eeprom import eeprom_tlvinfo
|
||||
import subprocess
|
||||
except ImportError, e:
|
||||
raise ImportError (str(e) + "- required module not found")
|
||||
|
||||
class board(eeprom_tlvinfo.TlvInfoDecoder):
|
||||
|
||||
_TLV_INFO_MAX_LEN = 256
|
||||
|
||||
def __init__(self, name, path, cpld_root, ro):
|
||||
self.eeprom_path = "/bsp/eeprom/vpd_info"
|
||||
super(board, self).__init__(self.eeprom_path, 0, '', True)
|
73
device/mellanox/x86_64-mlnx_msn2010-r0/plugins/psuutil.py
Normal file
73
device/mellanox/x86_64-mlnx_msn2010-r0/plugins/psuutil.py
Normal file
@ -0,0 +1,73 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
#############################################################################
|
||||
# Mellanox
|
||||
#
|
||||
# Module contains an implementation of SONiC PSU Base API and
|
||||
# provides the PSUs status which are available in the platform
|
||||
#
|
||||
#############################################################################
|
||||
|
||||
import os.path
|
||||
|
||||
try:
|
||||
from sonic_psu.psu_base import PsuBase
|
||||
except ImportError as e:
|
||||
raise ImportError (str(e) + "- required module not found")
|
||||
|
||||
class PsuUtil(PsuBase):
|
||||
"""Platform-specific PSUutil class"""
|
||||
|
||||
def __init__(self):
|
||||
PsuBase.__init__(self)
|
||||
|
||||
self.psu_path = "/bsp/module/"
|
||||
self.psu_presence = "psu{}_pwr_status"
|
||||
self.psu_oper_status = "psu{}_pwr_status"
|
||||
|
||||
def get_num_psus(self):
|
||||
"""
|
||||
Retrieves the number of PSUs available on the device
|
||||
|
||||
:return: An integer, the number of PSUs available on the device
|
||||
"""
|
||||
return 2
|
||||
|
||||
def get_psu_status(self, index):
|
||||
"""
|
||||
Retrieves the oprational status of power supply unit (PSU) defined
|
||||
by 1-based index <index>
|
||||
|
||||
:param index: An integer, 1-based index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is operating properly, False if PSU is faulty
|
||||
"""
|
||||
if index is None:
|
||||
return False
|
||||
|
||||
status = 0
|
||||
try:
|
||||
with open(self.psu_path + self.psu_oper_status.format(index), 'r') as power_status:
|
||||
status = int(power_status.read())
|
||||
except IOError:
|
||||
return False
|
||||
|
||||
return status == 1
|
||||
|
||||
def get_psu_presence(self, index):
|
||||
"""
|
||||
Retrieves the presence status of power supply unit (PSU) defined
|
||||
by 1-based index <index>
|
||||
|
||||
:param index: An integer, 1-based index of the PSU of which to query status
|
||||
:return: Boolean, True if PSU is plugged, False if not
|
||||
"""
|
||||
if index is None:
|
||||
return False
|
||||
|
||||
try:
|
||||
with open(self.psu_path + self.psu_presence.format(index), 'r') as presence_status:
|
||||
return True
|
||||
except IOError:
|
||||
return False
|
||||
|
||||
return False
|
43
device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfplpmget.py
Normal file
43
device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfplpmget.py
Normal file
@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys, errno
|
||||
import os
|
||||
from python_sdk_api.sxd_api import *
|
||||
from python_sdk_api.sx_api import *
|
||||
|
||||
# Check if SFP port number is provided
|
||||
if len(sys.argv) < 2:
|
||||
print "SFP module number is missed."
|
||||
print "Usage: sfplpmget.py <SFP module>"
|
||||
sys.exit(errno.EINVAL)
|
||||
|
||||
# Init SDK API
|
||||
rc, handle = sx_api_open(None)
|
||||
if (rc != SX_STATUS_SUCCESS):
|
||||
print "Failed to open api handle.\nPlease check that SDK is running."
|
||||
sys.exit(errno.EACCES)
|
||||
|
||||
pid = os.getpid()
|
||||
rc = sxd_access_reg_init(pid, None, 0)
|
||||
if (rc != 0):
|
||||
print "Failed to initializing register access.\nPlease check that SDK is running."
|
||||
sys.exit(errno.EACCES)
|
||||
|
||||
# Get SFP module number
|
||||
sfp_module = int(sys.argv[1])
|
||||
|
||||
# Get MCION
|
||||
mcion = ku_mcion_reg()
|
||||
mcion.module = sfp_module
|
||||
meta = sxd_reg_meta_t()
|
||||
meta.dev_id = 1
|
||||
meta.swid = 0
|
||||
meta.access_cmd = SXD_ACCESS_CMD_GET
|
||||
|
||||
rc = sxd_access_reg_mcion(mcion, meta, 1, None, None)
|
||||
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_mcion failed, rc = %d" % rc
|
||||
|
||||
# Get low power mode status
|
||||
lpm_mask = 1 << 8
|
||||
lpm_status = (lpm_mask & mcion.module_status_bits) != 0
|
||||
print "LPM ON" if lpm_status else "LPM OFF"
|
107
device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfplpmset.py
Normal file
107
device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfplpmset.py
Normal file
@ -0,0 +1,107 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys, errno
|
||||
import time
|
||||
import os
|
||||
from python_sdk_api.sxd_api import *
|
||||
from python_sdk_api.sx_api import *
|
||||
|
||||
def get_log_ports(handle, sfp_module):
|
||||
port_attributes_list = new_sx_port_attributes_t_arr(64)
|
||||
port_cnt_p = new_uint32_t_p()
|
||||
uint32_t_p_assign(port_cnt_p, 64)
|
||||
|
||||
rc = sx_api_port_device_get(handle, 1 , 0, port_attributes_list, port_cnt_p)
|
||||
assert rc == SX_STATUS_SUCCESS, "sx_api_port_device_get failed, rc = %d" % rc
|
||||
|
||||
port_cnt = uint32_t_p_value(port_cnt_p)
|
||||
log_port_list = []
|
||||
for i in range(0, port_cnt):
|
||||
port_attributes = sx_port_attributes_t_arr_getitem(port_attributes_list, i)
|
||||
if port_attributes.port_mapping.module_port == sfp_module:
|
||||
log_port_list.append(port_attributes.log_port)
|
||||
|
||||
return log_port_list
|
||||
|
||||
def set_sfp_admin_status(handle, meta, sfp_module, sfp_log_port_list, admin_status):
|
||||
# Get PMAOS
|
||||
pmaos = ku_pmaos_reg()
|
||||
pmaos.module = sfp_module
|
||||
meta.access_cmd = SXD_ACCESS_CMD_GET
|
||||
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
|
||||
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
|
||||
|
||||
# Set admin status to PMAOS
|
||||
pmaos.ase = 1
|
||||
pmaos.ee = 1
|
||||
pmaos.e = 2
|
||||
pmaos.rst = 0
|
||||
if admin_status == SX_PORT_ADMIN_STATUS_DOWN:
|
||||
pmaos.admin_status = 2
|
||||
else:
|
||||
pmaos.admin_status = 1
|
||||
|
||||
meta.access_cmd = SXD_ACCESS_CMD_SET
|
||||
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
|
||||
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
|
||||
|
||||
# Check if SFP port number is provided
|
||||
if len(sys.argv) < 3:
|
||||
print "SFP module number or LPM is missed."
|
||||
print "Usage: sfplpmset.py <SFP module> <on|off>"
|
||||
sys.exit(errno.EINVAL)
|
||||
|
||||
lpm_enable = None
|
||||
if sys.argv[2] == 'on':
|
||||
lpm_enable = True
|
||||
elif sys.argv[2] == 'off':
|
||||
lpm_enable = False
|
||||
else:
|
||||
print "Unrecognized LPM parameter. Please use <on> or <off> values"
|
||||
sys.exit(errno.EINVAL)
|
||||
|
||||
# Init SDK API
|
||||
rc, handle = sx_api_open(None)
|
||||
if (rc != SX_STATUS_SUCCESS):
|
||||
print "Failed to open api handle.\nPlease check that SDK is running."
|
||||
sys.exit(errno.EACCES)
|
||||
|
||||
pid = os.getpid()
|
||||
rc = sxd_access_reg_init(pid, None, 0)
|
||||
if (rc != 0):
|
||||
print "Failed to initializing register access.\nPlease check that SDK is running."
|
||||
sys.exit(errno.EACCES);
|
||||
|
||||
# Get SFP module and log ports number and LPM status
|
||||
sfp_module = int(sys.argv[1])
|
||||
log_port_list = get_log_ports(handle, sfp_module)
|
||||
if not log_port_list:
|
||||
print "Failed to get log ports"
|
||||
sys.exit(errno.EACCES)
|
||||
|
||||
# Get PMMP
|
||||
pmmp = ku_pmmp_reg()
|
||||
pmmp.module = sfp_module
|
||||
meta = sxd_reg_meta_t()
|
||||
meta.dev_id = 1
|
||||
meta.swid = 0
|
||||
meta.access_cmd = SXD_ACCESS_CMD_GET
|
||||
rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None)
|
||||
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc
|
||||
|
||||
# Disable admin status before LPM settings
|
||||
set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_DOWN)
|
||||
|
||||
# Set low power mode status
|
||||
lpm_mask = 1 << 8
|
||||
if lpm_enable:
|
||||
pmmp.eeprom_override = pmmp.eeprom_override | lpm_mask
|
||||
else:
|
||||
pmmp.eeprom_override = pmmp.eeprom_override & (~lpm_mask)
|
||||
|
||||
meta.access_cmd = SXD_ACCESS_CMD_SET
|
||||
rc = sxd_access_reg_pmmp(pmmp, meta, 1, None, None)
|
||||
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmmp failed, rc = %d" % rc
|
||||
|
||||
# Enable admin status after LPM settings
|
||||
set_sfp_admin_status(handle, meta, sfp_module, log_port_list, SX_PORT_ADMIN_STATUS_UP)
|
45
device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfpreset.py
Normal file
45
device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfpreset.py
Normal file
@ -0,0 +1,45 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
import sys, errno
|
||||
import os
|
||||
from python_sdk_api.sxd_api import *
|
||||
from python_sdk_api.sx_api import *
|
||||
|
||||
# Check if SFP port number is provided
|
||||
if len(sys.argv) < 2:
|
||||
print "SFP module number or LPM is missed."
|
||||
print "Usage: sfpreset.py <SFP module>"
|
||||
sys.exit(errno.EINVAL)
|
||||
|
||||
# Init SDK API
|
||||
rc, handle = sx_api_open(None)
|
||||
if (rc != SX_STATUS_SUCCESS):
|
||||
print "Failed to open api handle.\nPlease check that SDK is running."
|
||||
sys.exit(errno.EACCES)
|
||||
|
||||
pid = os.getpid()
|
||||
rc = sxd_access_reg_init(pid, None, 0)
|
||||
if (rc != 0):
|
||||
print "Failed to initializing register access.\nPlease check that SDK is running."
|
||||
sys.exit(errno.EACCES)
|
||||
|
||||
# Get SFP module number
|
||||
sfp_module = int(sys.argv[1])
|
||||
|
||||
# Get PMAOS
|
||||
pmaos = ku_pmaos_reg()
|
||||
pmaos.module = sfp_module
|
||||
meta = sxd_reg_meta_t()
|
||||
meta.dev_id = 1
|
||||
meta.swid = 0
|
||||
meta.access_cmd = SXD_ACCESS_CMD_GET
|
||||
|
||||
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
|
||||
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
|
||||
|
||||
# Reset SFP
|
||||
pmaos.rst = 1
|
||||
meta.access_cmd = SXD_ACCESS_CMD_SET
|
||||
rc = sxd_access_reg_pmaos(pmaos, meta, 1, None, None)
|
||||
assert rc == SXD_STATUS_SUCCESS, "sxd_access_reg_pmaos failed, rc = %d" % rc
|
||||
print "Reset flag is set"
|
151
device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfputil.py
Normal file
151
device/mellanox/x86_64-mlnx_msn2010-r0/plugins/sfputil.py
Normal file
@ -0,0 +1,151 @@
|
||||
# sfputil.py
|
||||
#
|
||||
# Platform-specific SFP transceiver interface for SONiC
|
||||
#
|
||||
|
||||
try:
|
||||
import time
|
||||
import subprocess
|
||||
from sonic_sfp.sfputilbase import SfpUtilBase
|
||||
except ImportError as e:
|
||||
raise ImportError("%s - required module not found" % str(e))
|
||||
|
||||
|
||||
class SfpUtil(SfpUtilBase):
|
||||
"""Platform-specific SfpUtil class"""
|
||||
|
||||
PORT_START = 0
|
||||
PORT_END = 55
|
||||
PORTS_IN_BLOCK = 56
|
||||
|
||||
EEPROM_OFFSET = 1
|
||||
|
||||
_port_to_eeprom_mapping = {}
|
||||
|
||||
@property
|
||||
def port_start(self):
|
||||
return self.PORT_START
|
||||
|
||||
@property
|
||||
def port_end(self):
|
||||
return self.PORT_END
|
||||
|
||||
@property
|
||||
def qsfp_ports(self):
|
||||
return range(0, self.PORTS_IN_BLOCK + 1)
|
||||
|
||||
@property
|
||||
def port_to_eeprom_mapping(self):
|
||||
return self._port_to_eeprom_mapping
|
||||
|
||||
def __init__(self):
|
||||
eeprom_path = "/bsp/qsfp/qsfp{0}"
|
||||
|
||||
for x in range(0, self.port_end + 1):
|
||||
self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET)
|
||||
|
||||
SfpUtilBase.__init__(self)
|
||||
|
||||
def get_presence(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
try:
|
||||
reg_file = open("/bsp/qsfp/qsfp%d_status" % (port_num+1))
|
||||
except IOError as e:
|
||||
print "Error: unable to open file: %s" % str(e)
|
||||
return False
|
||||
|
||||
content = reg_file.readline().rstrip()
|
||||
|
||||
# content is a string with the qsfp status
|
||||
if content == "1":
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def get_low_power_mode(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmget.py {}".format(port_num)
|
||||
|
||||
try:
|
||||
output = subprocess.check_output(lpm_cmd, shell=True)
|
||||
if 'LPM ON' in output:
|
||||
return True
|
||||
except subprocess.CalledProcessError as e:
|
||||
print "Error! Unable to get LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
|
||||
return False
|
||||
|
||||
return False
|
||||
|
||||
def set_low_power_mode(self, port_num, lpmode):
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
curr_lpmode = self.get_low_power_mode(port_num)
|
||||
if curr_lpmode == lpmode:
|
||||
return True
|
||||
|
||||
lpm = 'on' if lpmode else 'off'
|
||||
lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfplpmset.py {} {}".format(port_num, lpm)
|
||||
sfp_port_names = self.physical_to_logical[port_num]
|
||||
|
||||
# Get port admin status
|
||||
try:
|
||||
enabled_ports = subprocess.check_output("ip link show up", shell=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print "Error! Unable to get ports status, err msg: {}".format(e.output)
|
||||
return False
|
||||
|
||||
port_to_disable = []
|
||||
for port in sfp_port_names:
|
||||
if port in enabled_ports:
|
||||
port_to_disable.append(port)
|
||||
|
||||
# Disable ports before LPM settings
|
||||
for port in port_to_disable:
|
||||
try:
|
||||
subprocess.check_output("ifconfig {} down".format(port), shell=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print "Error! Unable to set admin status to DOWN for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output)
|
||||
return False
|
||||
|
||||
time.sleep(3)
|
||||
|
||||
# Set LPM
|
||||
try:
|
||||
subprocess.check_output(lpm_cmd, shell=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
|
||||
return False
|
||||
|
||||
# Enable ports after LPM settings
|
||||
for port in port_to_disable:
|
||||
try:
|
||||
subprocess.check_output("ifconfig {} up".format(port), shell=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print "Error! Unable to set admin status to UP for {}, rc = {}, err msg: {}".format(port, e.returncode, e.output)
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
def reset(self, port_num):
|
||||
# Check for invalid port_num
|
||||
if port_num < self.port_start or port_num > self.port_end:
|
||||
return False
|
||||
|
||||
lpm_cmd = "docker exec syncd python /usr/share/sonic/platform/plugins/sfpreset.py {}".format(port_num)
|
||||
|
||||
try:
|
||||
subprocess.check_output(lpm_cmd, shell=True)
|
||||
return True
|
||||
except subprocess.CalledProcessError as e:
|
||||
print "Error! Unable to set LPM for {}, rc = {}, err msg: {}".format(port_num, e.returncode, e.output)
|
||||
return False
|
||||
|
||||
return False
|
19
device/mellanox/x86_64-mlnx_msn2010-r0/sensors.conf
Normal file
19
device/mellanox/x86_64-mlnx_msn2010-r0/sensors.conf
Normal file
@ -0,0 +1,19 @@
|
||||
bus "i2c-2" "i2c-1-mux (chan_id 1)"
|
||||
chip "mlxsw-i2c-2-48"
|
||||
label temp1 "ASIC Temp"
|
||||
|
||||
bus "i2c-7" "i2c-1-mux (chan_id 6)"
|
||||
chip "lm75-*"
|
||||
label temp1 "Ambient Port Temp"
|
||||
|
||||
bus "i2c-5" "i2c-1-mux (chan_id 4)"
|
||||
chip "tps53679-*"
|
||||
label vin "TPS vin"
|
||||
label vout1 "TPS vout1"
|
||||
label vout2 "TPS vout2"
|
||||
label temp1 "TPS Temp1"
|
||||
label temp2 "TPS Temp2"
|
||||
label pout1 "TPS pouti1"
|
||||
label pout2 "TPS pout2"
|
||||
label iout1 "TPS iout1"
|
||||
label iout2 "TPS iout2"
|
@ -6,8 +6,8 @@ MAIN_TARGET = mlnx-sai_1.mlnx.$(MLNX_SAI_VERSION)_amd64.deb
|
||||
|
||||
$(addprefix $(DEST)/, $(MAIN_TARGET)): $(DEST)/% :
|
||||
# get sources
|
||||
rm -rf SAI-Implementation
|
||||
git clone https://github.com/Mellanox/SAI-Implementation.git
|
||||
#rm -rf SAI-Implementation
|
||||
#git clone https://github.com/Mellanox/SAI-Implementation.git
|
||||
|
||||
# build
|
||||
pushd SAI-Implementation
|
||||
|
Reference in New Issue
Block a user