Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request #541 from CiscoDevNet/fix/flatten_general_templates
Browse files Browse the repository at this point in the history
Remove deprecated function, use instance method.
  • Loading branch information
jpkrajewski authored Mar 28, 2024
2 parents bb4b31d + 69580a3 commit c593335
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 85 deletions.

This file was deleted.

11 changes: 0 additions & 11 deletions catalystwan/utils/config_migration/device_templates/__init__.py

This file was deleted.

This file was deleted.

5 changes: 2 additions & 3 deletions catalystwan/workflows/config_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from catalystwan.utils.config_migration.converters.feature_template import create_parcel_from_template
from catalystwan.utils.config_migration.converters.policy.policy_lists import convert as convert_policy_list
from catalystwan.utils.config_migration.creators.config_pusher import UX2ConfigPusher, UX2ConfigRollback
from catalystwan.utils.config_migration.device_templates import flatten_general_templates
from catalystwan.utils.config_migration.reverters.config_reverter import UX2ConfigReverter

logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -96,7 +95,7 @@ def transform(ux1: UX1Config) -> UX2Config:
ux2 = UX2Config()
# Create Feature Profiles and Config Group
for dt in ux1.templates.device_templates:
templates = flatten_general_templates(dt.general_templates)
templates = dt.get_flattened_general_templates()

# Create Feature Profiles
fp_system_uuid = uuid4()
Expand Down Expand Up @@ -132,7 +131,7 @@ def transform(ux1: UX1Config) -> UX2Config:
transformed_cg = TransformedConfigGroup(
header=TransformHeader(
type="config_group",
origin=uuid4(),
origin=UUID(dt.template_id),
subelements=set([fp_system_uuid, fp_other_uuid]),
),
config_group=ConfigGroupCreationPayload(
Expand Down

0 comments on commit c593335

Please sign in to comment.