-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Data Catalog module and add list_dbcs function
Signed-off-by: Webster Mudge <[email protected]>
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
from cdpy.common import CdpSdkBase, Squelch, CdpError | ||
|
||
ENTITLEMENT_DISABLED='Data Catalog not enabled on CDP Tenant' | ||
|
||
|
||
class CdpyDc(CdpSdkBase): | ||
def __init__(self, *args, **kwargs): | ||
super().__init__(*args, **kwargs) | ||
|
||
def list_dbcs(self, cluster_id): | ||
return self.sdk.call( | ||
svc='dw', func='list_dbcs', ret_field='dbcs', squelch=[ | ||
Squelch(value='NOT_FOUND', default=list()), | ||
Squelch(field='status_code', value='504', default=list(), warning="No Data Catalogs found in this Cluster"), | ||
Squelch(value='PATH_DISABLED', warning=ENTITLEMENT_DISABLED, default=list()) | ||
], | ||
clusterId=cluster_id | ||
) |