-
Notifications
You must be signed in to change notification settings - Fork 664
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[db_migrator] Remove hardcoded config and migrate config from minigra…
…ph (#2887) (#2924) Microsoft ADO: 18217044 This PR is follow up to an old PR: #2515 This PR addresses two issues: Not migrating RESTAPI, TELEMETRY, DEVICE_METADATA entries if they are not supported in target image's minigraph.py. Not migrating these entries if minigraph.xml file is missing. Not maintaining the config for these tables in two different places. Currently db migrator has its own constants, and minigraph.py maintains its own. How I did it This change removes hardcoding config in migrator code, and migrating the config for RESTAPI, TELEMETRY, DEVICE_METADATA from minigraph generator. How to verify it Tested on a physical device.
- Loading branch information
Showing
6 changed files
with
82 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<DeviceMiniGraph xmlns="Microsoft.Search.Autopilot.Evolution" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> | ||
<CpgDec/> | ||
<DpgDec> | ||
<DeviceDataPlaneInfo> | ||
<LoopbackIPInterfaces/> | ||
<ManagementIPInterfaces/> | ||
<Hostname>SONiC-Dummy</Hostname> | ||
<PortChannelInterfaces/> | ||
<VlanInterfaces/> | ||
<IPInterfaces/> | ||
<AclInterfaces/> | ||
</DeviceDataPlaneInfo> | ||
</DpgDec> | ||
<PngDec> | ||
<Devices> | ||
<Device i:type="TorRouter"> | ||
<Hostname>SONiC-Dummy</Hostname> | ||
</Device> | ||
</Devices> | ||
</PngDec> | ||
<MetadataDeclaration> | ||
<Devices xmlns:a="http://schemas"> | ||
<a:DeviceMetadata> | ||
<a:Properties/> | ||
</a:DeviceMetadata> | ||
</Devices> | ||
</MetadataDeclaration> | ||
<Hostname>SONiC-Dummy</Hostname> | ||
</DeviceMiniGraph> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters