Skip to content

[Minigraph-Gen]create minigraph based on testbed_vm_topology#491

Closed
maggiemsft wants to merge 4 commits intosonic-net:masterfrom
maggiemsft:masun/newtemplate-p1
Closed

[Minigraph-Gen]create minigraph based on testbed_vm_topology#491
maggiemsft wants to merge 4 commits intosonic-net:masterfrom
maggiemsft:masun/newtemplate-p1

Conversation

@maggiemsft
Copy link
Contributor

@maggiemsft maggiemsft commented Mar 7, 2018

Description of PR

Generate testing minigraph.xml based on testbed topology yaml file
There is a configure_sonic_basedon_testbed.yml playbook before but only support certain topology
along with adding more testbed topologies, it cannot automatically generate minigraph based on defined testbed.yml and won't catch up with every template for each topology.
This effort is trying to read vars/topo_*.yml and based on testbed configuration and generate matching SONiC minigraph for test run.

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Approach

How did you do it?

  1. create a generic minigraph template ansible/alltopo.j2
  2. create a playbook to generate minigraph config_sonic_basedon_testbed_v2.yml
  3. will keep version_1 playbook for a while and facing them out gradually when v2 works on all platform

How did you verify/test it?

I tested in local DellS6000 t0, t1-lag and t1 topology and looks like working

Any platform specific information?

I tested in local DellS6000 t0, t1-lag and t1 topology and looks like working

Supported testbed topology if it's a new test case?

na

Documentation

https://github.com/maggiemsft/SONiC/wiki/Device-Minigraph-Generation-V2

when: "VM_topo | bool"

- name: find interface name mapping and indivisual interface speed if defined
port_alias: hwsku="{{ hwsku }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be connection: local

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

@@ -0,0 +1,356 @@
<DeviceMiniGraph xmlns="Microsoft.Search.Autopilot.Evolution" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<CpgDec>
Copy link
Contributor

@lguohan lguohan Mar 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you sepearate cpgdec, dpgdec, DeviceInfos, MetadataDeclaration into seperate files, so they can be maintained separately?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@maggiemsft
Copy link
Contributor Author

maggiemsft commented Mar 10, 2018

here is a sample for two version minigraph change for t0 topology
$/github/sonic-mgmt/ansible/minigraph$ diff str-msn2700-01.xml str-msn2700-01.xml.t0v1 
118c118
<             <a:PeersRange>10.255.0.0/25</a:PeersRange>
---
>             <a:PeersRange>10.255.0.0/27</a:PeersRange>
127c127
<             <a:PeersRange>192.168.0.0/25</a:PeersRange>
---
>             <a:PeersRange>192.168.0.0/27</a:PeersRange>
230c230
<           <Subnets>192.168.0.0/21</Subnets>
---
>           <Subnets>192.168.0.0/27</Subnets>
283,290c283,286
<           <InAcl>SNMP_ACL</InAcl>
<           <AttachTo>SNMP</AttachTo>
<           <Type>SNMP</Type>
<        </AclInterface>
<        <AclInterface>
<           <AttachTo>ERSPAN</AttachTo>
<           <InAcl>Everflow</InAcl>
<           <Type>Everflow</Type>
---
>           <AttachTo>
>           PortChannel0001;PortChannel0002;PortChannel0003;PortChannel0004;Vlan1000
>           </AttachTo>
>           <InAcl>DataAcl</InAcl>
292,295c288,292
<           <AclInterface>
<           <AttachTo>VTY_LINE</AttachTo>
<           <InAcl>ssh-only</InAcl>
<           <Type>SSH</Type>
---
>         <AclInterface>
>           <AttachTo>
>             ERSPAN
>           </AttachTo>
>           <InAcl>Everflow</InAcl>

Copy link
Collaborator

@yxieca yxieca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you forgot to add alltopo.j2 to this PR.

@lguohan lguohan closed this Mar 26, 2018
@maggiemsft maggiemsft deleted the masun/newtemplate-p1 branch May 24, 2018 00:04
sdszhang pushed a commit to sdszhang/sonic-mgmt that referenced this pull request Aug 2, 2025
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
Submodule src/sonic-sairedis 4c75b7f..54c8e78:
  > [saisdkdump]: Fix dump generation crash (sonic-net#493)
  > Fix bug: Restore sai log levels from LOGLEVEL_DB after saiDiscover (sonic-net#491)

Signed-off-by: Ying Xie <[email protected]>
kazinator-arista pushed a commit to kazinator-arista/sonic-mgmt that referenced this pull request Mar 4, 2026
…tomatically (sonic-net#23284)

#### Why I did it
src/sonic-linux-kernel
```
* 91696ec - (HEAD -> 202311, origin/202311) [build] Use package.trafficmanager instead of sonicstorage.blob (sonic-net#491) (3 hours ago) [Liu Shilong]
```
#### How I did it
#### How to verify it
#### Description for the changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants