easy-utils-dev 2.128__py3-none-any.whl → 2.129__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of easy-utils-dev might be problematic. Click here for more details.
- easy_utils_dev/ept.py +79 -0
- {easy_utils_dev-2.128.dist-info → easy_utils_dev-2.129.dist-info}/METADATA +1 -1
- {easy_utils_dev-2.128.dist-info → easy_utils_dev-2.129.dist-info}/RECORD +5 -5
- {easy_utils_dev-2.128.dist-info → easy_utils_dev-2.129.dist-info}/WHEEL +0 -0
- {easy_utils_dev-2.128.dist-info → easy_utils_dev-2.129.dist-info}/top_level.txt +0 -0
easy_utils_dev/ept.py
CHANGED
|
@@ -254,6 +254,83 @@ class EPTManager :
|
|
|
254
254
|
data = lget(db.execute_dict(query) , 0 , {})
|
|
255
255
|
return data
|
|
256
256
|
|
|
257
|
+
def _create_crossconnections_table(self) :
|
|
258
|
+
query = f"""
|
|
259
|
+
CREATE TABLE c_crossconnections AS
|
|
260
|
+
SELECT DISTINCT
|
|
261
|
+
p.owner as wdmdemand,
|
|
262
|
+
sh.number || '-' || sm.physicalslot || '-L' || p.portnumber as physicalslot ,
|
|
263
|
+
sh.type as shelftype ,
|
|
264
|
+
sh.number as shelfid ,
|
|
265
|
+
sm.physicalslot ,
|
|
266
|
+
ch.deployedname,
|
|
267
|
+
ch.name as eptname,
|
|
268
|
+
s.name as sitename ,
|
|
269
|
+
b.ot as boardtype ,
|
|
270
|
+
rch.name as channelnumber
|
|
271
|
+
FROM port p
|
|
272
|
+
JOIN circuitpack cp ON p.parentId = cp.id
|
|
273
|
+
JOIN shelf sh ON cp.parentId = sh.id
|
|
274
|
+
JOIN site s ON sh.grandparentId = s.id
|
|
275
|
+
JOIN OTtype b on b.OTtype = cp.type
|
|
276
|
+
JOIN wdmdemand ch ON p.owner = ch.id AND ch.category = 'Trail'
|
|
277
|
+
JOIN slot_mapping sm ON sh.type = sm.shelfType AND cp.slotid = sm.logicalSlot
|
|
278
|
+
JOIN channel rch ON rch.num = CAST(REPLACE(REPLACE(ch.assignedChannels_primary, '[', ''), ']', '') AS INTEGER)
|
|
279
|
+
WHERE ch.assignedChannels_primary IS NOT NULL
|
|
280
|
+
AND rch.name IS NOT NULL
|
|
281
|
+
AND cp.type IN (SELECT OTtype FROM OTtype WHERE otkind != 'alien' );
|
|
282
|
+
"""
|
|
283
|
+
db = self.Database()
|
|
284
|
+
db.execute_dict(query)
|
|
285
|
+
|
|
286
|
+
def _create_card_inventory(self) :
|
|
287
|
+
query = f"""
|
|
288
|
+
CREATE TABLE c_card_inventory AS
|
|
289
|
+
SELECT DISTINCT
|
|
290
|
+
sh.number || '-' || pack.physicalslot AS slot,
|
|
291
|
+
sh.number AS shelfid,
|
|
292
|
+
pack.physicalslot,
|
|
293
|
+
s.name AS sitename,
|
|
294
|
+
pack.apn,
|
|
295
|
+
COALESCE(ott.ot, pack.type) AS boardname,
|
|
296
|
+
pack.source_table
|
|
297
|
+
FROM (
|
|
298
|
+
-- Circuitpack → logicalSlot → physicalslot via slot_mapping
|
|
299
|
+
SELECT cp.id,
|
|
300
|
+
cp.parentId,
|
|
301
|
+
sm.physicalslot,
|
|
302
|
+
cp.type,
|
|
303
|
+
cp.apn,
|
|
304
|
+
'circuitpack' AS source_table
|
|
305
|
+
FROM circuitpack cp
|
|
306
|
+
JOIN shelf sh ON cp.parentId = sh.id
|
|
307
|
+
JOIN slot_mapping sm
|
|
308
|
+
ON sh.type = sm.shelfType
|
|
309
|
+
AND cp.slotid = sm.logicalSlot
|
|
310
|
+
|
|
311
|
+
UNION ALL
|
|
312
|
+
|
|
313
|
+
-- Commonpack → already has physicalslot
|
|
314
|
+
SELECT id,
|
|
315
|
+
parentId,
|
|
316
|
+
physicalslot,
|
|
317
|
+
type,
|
|
318
|
+
apn,
|
|
319
|
+
'commonpack' AS source_table
|
|
320
|
+
FROM commonpack
|
|
321
|
+
) pack
|
|
322
|
+
JOIN shelf sh
|
|
323
|
+
ON pack.parentId = sh.id
|
|
324
|
+
JOIN site s
|
|
325
|
+
ON sh.grandparentId = s.id
|
|
326
|
+
LEFT JOIN OAtype ota
|
|
327
|
+
ON ota.OAtype = pack.type
|
|
328
|
+
LEFT JOIN OTtype ott
|
|
329
|
+
ON ott.OTtype = pack.type;
|
|
330
|
+
"""
|
|
331
|
+
db = self.Database()
|
|
332
|
+
db.execute_dict(query)
|
|
333
|
+
|
|
257
334
|
def convert_design(self , drop_cols=[] ) :
|
|
258
335
|
start = getTimestamp()
|
|
259
336
|
db = self.Database()
|
|
@@ -262,6 +339,8 @@ class EPTManager :
|
|
|
262
339
|
self.create_ept_rows()
|
|
263
340
|
db.execute_script(f"{os.path.join(__LIBPATH__ , 'ept_sql' , 'create_dirs.sql')}")
|
|
264
341
|
self._create_v_dirs()
|
|
342
|
+
self._create_crossconnections_table()
|
|
343
|
+
self._create_card_inventory()
|
|
265
344
|
end = getTimestamp()
|
|
266
345
|
if os.path.exists(self.tmp_design_path) :
|
|
267
346
|
os.remove(self.tmp_design_path)
|
|
@@ -11,7 +11,7 @@ easy_utils_dev/custom_env.py,sha256=vxrjikpSNJlKfoBE-ef88UExlpXucUe-HcwHMn3gfB0,
|
|
|
11
11
|
easy_utils_dev/debugger.py,sha256=08lYSg9Mx0l440aCk4Z1ofNUlN9pTL9um2CL_cCyUKs,18305
|
|
12
12
|
easy_utils_dev/easy_oracle.py,sha256=Jyc3HSl6eyLayjS8NoE4GOaf8otQlonR5_qOg2h1DjE,2157
|
|
13
13
|
easy_utils_dev/encryptor.py,sha256=f5Zjn0DGtXCyhldpVnBtfcTb4h4Wp0eQPHusEYwIags,1512
|
|
14
|
-
easy_utils_dev/ept.py,sha256=
|
|
14
|
+
easy_utils_dev/ept.py,sha256=Xt5jck4PpBlump7oaF76qwCVWIKMBiKVb91MtUQ5AEY,15817
|
|
15
15
|
easy_utils_dev/exceptions.py,sha256=6eTYBa8AIXC0wI6zgkqsLreSXyPf459G-ToO7ziQuK4,1669
|
|
16
16
|
easy_utils_dev/filescompressor.py,sha256=iKAtLfkEXOuvvqF56jH0D9KAAeZ7iaa_sRaJnyYkxiE,2875
|
|
17
17
|
easy_utils_dev/generate_license.py,sha256=fr_eoSjKCmDmAEBc6FWFXZxGQOHx9XO6hEK8dcyVUlA,3319
|
|
@@ -29,7 +29,7 @@ easy_utils_dev/utils.py,sha256=BmVnbxc336c6WTeDFcEHN6Mavt7fJrIEyK4GXODV3gI,13345
|
|
|
29
29
|
easy_utils_dev/winserviceapi.py,sha256=2ZP6jaSt1-5vEJYXqwBhwX-1-eQ3V3YzntsoOoko2cw,18804
|
|
30
30
|
easy_utils_dev/wsnoclib.py,sha256=tC-RmjddaLpihPCRBLGC2RnRpFJqexhvExUr1KncoQM,29063
|
|
31
31
|
easy_utils_dev/wsselib.py,sha256=YweScnoAAH_t29EeIjBpkQ6HtX0Rp9mQudRsRce2SE8,7920
|
|
32
|
-
easy_utils_dev-2.
|
|
33
|
-
easy_utils_dev-2.
|
|
34
|
-
easy_utils_dev-2.
|
|
35
|
-
easy_utils_dev-2.
|
|
32
|
+
easy_utils_dev-2.129.dist-info/METADATA,sha256=jspK80iAmC6yufREJvJgBqJwQLDv-98H4RoL2TQoi8g,510
|
|
33
|
+
easy_utils_dev-2.129.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
34
|
+
easy_utils_dev-2.129.dist-info/top_level.txt,sha256=7vBsrpq7NmilkdU3YUvfd5iVDNBaT07u_-ut4F7zc7A,15
|
|
35
|
+
easy_utils_dev-2.129.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|