Skip to content

Commit f640cce

Browse files
committed
add assertions for create datatap
Signed-off-by: Chris Snow <[email protected]>
1 parent ec07ba2 commit f640cce

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

hpecp/cli/datatap.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ def create_hdfs_with_kerberos(
6464
kdc_data_port="",
6565
realm="",
6666
client_principal="",
67-
browse_only=True,
67+
browse_only=None,
6868
host="",
6969
keytab="",
7070
backup_host="",
7171
type="",
7272
port="",
73-
read_only=False,
73+
read_only=None,
7474
):
7575
"""TODO.
7676
@@ -100,13 +100,21 @@ def create_hdfs_with_kerberos(
100100
[description]
101101
backup_host : [type]
102102
[description]
103-
endpoint_type : [type]
103+
type : [type]
104104
[description]
105-
endpoint_port : [type]
105+
port : [type]
106106
[description]
107107
read_only : [type]
108108
[description]
109109
"""
110+
assert isinstance(
111+
browse_only, bool
112+
), "'browse-only' parameter must be 'true' or 'false'"
113+
114+
assert isinstance(
115+
read_only, bool
116+
), "'read-only' parameter must be 'true' or 'false'"
117+
110118
base.get_client().datatap.create_hdfs_with_kerberos(
111119
name,
112120
description,

0 commit comments

Comments
 (0)