scripts/db/2023.2.0/001_special_vlan_allocation.py 1 location
|
@@ 96-109 (lines=14) @@
|
93 |
|
print("All interfaces are updated already.") |
94 |
|
|
95 |
|
|
96 |
|
if __name__ == "__main__": |
97 |
|
mongo = Mongo() |
98 |
|
cmds = { |
99 |
|
"aggregate_outdated_interfaces": aggregate_outdated_interfaces, |
100 |
|
"update_database": update_database, |
101 |
|
} |
102 |
|
try: |
103 |
|
cmd = os.environ["CMD"] |
104 |
|
cmds[cmd](mongo) |
105 |
|
except KeyError: |
106 |
|
print( |
107 |
|
f"Please set the 'CMD' env var. \nIt has to be one of these: {list(cmds.keys())}" |
108 |
|
) |
109 |
|
sys.exit(1) |
110 |
|
|
scripts/db/2023.2.0/000_vlan_pool.py 1 location
|
@@ 203-216 (lines=14) @@
|
200 |
|
print("There is nothing to update or add") |
201 |
|
|
202 |
|
|
203 |
|
if __name__ == "__main__": |
204 |
|
mongo = Mongo() |
205 |
|
cmds = { |
206 |
|
"aggregate_outdated_interfaces": aggregate_outdated_interfaces, |
207 |
|
"update_database": update_database, |
208 |
|
} |
209 |
|
try: |
210 |
|
cmd = os.environ["CMD"] |
211 |
|
cmds[cmd](mongo) |
212 |
|
except KeyError: |
213 |
|
print( |
214 |
|
f"Please set the 'CMD' env var. \nIt has to be one of these: {list(cmds.keys())}" |
215 |
|
) |
216 |
|
sys.exit(1) |
217 |
|
|