prelude-sdk 2.6.33__py3-none-any.whl → 2.6.34__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.
- prelude_sdk/controllers/scm_controller.py +69 -0
- {prelude_sdk-2.6.33.dist-info → prelude_sdk-2.6.34.dist-info}/METADATA +1 -1
- {prelude_sdk-2.6.33.dist-info → prelude_sdk-2.6.34.dist-info}/RECORD +6 -6
- {prelude_sdk-2.6.33.dist-info → prelude_sdk-2.6.34.dist-info}/WHEEL +0 -0
- {prelude_sdk-2.6.33.dist-info → prelude_sdk-2.6.34.dist-info}/licenses/LICENSE +0 -0
- {prelude_sdk-2.6.33.dist-info → prelude_sdk-2.6.34.dist-info}/top_level.txt +0 -0
|
@@ -593,3 +593,72 @@ class ScmController(HttpController):
|
|
|
593
593
|
],
|
|
594
594
|
)
|
|
595
595
|
return history
|
|
596
|
+
|
|
597
|
+
@verify_credentials
|
|
598
|
+
def get_report(self, report_id: str):
|
|
599
|
+
"""Get SCM report by ID"""
|
|
600
|
+
res = self.get(
|
|
601
|
+
f"{self.account.hq}/scm/reports/{report_id}",
|
|
602
|
+
headers=self.account.headers,
|
|
603
|
+
timeout=10,
|
|
604
|
+
)
|
|
605
|
+
return res.json()
|
|
606
|
+
|
|
607
|
+
@verify_credentials
|
|
608
|
+
def list_reports(self):
|
|
609
|
+
"""List SCM reports"""
|
|
610
|
+
res = self.get(
|
|
611
|
+
f"{self.account.hq}/scm/reports",
|
|
612
|
+
headers=self.account.headers,
|
|
613
|
+
timeout=10,
|
|
614
|
+
)
|
|
615
|
+
return res.json()
|
|
616
|
+
|
|
617
|
+
@verify_credentials
|
|
618
|
+
def delete_report(self, report_id: str):
|
|
619
|
+
"""Delete SCM report by ID"""
|
|
620
|
+
res = self.delete(
|
|
621
|
+
f"{self.account.hq}/scm/reports/{report_id}",
|
|
622
|
+
headers=self.account.headers,
|
|
623
|
+
timeout=10,
|
|
624
|
+
)
|
|
625
|
+
return res.json()
|
|
626
|
+
|
|
627
|
+
@verify_credentials
|
|
628
|
+
def put_report(self, report_data: dict, report_id: str = None):
|
|
629
|
+
"""Put SCM report by ID"""
|
|
630
|
+
res = self.put(
|
|
631
|
+
f"{self.account.hq}/scm/reports",
|
|
632
|
+
headers=self.account.headers,
|
|
633
|
+
json=dict(report=report_data, id=report_id),
|
|
634
|
+
timeout=10,
|
|
635
|
+
)
|
|
636
|
+
return res.json()
|
|
637
|
+
|
|
638
|
+
@verify_credentials
|
|
639
|
+
def get_chart_data(
|
|
640
|
+
self,
|
|
641
|
+
scm_category: SCMCategory,
|
|
642
|
+
sort_by: str,
|
|
643
|
+
group_by: str,
|
|
644
|
+
group_limit: int,
|
|
645
|
+
scopes: str = None,
|
|
646
|
+
filter: str = None,
|
|
647
|
+
):
|
|
648
|
+
"""Get SCM chart data"""
|
|
649
|
+
params = {
|
|
650
|
+
"scm_category": scm_category.name,
|
|
651
|
+
"sort_by": sort_by,
|
|
652
|
+
"group_by": group_by,
|
|
653
|
+
"group_limit": group_limit,
|
|
654
|
+
"scopes": scopes,
|
|
655
|
+
}
|
|
656
|
+
if filter:
|
|
657
|
+
params["$filter"] = filter
|
|
658
|
+
res = self.get(
|
|
659
|
+
f"{self.account.hq}/scm/chart_data",
|
|
660
|
+
headers=self.account.headers,
|
|
661
|
+
params=params,
|
|
662
|
+
timeout=30,
|
|
663
|
+
)
|
|
664
|
+
return res.json()
|
|
@@ -9,12 +9,12 @@ prelude_sdk/controllers/iam_controller.py,sha256=Ya5jg7F6t3cAYzanTlBQfthkVV081aV
|
|
|
9
9
|
prelude_sdk/controllers/jobs_controller.py,sha256=TECogrNcbW4uY5uDIDndAwxGHSA7RLnFZWmeXhvAHSM,1150
|
|
10
10
|
prelude_sdk/controllers/partner_controller.py,sha256=63P7d7fwVc1iWIUMxQv5PQOQ-e-VIpDql9HYNtLOZNo,4742
|
|
11
11
|
prelude_sdk/controllers/probe_controller.py,sha256=rwBnqkFJa1KuVwZMluM-pfo8bhQFB6JKSRSeK7s-kew,406
|
|
12
|
-
prelude_sdk/controllers/scm_controller.py,sha256=
|
|
12
|
+
prelude_sdk/controllers/scm_controller.py,sha256=tivAboJLmS0ztdZnyMD70fsOC5mRxz4FfqXf7iHQydw,20231
|
|
13
13
|
prelude_sdk/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
prelude_sdk/models/account.py,sha256=dRKhX6_mrqDTyqyfIsvHFVavcedgZ5hZAIDYVF7YlZI,8962
|
|
15
15
|
prelude_sdk/models/codes.py,sha256=owX-h3DNEU9buAQ8u4_GhgINOIgPNAG01o8E7eyZLuU,18672
|
|
16
|
-
prelude_sdk-2.6.
|
|
17
|
-
prelude_sdk-2.6.
|
|
18
|
-
prelude_sdk-2.6.
|
|
19
|
-
prelude_sdk-2.6.
|
|
20
|
-
prelude_sdk-2.6.
|
|
16
|
+
prelude_sdk-2.6.34.dist-info/licenses/LICENSE,sha256=ttdT5omfN6LNmtQoIjUhkkFhz6i44SDMRNwKrbfyTf8,1069
|
|
17
|
+
prelude_sdk-2.6.34.dist-info/METADATA,sha256=UGE_rQSeBIp5_WA0pCyul2KPpYudr2OkDPtNh9cOLoI,1187
|
|
18
|
+
prelude_sdk-2.6.34.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
19
|
+
prelude_sdk-2.6.34.dist-info/top_level.txt,sha256=6O7C8nl-yK7FsVpsPaka_GV8PYy2uvAJtus8Tlzw4dE,12
|
|
20
|
+
prelude_sdk-2.6.34.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|