Coverage for netbox_interface_name_rules / family / __init__.py: 100.00%

13 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-10-16 10:13 +0000

1# SPDX-License-Identifier: Apache-2.0 

2# Copyright (C) 2025 Marcin Zieba <marcinpsk@gmail.com> 

3"""Plan and execute interface-family operations.""" 

4 

5from .batch import ( 

6 BatchOutcome, 

7 ModuleFamilyPlans, 

8 apply_rule_to_modules, 

9 creation_name_refusals, 

10 execute_family_plan, 

11 execute_module_families, 

12 plan_module_families, 

13) 

14from .capabilities import supports_channelization, supports_module_moves 

15from .conversion import ( 

16 conversion_offered, 

17 convert_rule_families, 

18 execute_conversion, 

19 plan_module_conversions, 

20 preview_rule_conversions, 

21) 

22from .domain import ( 

23 ConversionCandidate, 

24 ConversionMember, 

25 ConversionPlan, 

26 ConversionPreview, 

27 FamilyOutcome, 

28 FamilyStatus, 

29 FamilyTopology, 

30 FlatCreationPlan, 

31 InstalledFamilyPlan, 

32 InstalledFamilyPlanSet, 

33 InstalledPlanSetOutcome, 

34 InterfaceSnapshot, 

35 MemberOutcome, 

36 MemberRole, 

37 PlannedChannel, 

38 PlannedMember, 

39 PlannedName, 

40 ProspectiveFamilyPlan, 

41 ProspectiveFamilyPlanSet, 

42 ProspectiveMember, 

43 RunScope, 

44 StructuralFamilyPlan, 

45) 

46from .execution import execute_installed_plan, execute_installed_plan_set 

47from .installed import ( 

48 device_interface_families, 

49 given_raw_names, 

50 interfaces_by_module, 

51 is_channelized_parent, 

52 module_raw_bases, 

53 plan_device_interface_rename, 

54 plan_installed_families, 

55 plan_installed_flat_families, 

56 plan_interface_rename, 

57) 

58from .names import ChannelReconciliationError 

59from .previous import PreviousForms, names_the_previous_rule_gave 

60from .prospective import ( 

61 ProspectiveInterface, 

62 describe_interfaces, 

63 describe_module_interfaces, 

64 describe_template_interfaces, 

65 plan_prospective_families, 

66) 

67from .structural import ( 

68 execute_flat_family, 

69 execute_structural_family, 

70 has_flat_expansion, 

71 plan_flat_family, 

72 plan_structural_family, 

73) 

74from .targets import ( 

75 UNCLAIMED_BASE_REASON, 

76 builds_flat_family, 

77 channelized_family_names, 

78 names_installed_parent, 

79 one_family_per_name_set, 

80 template_channel_suffixes, 

81) 

82from .template_names import pinned_template_cache, resolved_template_names 

83 

84__all__ = ( 

85 "UNCLAIMED_BASE_REASON", 

86 "BatchOutcome", 

87 "ChannelReconciliationError", 

88 "ConversionCandidate", 

89 "ConversionMember", 

90 "ConversionPlan", 

91 "ConversionPreview", 

92 "FamilyOutcome", 

93 "FamilyStatus", 

94 "FamilyTopology", 

95 "FlatCreationPlan", 

96 "InstalledFamilyPlan", 

97 "InstalledFamilyPlanSet", 

98 "InstalledPlanSetOutcome", 

99 "InterfaceSnapshot", 

100 "MemberOutcome", 

101 "MemberRole", 

102 "ModuleFamilyPlans", 

103 "PlannedChannel", 

104 "PlannedMember", 

105 "PlannedName", 

106 "PreviousForms", 

107 "ProspectiveFamilyPlan", 

108 "ProspectiveFamilyPlanSet", 

109 "ProspectiveInterface", 

110 "ProspectiveMember", 

111 "RunScope", 

112 "StructuralFamilyPlan", 

113 "apply_rule_to_modules", 

114 "builds_flat_family", 

115 "channelized_family_names", 

116 "conversion_offered", 

117 "convert_rule_families", 

118 "creation_name_refusals", 

119 "describe_interfaces", 

120 "describe_module_interfaces", 

121 "describe_template_interfaces", 

122 "device_interface_families", 

123 "execute_conversion", 

124 "execute_family_plan", 

125 "execute_flat_family", 

126 "execute_installed_plan", 

127 "execute_installed_plan_set", 

128 "execute_module_families", 

129 "execute_structural_family", 

130 "given_raw_names", 

131 "has_flat_expansion", 

132 "interfaces_by_module", 

133 "is_channelized_parent", 

134 "module_raw_bases", 

135 "names_installed_parent", 

136 "names_the_previous_rule_gave", 

137 "one_family_per_name_set", 

138 "pinned_template_cache", 

139 "plan_device_interface_rename", 

140 "plan_flat_family", 

141 "plan_installed_families", 

142 "plan_installed_flat_families", 

143 "plan_interface_rename", 

144 "plan_module_conversions", 

145 "plan_module_families", 

146 "plan_prospective_families", 

147 "plan_structural_family", 

148 "preview_rule_conversions", 

149 "resolved_template_names", 

150 "supports_channelization", 

151 "supports_module_moves", 

152 "template_channel_suffixes", 

153)