Skip to content

Commit b084b98

Browse files
committed
2 parents 708b13d + a8c5d5f commit b084b98

File tree

3 files changed

+39
-26
lines changed

3 files changed

+39
-26
lines changed

hpecp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535
)
3636
from .logger import Logger
3737

38-
__version__ = "0.10.5"
38+
__version__ = "0.10.6"

hpecp/cli/datatap.py

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,19 @@ def examples(self):
5858
def create_hdfs_with_kerberos(
5959
self,
6060
name,
61-
description,
62-
path_from_endpoint,
63-
kdc_data_host,
64-
kdc_data_port,
65-
realm,
66-
client_principal,
67-
browse_only,
68-
host,
69-
service_id,
70-
backup_host,
71-
endpoint_type,
72-
endpoint_port,
73-
read_only,
61+
description="",
62+
path_from_endpoint="",
63+
kdc_data_host="",
64+
kdc_data_port="",
65+
realm="",
66+
client_principal="",
67+
browse_only=True,
68+
host="",
7469
keytab="",
70+
backup_host="",
71+
type="",
72+
port="",
73+
read_only=False,
7574
):
7675
"""TODO.
7776
@@ -108,7 +107,7 @@ def create_hdfs_with_kerberos(
108107
read_only : [type]
109108
[description]
110109
"""
111-
base.get_client().datatap.create(
110+
base.get_client().datatap.create_hdfs_with_kerberos(
112111
name,
113112
description,
114113
path_from_endpoint,
@@ -119,9 +118,8 @@ def create_hdfs_with_kerberos(
119118
browse_only,
120119
host,
121120
keytab,
122-
service_id,
123121
backup_host,
124-
endpoint_type,
125-
endpoint_port,
122+
type,
123+
port,
126124
read_only,
127125
)

hpecp/datatap.py

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,9 @@ def create_hdfs_with_kerberos(
124124
browse_only,
125125
host,
126126
keytab,
127-
service_id,
128127
backup_host,
129-
endpoint_type,
130-
endpoint_port,
128+
type,
129+
port,
131130
read_only,
132131
):
133132
"""TODO.
@@ -166,22 +165,38 @@ def create_hdfs_with_kerberos(
166165
[description]
167166
"""
168167
_data = {
169-
"bdfs_root": {"path_from_endpoint": path_from_endpoint},
168+
"bdfs_root": {
169+
#"path_from_endpoint": path_from_endpoint
170+
},
170171
"endpoint": {
171-
"kdc_data": [{"host": kdc_data_host, "port": kdc_data_port}],
172+
"kdc_data": [
173+
{
174+
"host": kdc_data_host,
175+
#"port": kdc_data_port
176+
}
177+
],
172178
"realm": realm,
173179
"client_principal": client_principal,
174180
"browse_only": browse_only,
175181
"host": host,
176182
"keytab": keytab,
177-
"service_id": service_id,
183+
"service_id": "hdfs",
178184
"backup_host": backup_host,
179-
"type": endpoint_type,
180-
"port": endpoint_port,
185+
"type": type,
186+
"port": str(port),
181187
},
182188
"flags": {"read_only": read_only},
183189
"label": {"name": name, "description": description},
184190
}
191+
192+
if path_from_endpoint != "":
193+
_data["bdfs_root"]["path_from_endpoint"] = path_from_endpoint
194+
195+
if kdc_data_port != "":
196+
_data["endpoint"]["kdc_data"]["kdc_data_port"] = kdc_data_port
197+
198+
#if keytab != "":
199+
# _data["endpoint"]["keytab"] = keytab
185200

186201
self.client._request(
187202
url=DatatapController.base_resource_path,

0 commit comments

Comments
 (0)