SentryGenericPolicyService.py 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131
  1. #
  2. # Autogenerated by Thrift Compiler (0.9.3)
  3. #
  4. # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  5. #
  6. # options string: py:new_style
  7. #
  8. from thrift.Thrift import TType, TMessageType, TException, TApplicationException
  9. import logging
  10. from ttypes import *
  11. from thrift.Thrift import TProcessor
  12. from thrift.transport import TTransport
  13. from thrift.protocol import TBinaryProtocol, TProtocol
  14. try:
  15. from thrift.protocol import fastbinary
  16. except:
  17. fastbinary = None
  18. class Iface(object):
  19. def create_sentry_role(self, request):
  20. """
  21. Parameters:
  22. - request
  23. """
  24. pass
  25. def drop_sentry_role(self, request):
  26. """
  27. Parameters:
  28. - request
  29. """
  30. pass
  31. def alter_sentry_role_grant_privilege(self, request):
  32. """
  33. Parameters:
  34. - request
  35. """
  36. pass
  37. def alter_sentry_role_revoke_privilege(self, request):
  38. """
  39. Parameters:
  40. - request
  41. """
  42. pass
  43. def alter_sentry_role_add_groups(self, request):
  44. """
  45. Parameters:
  46. - request
  47. """
  48. pass
  49. def alter_sentry_role_delete_groups(self, request):
  50. """
  51. Parameters:
  52. - request
  53. """
  54. pass
  55. def list_sentry_roles_by_group(self, request):
  56. """
  57. Parameters:
  58. - request
  59. """
  60. pass
  61. def list_sentry_privileges_by_role(self, request):
  62. """
  63. Parameters:
  64. - request
  65. """
  66. pass
  67. def list_sentry_privileges_for_provider(self, request):
  68. """
  69. Parameters:
  70. - request
  71. """
  72. pass
  73. def drop_sentry_privilege(self, request):
  74. """
  75. Parameters:
  76. - request
  77. """
  78. pass
  79. def rename_sentry_privilege(self, request):
  80. """
  81. Parameters:
  82. - request
  83. """
  84. pass
  85. class Client(Iface):
  86. def __init__(self, iprot, oprot=None):
  87. self._iprot = self._oprot = iprot
  88. if oprot is not None:
  89. self._oprot = oprot
  90. self._seqid = 0
  91. def create_sentry_role(self, request):
  92. """
  93. Parameters:
  94. - request
  95. """
  96. self.send_create_sentry_role(request)
  97. return self.recv_create_sentry_role()
  98. def send_create_sentry_role(self, request):
  99. self._oprot.writeMessageBegin('create_sentry_role', TMessageType.CALL, self._seqid)
  100. args = create_sentry_role_args()
  101. args.request = request
  102. args.write(self._oprot)
  103. self._oprot.writeMessageEnd()
  104. self._oprot.trans.flush()
  105. def recv_create_sentry_role(self):
  106. iprot = self._iprot
  107. (fname, mtype, rseqid) = iprot.readMessageBegin()
  108. if mtype == TMessageType.EXCEPTION:
  109. x = TApplicationException()
  110. x.read(iprot)
  111. iprot.readMessageEnd()
  112. raise x
  113. result = create_sentry_role_result()
  114. result.read(iprot)
  115. iprot.readMessageEnd()
  116. if result.success is not None:
  117. return result.success
  118. raise TApplicationException(TApplicationException.MISSING_RESULT, "create_sentry_role failed: unknown result")
  119. def drop_sentry_role(self, request):
  120. """
  121. Parameters:
  122. - request
  123. """
  124. self.send_drop_sentry_role(request)
  125. return self.recv_drop_sentry_role()
  126. def send_drop_sentry_role(self, request):
  127. self._oprot.writeMessageBegin('drop_sentry_role', TMessageType.CALL, self._seqid)
  128. args = drop_sentry_role_args()
  129. args.request = request
  130. args.write(self._oprot)
  131. self._oprot.writeMessageEnd()
  132. self._oprot.trans.flush()
  133. def recv_drop_sentry_role(self):
  134. iprot = self._iprot
  135. (fname, mtype, rseqid) = iprot.readMessageBegin()
  136. if mtype == TMessageType.EXCEPTION:
  137. x = TApplicationException()
  138. x.read(iprot)
  139. iprot.readMessageEnd()
  140. raise x
  141. result = drop_sentry_role_result()
  142. result.read(iprot)
  143. iprot.readMessageEnd()
  144. if result.success is not None:
  145. return result.success
  146. raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_sentry_role failed: unknown result")
  147. def alter_sentry_role_grant_privilege(self, request):
  148. """
  149. Parameters:
  150. - request
  151. """
  152. self.send_alter_sentry_role_grant_privilege(request)
  153. return self.recv_alter_sentry_role_grant_privilege()
  154. def send_alter_sentry_role_grant_privilege(self, request):
  155. self._oprot.writeMessageBegin('alter_sentry_role_grant_privilege', TMessageType.CALL, self._seqid)
  156. args = alter_sentry_role_grant_privilege_args()
  157. args.request = request
  158. args.write(self._oprot)
  159. self._oprot.writeMessageEnd()
  160. self._oprot.trans.flush()
  161. def recv_alter_sentry_role_grant_privilege(self):
  162. iprot = self._iprot
  163. (fname, mtype, rseqid) = iprot.readMessageBegin()
  164. if mtype == TMessageType.EXCEPTION:
  165. x = TApplicationException()
  166. x.read(iprot)
  167. iprot.readMessageEnd()
  168. raise x
  169. result = alter_sentry_role_grant_privilege_result()
  170. result.read(iprot)
  171. iprot.readMessageEnd()
  172. if result.success is not None:
  173. return result.success
  174. raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_sentry_role_grant_privilege failed: unknown result")
  175. def alter_sentry_role_revoke_privilege(self, request):
  176. """
  177. Parameters:
  178. - request
  179. """
  180. self.send_alter_sentry_role_revoke_privilege(request)
  181. return self.recv_alter_sentry_role_revoke_privilege()
  182. def send_alter_sentry_role_revoke_privilege(self, request):
  183. self._oprot.writeMessageBegin('alter_sentry_role_revoke_privilege', TMessageType.CALL, self._seqid)
  184. args = alter_sentry_role_revoke_privilege_args()
  185. args.request = request
  186. args.write(self._oprot)
  187. self._oprot.writeMessageEnd()
  188. self._oprot.trans.flush()
  189. def recv_alter_sentry_role_revoke_privilege(self):
  190. iprot = self._iprot
  191. (fname, mtype, rseqid) = iprot.readMessageBegin()
  192. if mtype == TMessageType.EXCEPTION:
  193. x = TApplicationException()
  194. x.read(iprot)
  195. iprot.readMessageEnd()
  196. raise x
  197. result = alter_sentry_role_revoke_privilege_result()
  198. result.read(iprot)
  199. iprot.readMessageEnd()
  200. if result.success is not None:
  201. return result.success
  202. raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_sentry_role_revoke_privilege failed: unknown result")
  203. def alter_sentry_role_add_groups(self, request):
  204. """
  205. Parameters:
  206. - request
  207. """
  208. self.send_alter_sentry_role_add_groups(request)
  209. return self.recv_alter_sentry_role_add_groups()
  210. def send_alter_sentry_role_add_groups(self, request):
  211. self._oprot.writeMessageBegin('alter_sentry_role_add_groups', TMessageType.CALL, self._seqid)
  212. args = alter_sentry_role_add_groups_args()
  213. args.request = request
  214. args.write(self._oprot)
  215. self._oprot.writeMessageEnd()
  216. self._oprot.trans.flush()
  217. def recv_alter_sentry_role_add_groups(self):
  218. iprot = self._iprot
  219. (fname, mtype, rseqid) = iprot.readMessageBegin()
  220. if mtype == TMessageType.EXCEPTION:
  221. x = TApplicationException()
  222. x.read(iprot)
  223. iprot.readMessageEnd()
  224. raise x
  225. result = alter_sentry_role_add_groups_result()
  226. result.read(iprot)
  227. iprot.readMessageEnd()
  228. if result.success is not None:
  229. return result.success
  230. raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_sentry_role_add_groups failed: unknown result")
  231. def alter_sentry_role_delete_groups(self, request):
  232. """
  233. Parameters:
  234. - request
  235. """
  236. self.send_alter_sentry_role_delete_groups(request)
  237. return self.recv_alter_sentry_role_delete_groups()
  238. def send_alter_sentry_role_delete_groups(self, request):
  239. self._oprot.writeMessageBegin('alter_sentry_role_delete_groups', TMessageType.CALL, self._seqid)
  240. args = alter_sentry_role_delete_groups_args()
  241. args.request = request
  242. args.write(self._oprot)
  243. self._oprot.writeMessageEnd()
  244. self._oprot.trans.flush()
  245. def recv_alter_sentry_role_delete_groups(self):
  246. iprot = self._iprot
  247. (fname, mtype, rseqid) = iprot.readMessageBegin()
  248. if mtype == TMessageType.EXCEPTION:
  249. x = TApplicationException()
  250. x.read(iprot)
  251. iprot.readMessageEnd()
  252. raise x
  253. result = alter_sentry_role_delete_groups_result()
  254. result.read(iprot)
  255. iprot.readMessageEnd()
  256. if result.success is not None:
  257. return result.success
  258. raise TApplicationException(TApplicationException.MISSING_RESULT, "alter_sentry_role_delete_groups failed: unknown result")
  259. def list_sentry_roles_by_group(self, request):
  260. """
  261. Parameters:
  262. - request
  263. """
  264. self.send_list_sentry_roles_by_group(request)
  265. return self.recv_list_sentry_roles_by_group()
  266. def send_list_sentry_roles_by_group(self, request):
  267. self._oprot.writeMessageBegin('list_sentry_roles_by_group', TMessageType.CALL, self._seqid)
  268. args = list_sentry_roles_by_group_args()
  269. args.request = request
  270. args.write(self._oprot)
  271. self._oprot.writeMessageEnd()
  272. self._oprot.trans.flush()
  273. def recv_list_sentry_roles_by_group(self):
  274. iprot = self._iprot
  275. (fname, mtype, rseqid) = iprot.readMessageBegin()
  276. if mtype == TMessageType.EXCEPTION:
  277. x = TApplicationException()
  278. x.read(iprot)
  279. iprot.readMessageEnd()
  280. raise x
  281. result = list_sentry_roles_by_group_result()
  282. result.read(iprot)
  283. iprot.readMessageEnd()
  284. if result.success is not None:
  285. return result.success
  286. raise TApplicationException(TApplicationException.MISSING_RESULT, "list_sentry_roles_by_group failed: unknown result")
  287. def list_sentry_privileges_by_role(self, request):
  288. """
  289. Parameters:
  290. - request
  291. """
  292. self.send_list_sentry_privileges_by_role(request)
  293. return self.recv_list_sentry_privileges_by_role()
  294. def send_list_sentry_privileges_by_role(self, request):
  295. self._oprot.writeMessageBegin('list_sentry_privileges_by_role', TMessageType.CALL, self._seqid)
  296. args = list_sentry_privileges_by_role_args()
  297. args.request = request
  298. args.write(self._oprot)
  299. self._oprot.writeMessageEnd()
  300. self._oprot.trans.flush()
  301. def recv_list_sentry_privileges_by_role(self):
  302. iprot = self._iprot
  303. (fname, mtype, rseqid) = iprot.readMessageBegin()
  304. if mtype == TMessageType.EXCEPTION:
  305. x = TApplicationException()
  306. x.read(iprot)
  307. iprot.readMessageEnd()
  308. raise x
  309. result = list_sentry_privileges_by_role_result()
  310. result.read(iprot)
  311. iprot.readMessageEnd()
  312. if result.success is not None:
  313. return result.success
  314. raise TApplicationException(TApplicationException.MISSING_RESULT, "list_sentry_privileges_by_role failed: unknown result")
  315. def list_sentry_privileges_for_provider(self, request):
  316. """
  317. Parameters:
  318. - request
  319. """
  320. self.send_list_sentry_privileges_for_provider(request)
  321. return self.recv_list_sentry_privileges_for_provider()
  322. def send_list_sentry_privileges_for_provider(self, request):
  323. self._oprot.writeMessageBegin('list_sentry_privileges_for_provider', TMessageType.CALL, self._seqid)
  324. args = list_sentry_privileges_for_provider_args()
  325. args.request = request
  326. args.write(self._oprot)
  327. self._oprot.writeMessageEnd()
  328. self._oprot.trans.flush()
  329. def recv_list_sentry_privileges_for_provider(self):
  330. iprot = self._iprot
  331. (fname, mtype, rseqid) = iprot.readMessageBegin()
  332. if mtype == TMessageType.EXCEPTION:
  333. x = TApplicationException()
  334. x.read(iprot)
  335. iprot.readMessageEnd()
  336. raise x
  337. result = list_sentry_privileges_for_provider_result()
  338. result.read(iprot)
  339. iprot.readMessageEnd()
  340. if result.success is not None:
  341. return result.success
  342. raise TApplicationException(TApplicationException.MISSING_RESULT, "list_sentry_privileges_for_provider failed: unknown result")
  343. def drop_sentry_privilege(self, request):
  344. """
  345. Parameters:
  346. - request
  347. """
  348. self.send_drop_sentry_privilege(request)
  349. return self.recv_drop_sentry_privilege()
  350. def send_drop_sentry_privilege(self, request):
  351. self._oprot.writeMessageBegin('drop_sentry_privilege', TMessageType.CALL, self._seqid)
  352. args = drop_sentry_privilege_args()
  353. args.request = request
  354. args.write(self._oprot)
  355. self._oprot.writeMessageEnd()
  356. self._oprot.trans.flush()
  357. def recv_drop_sentry_privilege(self):
  358. iprot = self._iprot
  359. (fname, mtype, rseqid) = iprot.readMessageBegin()
  360. if mtype == TMessageType.EXCEPTION:
  361. x = TApplicationException()
  362. x.read(iprot)
  363. iprot.readMessageEnd()
  364. raise x
  365. result = drop_sentry_privilege_result()
  366. result.read(iprot)
  367. iprot.readMessageEnd()
  368. if result.success is not None:
  369. return result.success
  370. raise TApplicationException(TApplicationException.MISSING_RESULT, "drop_sentry_privilege failed: unknown result")
  371. def rename_sentry_privilege(self, request):
  372. """
  373. Parameters:
  374. - request
  375. """
  376. self.send_rename_sentry_privilege(request)
  377. return self.recv_rename_sentry_privilege()
  378. def send_rename_sentry_privilege(self, request):
  379. self._oprot.writeMessageBegin('rename_sentry_privilege', TMessageType.CALL, self._seqid)
  380. args = rename_sentry_privilege_args()
  381. args.request = request
  382. args.write(self._oprot)
  383. self._oprot.writeMessageEnd()
  384. self._oprot.trans.flush()
  385. def recv_rename_sentry_privilege(self):
  386. iprot = self._iprot
  387. (fname, mtype, rseqid) = iprot.readMessageBegin()
  388. if mtype == TMessageType.EXCEPTION:
  389. x = TApplicationException()
  390. x.read(iprot)
  391. iprot.readMessageEnd()
  392. raise x
  393. result = rename_sentry_privilege_result()
  394. result.read(iprot)
  395. iprot.readMessageEnd()
  396. if result.success is not None:
  397. return result.success
  398. raise TApplicationException(TApplicationException.MISSING_RESULT, "rename_sentry_privilege failed: unknown result")
  399. class Processor(Iface, TProcessor):
  400. def __init__(self, handler):
  401. self._handler = handler
  402. self._processMap = {}
  403. self._processMap["create_sentry_role"] = Processor.process_create_sentry_role
  404. self._processMap["drop_sentry_role"] = Processor.process_drop_sentry_role
  405. self._processMap["alter_sentry_role_grant_privilege"] = Processor.process_alter_sentry_role_grant_privilege
  406. self._processMap["alter_sentry_role_revoke_privilege"] = Processor.process_alter_sentry_role_revoke_privilege
  407. self._processMap["alter_sentry_role_add_groups"] = Processor.process_alter_sentry_role_add_groups
  408. self._processMap["alter_sentry_role_delete_groups"] = Processor.process_alter_sentry_role_delete_groups
  409. self._processMap["list_sentry_roles_by_group"] = Processor.process_list_sentry_roles_by_group
  410. self._processMap["list_sentry_privileges_by_role"] = Processor.process_list_sentry_privileges_by_role
  411. self._processMap["list_sentry_privileges_for_provider"] = Processor.process_list_sentry_privileges_for_provider
  412. self._processMap["drop_sentry_privilege"] = Processor.process_drop_sentry_privilege
  413. self._processMap["rename_sentry_privilege"] = Processor.process_rename_sentry_privilege
  414. def process(self, iprot, oprot):
  415. (name, type, seqid) = iprot.readMessageBegin()
  416. if name not in self._processMap:
  417. iprot.skip(TType.STRUCT)
  418. iprot.readMessageEnd()
  419. x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
  420. oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
  421. x.write(oprot)
  422. oprot.writeMessageEnd()
  423. oprot.trans.flush()
  424. return
  425. else:
  426. self._processMap[name](self, seqid, iprot, oprot)
  427. return True
  428. def process_create_sentry_role(self, seqid, iprot, oprot):
  429. args = create_sentry_role_args()
  430. args.read(iprot)
  431. iprot.readMessageEnd()
  432. result = create_sentry_role_result()
  433. try:
  434. result.success = self._handler.create_sentry_role(args.request)
  435. msg_type = TMessageType.REPLY
  436. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  437. raise
  438. except Exception as ex:
  439. msg_type = TMessageType.EXCEPTION
  440. logging.exception(ex)
  441. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  442. oprot.writeMessageBegin("create_sentry_role", msg_type, seqid)
  443. result.write(oprot)
  444. oprot.writeMessageEnd()
  445. oprot.trans.flush()
  446. def process_drop_sentry_role(self, seqid, iprot, oprot):
  447. args = drop_sentry_role_args()
  448. args.read(iprot)
  449. iprot.readMessageEnd()
  450. result = drop_sentry_role_result()
  451. try:
  452. result.success = self._handler.drop_sentry_role(args.request)
  453. msg_type = TMessageType.REPLY
  454. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  455. raise
  456. except Exception as ex:
  457. msg_type = TMessageType.EXCEPTION
  458. logging.exception(ex)
  459. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  460. oprot.writeMessageBegin("drop_sentry_role", msg_type, seqid)
  461. result.write(oprot)
  462. oprot.writeMessageEnd()
  463. oprot.trans.flush()
  464. def process_alter_sentry_role_grant_privilege(self, seqid, iprot, oprot):
  465. args = alter_sentry_role_grant_privilege_args()
  466. args.read(iprot)
  467. iprot.readMessageEnd()
  468. result = alter_sentry_role_grant_privilege_result()
  469. try:
  470. result.success = self._handler.alter_sentry_role_grant_privilege(args.request)
  471. msg_type = TMessageType.REPLY
  472. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  473. raise
  474. except Exception as ex:
  475. msg_type = TMessageType.EXCEPTION
  476. logging.exception(ex)
  477. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  478. oprot.writeMessageBegin("alter_sentry_role_grant_privilege", msg_type, seqid)
  479. result.write(oprot)
  480. oprot.writeMessageEnd()
  481. oprot.trans.flush()
  482. def process_alter_sentry_role_revoke_privilege(self, seqid, iprot, oprot):
  483. args = alter_sentry_role_revoke_privilege_args()
  484. args.read(iprot)
  485. iprot.readMessageEnd()
  486. result = alter_sentry_role_revoke_privilege_result()
  487. try:
  488. result.success = self._handler.alter_sentry_role_revoke_privilege(args.request)
  489. msg_type = TMessageType.REPLY
  490. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  491. raise
  492. except Exception as ex:
  493. msg_type = TMessageType.EXCEPTION
  494. logging.exception(ex)
  495. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  496. oprot.writeMessageBegin("alter_sentry_role_revoke_privilege", msg_type, seqid)
  497. result.write(oprot)
  498. oprot.writeMessageEnd()
  499. oprot.trans.flush()
  500. def process_alter_sentry_role_add_groups(self, seqid, iprot, oprot):
  501. args = alter_sentry_role_add_groups_args()
  502. args.read(iprot)
  503. iprot.readMessageEnd()
  504. result = alter_sentry_role_add_groups_result()
  505. try:
  506. result.success = self._handler.alter_sentry_role_add_groups(args.request)
  507. msg_type = TMessageType.REPLY
  508. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  509. raise
  510. except Exception as ex:
  511. msg_type = TMessageType.EXCEPTION
  512. logging.exception(ex)
  513. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  514. oprot.writeMessageBegin("alter_sentry_role_add_groups", msg_type, seqid)
  515. result.write(oprot)
  516. oprot.writeMessageEnd()
  517. oprot.trans.flush()
  518. def process_alter_sentry_role_delete_groups(self, seqid, iprot, oprot):
  519. args = alter_sentry_role_delete_groups_args()
  520. args.read(iprot)
  521. iprot.readMessageEnd()
  522. result = alter_sentry_role_delete_groups_result()
  523. try:
  524. result.success = self._handler.alter_sentry_role_delete_groups(args.request)
  525. msg_type = TMessageType.REPLY
  526. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  527. raise
  528. except Exception as ex:
  529. msg_type = TMessageType.EXCEPTION
  530. logging.exception(ex)
  531. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  532. oprot.writeMessageBegin("alter_sentry_role_delete_groups", msg_type, seqid)
  533. result.write(oprot)
  534. oprot.writeMessageEnd()
  535. oprot.trans.flush()
  536. def process_list_sentry_roles_by_group(self, seqid, iprot, oprot):
  537. args = list_sentry_roles_by_group_args()
  538. args.read(iprot)
  539. iprot.readMessageEnd()
  540. result = list_sentry_roles_by_group_result()
  541. try:
  542. result.success = self._handler.list_sentry_roles_by_group(args.request)
  543. msg_type = TMessageType.REPLY
  544. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  545. raise
  546. except Exception as ex:
  547. msg_type = TMessageType.EXCEPTION
  548. logging.exception(ex)
  549. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  550. oprot.writeMessageBegin("list_sentry_roles_by_group", msg_type, seqid)
  551. result.write(oprot)
  552. oprot.writeMessageEnd()
  553. oprot.trans.flush()
  554. def process_list_sentry_privileges_by_role(self, seqid, iprot, oprot):
  555. args = list_sentry_privileges_by_role_args()
  556. args.read(iprot)
  557. iprot.readMessageEnd()
  558. result = list_sentry_privileges_by_role_result()
  559. try:
  560. result.success = self._handler.list_sentry_privileges_by_role(args.request)
  561. msg_type = TMessageType.REPLY
  562. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  563. raise
  564. except Exception as ex:
  565. msg_type = TMessageType.EXCEPTION
  566. logging.exception(ex)
  567. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  568. oprot.writeMessageBegin("list_sentry_privileges_by_role", msg_type, seqid)
  569. result.write(oprot)
  570. oprot.writeMessageEnd()
  571. oprot.trans.flush()
  572. def process_list_sentry_privileges_for_provider(self, seqid, iprot, oprot):
  573. args = list_sentry_privileges_for_provider_args()
  574. args.read(iprot)
  575. iprot.readMessageEnd()
  576. result = list_sentry_privileges_for_provider_result()
  577. try:
  578. result.success = self._handler.list_sentry_privileges_for_provider(args.request)
  579. msg_type = TMessageType.REPLY
  580. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  581. raise
  582. except Exception as ex:
  583. msg_type = TMessageType.EXCEPTION
  584. logging.exception(ex)
  585. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  586. oprot.writeMessageBegin("list_sentry_privileges_for_provider", msg_type, seqid)
  587. result.write(oprot)
  588. oprot.writeMessageEnd()
  589. oprot.trans.flush()
  590. def process_drop_sentry_privilege(self, seqid, iprot, oprot):
  591. args = drop_sentry_privilege_args()
  592. args.read(iprot)
  593. iprot.readMessageEnd()
  594. result = drop_sentry_privilege_result()
  595. try:
  596. result.success = self._handler.drop_sentry_privilege(args.request)
  597. msg_type = TMessageType.REPLY
  598. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  599. raise
  600. except Exception as ex:
  601. msg_type = TMessageType.EXCEPTION
  602. logging.exception(ex)
  603. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  604. oprot.writeMessageBegin("drop_sentry_privilege", msg_type, seqid)
  605. result.write(oprot)
  606. oprot.writeMessageEnd()
  607. oprot.trans.flush()
  608. def process_rename_sentry_privilege(self, seqid, iprot, oprot):
  609. args = rename_sentry_privilege_args()
  610. args.read(iprot)
  611. iprot.readMessageEnd()
  612. result = rename_sentry_privilege_result()
  613. try:
  614. result.success = self._handler.rename_sentry_privilege(args.request)
  615. msg_type = TMessageType.REPLY
  616. except (TTransport.TTransportException, KeyboardInterrupt, SystemExit):
  617. raise
  618. except Exception as ex:
  619. msg_type = TMessageType.EXCEPTION
  620. logging.exception(ex)
  621. result = TApplicationException(TApplicationException.INTERNAL_ERROR, 'Internal error')
  622. oprot.writeMessageBegin("rename_sentry_privilege", msg_type, seqid)
  623. result.write(oprot)
  624. oprot.writeMessageEnd()
  625. oprot.trans.flush()
  626. # HELPER FUNCTIONS AND STRUCTURES
  627. class create_sentry_role_args(object):
  628. """
  629. Attributes:
  630. - request
  631. """
  632. thrift_spec = (
  633. None, # 0
  634. (1, TType.STRUCT, 'request', (TCreateSentryRoleRequest, TCreateSentryRoleRequest.thrift_spec), None, ), # 1
  635. )
  636. def __init__(self, request=None,):
  637. self.request = request
  638. def read(self, iprot):
  639. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  640. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  641. return
  642. iprot.readStructBegin()
  643. while True:
  644. (fname, ftype, fid) = iprot.readFieldBegin()
  645. if ftype == TType.STOP:
  646. break
  647. if fid == 1:
  648. if ftype == TType.STRUCT:
  649. self.request = TCreateSentryRoleRequest()
  650. self.request.read(iprot)
  651. else:
  652. iprot.skip(ftype)
  653. else:
  654. iprot.skip(ftype)
  655. iprot.readFieldEnd()
  656. iprot.readStructEnd()
  657. def write(self, oprot):
  658. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  659. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  660. return
  661. oprot.writeStructBegin('create_sentry_role_args')
  662. if self.request is not None:
  663. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  664. self.request.write(oprot)
  665. oprot.writeFieldEnd()
  666. oprot.writeFieldStop()
  667. oprot.writeStructEnd()
  668. def validate(self):
  669. return
  670. def __hash__(self):
  671. value = 17
  672. value = (value * 31) ^ hash(self.request)
  673. return value
  674. def __repr__(self):
  675. L = ['%s=%r' % (key, value)
  676. for key, value in self.__dict__.iteritems()]
  677. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  678. def __eq__(self, other):
  679. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  680. def __ne__(self, other):
  681. return not (self == other)
  682. class create_sentry_role_result(object):
  683. """
  684. Attributes:
  685. - success
  686. """
  687. thrift_spec = (
  688. (0, TType.STRUCT, 'success', (TCreateSentryRoleResponse, TCreateSentryRoleResponse.thrift_spec), None, ), # 0
  689. )
  690. def __init__(self, success=None,):
  691. self.success = success
  692. def read(self, iprot):
  693. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  694. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  695. return
  696. iprot.readStructBegin()
  697. while True:
  698. (fname, ftype, fid) = iprot.readFieldBegin()
  699. if ftype == TType.STOP:
  700. break
  701. if fid == 0:
  702. if ftype == TType.STRUCT:
  703. self.success = TCreateSentryRoleResponse()
  704. self.success.read(iprot)
  705. else:
  706. iprot.skip(ftype)
  707. else:
  708. iprot.skip(ftype)
  709. iprot.readFieldEnd()
  710. iprot.readStructEnd()
  711. def write(self, oprot):
  712. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  713. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  714. return
  715. oprot.writeStructBegin('create_sentry_role_result')
  716. if self.success is not None:
  717. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  718. self.success.write(oprot)
  719. oprot.writeFieldEnd()
  720. oprot.writeFieldStop()
  721. oprot.writeStructEnd()
  722. def validate(self):
  723. return
  724. def __hash__(self):
  725. value = 17
  726. value = (value * 31) ^ hash(self.success)
  727. return value
  728. def __repr__(self):
  729. L = ['%s=%r' % (key, value)
  730. for key, value in self.__dict__.iteritems()]
  731. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  732. def __eq__(self, other):
  733. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  734. def __ne__(self, other):
  735. return not (self == other)
  736. class drop_sentry_role_args(object):
  737. """
  738. Attributes:
  739. - request
  740. """
  741. thrift_spec = (
  742. None, # 0
  743. (1, TType.STRUCT, 'request', (TDropSentryRoleRequest, TDropSentryRoleRequest.thrift_spec), None, ), # 1
  744. )
  745. def __init__(self, request=None,):
  746. self.request = request
  747. def read(self, iprot):
  748. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  749. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  750. return
  751. iprot.readStructBegin()
  752. while True:
  753. (fname, ftype, fid) = iprot.readFieldBegin()
  754. if ftype == TType.STOP:
  755. break
  756. if fid == 1:
  757. if ftype == TType.STRUCT:
  758. self.request = TDropSentryRoleRequest()
  759. self.request.read(iprot)
  760. else:
  761. iprot.skip(ftype)
  762. else:
  763. iprot.skip(ftype)
  764. iprot.readFieldEnd()
  765. iprot.readStructEnd()
  766. def write(self, oprot):
  767. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  768. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  769. return
  770. oprot.writeStructBegin('drop_sentry_role_args')
  771. if self.request is not None:
  772. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  773. self.request.write(oprot)
  774. oprot.writeFieldEnd()
  775. oprot.writeFieldStop()
  776. oprot.writeStructEnd()
  777. def validate(self):
  778. return
  779. def __hash__(self):
  780. value = 17
  781. value = (value * 31) ^ hash(self.request)
  782. return value
  783. def __repr__(self):
  784. L = ['%s=%r' % (key, value)
  785. for key, value in self.__dict__.iteritems()]
  786. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  787. def __eq__(self, other):
  788. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  789. def __ne__(self, other):
  790. return not (self == other)
  791. class drop_sentry_role_result(object):
  792. """
  793. Attributes:
  794. - success
  795. """
  796. thrift_spec = (
  797. (0, TType.STRUCT, 'success', (TDropSentryRoleResponse, TDropSentryRoleResponse.thrift_spec), None, ), # 0
  798. )
  799. def __init__(self, success=None,):
  800. self.success = success
  801. def read(self, iprot):
  802. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  803. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  804. return
  805. iprot.readStructBegin()
  806. while True:
  807. (fname, ftype, fid) = iprot.readFieldBegin()
  808. if ftype == TType.STOP:
  809. break
  810. if fid == 0:
  811. if ftype == TType.STRUCT:
  812. self.success = TDropSentryRoleResponse()
  813. self.success.read(iprot)
  814. else:
  815. iprot.skip(ftype)
  816. else:
  817. iprot.skip(ftype)
  818. iprot.readFieldEnd()
  819. iprot.readStructEnd()
  820. def write(self, oprot):
  821. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  822. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  823. return
  824. oprot.writeStructBegin('drop_sentry_role_result')
  825. if self.success is not None:
  826. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  827. self.success.write(oprot)
  828. oprot.writeFieldEnd()
  829. oprot.writeFieldStop()
  830. oprot.writeStructEnd()
  831. def validate(self):
  832. return
  833. def __hash__(self):
  834. value = 17
  835. value = (value * 31) ^ hash(self.success)
  836. return value
  837. def __repr__(self):
  838. L = ['%s=%r' % (key, value)
  839. for key, value in self.__dict__.iteritems()]
  840. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  841. def __eq__(self, other):
  842. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  843. def __ne__(self, other):
  844. return not (self == other)
  845. class alter_sentry_role_grant_privilege_args(object):
  846. """
  847. Attributes:
  848. - request
  849. """
  850. thrift_spec = (
  851. None, # 0
  852. (1, TType.STRUCT, 'request', (TAlterSentryRoleGrantPrivilegeRequest, TAlterSentryRoleGrantPrivilegeRequest.thrift_spec), None, ), # 1
  853. )
  854. def __init__(self, request=None,):
  855. self.request = request
  856. def read(self, iprot):
  857. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  858. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  859. return
  860. iprot.readStructBegin()
  861. while True:
  862. (fname, ftype, fid) = iprot.readFieldBegin()
  863. if ftype == TType.STOP:
  864. break
  865. if fid == 1:
  866. if ftype == TType.STRUCT:
  867. self.request = TAlterSentryRoleGrantPrivilegeRequest()
  868. self.request.read(iprot)
  869. else:
  870. iprot.skip(ftype)
  871. else:
  872. iprot.skip(ftype)
  873. iprot.readFieldEnd()
  874. iprot.readStructEnd()
  875. def write(self, oprot):
  876. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  877. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  878. return
  879. oprot.writeStructBegin('alter_sentry_role_grant_privilege_args')
  880. if self.request is not None:
  881. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  882. self.request.write(oprot)
  883. oprot.writeFieldEnd()
  884. oprot.writeFieldStop()
  885. oprot.writeStructEnd()
  886. def validate(self):
  887. return
  888. def __hash__(self):
  889. value = 17
  890. value = (value * 31) ^ hash(self.request)
  891. return value
  892. def __repr__(self):
  893. L = ['%s=%r' % (key, value)
  894. for key, value in self.__dict__.iteritems()]
  895. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  896. def __eq__(self, other):
  897. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  898. def __ne__(self, other):
  899. return not (self == other)
  900. class alter_sentry_role_grant_privilege_result(object):
  901. """
  902. Attributes:
  903. - success
  904. """
  905. thrift_spec = (
  906. (0, TType.STRUCT, 'success', (TAlterSentryRoleGrantPrivilegeResponse, TAlterSentryRoleGrantPrivilegeResponse.thrift_spec), None, ), # 0
  907. )
  908. def __init__(self, success=None,):
  909. self.success = success
  910. def read(self, iprot):
  911. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  912. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  913. return
  914. iprot.readStructBegin()
  915. while True:
  916. (fname, ftype, fid) = iprot.readFieldBegin()
  917. if ftype == TType.STOP:
  918. break
  919. if fid == 0:
  920. if ftype == TType.STRUCT:
  921. self.success = TAlterSentryRoleGrantPrivilegeResponse()
  922. self.success.read(iprot)
  923. else:
  924. iprot.skip(ftype)
  925. else:
  926. iprot.skip(ftype)
  927. iprot.readFieldEnd()
  928. iprot.readStructEnd()
  929. def write(self, oprot):
  930. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  931. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  932. return
  933. oprot.writeStructBegin('alter_sentry_role_grant_privilege_result')
  934. if self.success is not None:
  935. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  936. self.success.write(oprot)
  937. oprot.writeFieldEnd()
  938. oprot.writeFieldStop()
  939. oprot.writeStructEnd()
  940. def validate(self):
  941. return
  942. def __hash__(self):
  943. value = 17
  944. value = (value * 31) ^ hash(self.success)
  945. return value
  946. def __repr__(self):
  947. L = ['%s=%r' % (key, value)
  948. for key, value in self.__dict__.iteritems()]
  949. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  950. def __eq__(self, other):
  951. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  952. def __ne__(self, other):
  953. return not (self == other)
  954. class alter_sentry_role_revoke_privilege_args(object):
  955. """
  956. Attributes:
  957. - request
  958. """
  959. thrift_spec = (
  960. None, # 0
  961. (1, TType.STRUCT, 'request', (TAlterSentryRoleRevokePrivilegeRequest, TAlterSentryRoleRevokePrivilegeRequest.thrift_spec), None, ), # 1
  962. )
  963. def __init__(self, request=None,):
  964. self.request = request
  965. def read(self, iprot):
  966. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  967. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  968. return
  969. iprot.readStructBegin()
  970. while True:
  971. (fname, ftype, fid) = iprot.readFieldBegin()
  972. if ftype == TType.STOP:
  973. break
  974. if fid == 1:
  975. if ftype == TType.STRUCT:
  976. self.request = TAlterSentryRoleRevokePrivilegeRequest()
  977. self.request.read(iprot)
  978. else:
  979. iprot.skip(ftype)
  980. else:
  981. iprot.skip(ftype)
  982. iprot.readFieldEnd()
  983. iprot.readStructEnd()
  984. def write(self, oprot):
  985. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  986. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  987. return
  988. oprot.writeStructBegin('alter_sentry_role_revoke_privilege_args')
  989. if self.request is not None:
  990. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  991. self.request.write(oprot)
  992. oprot.writeFieldEnd()
  993. oprot.writeFieldStop()
  994. oprot.writeStructEnd()
  995. def validate(self):
  996. return
  997. def __hash__(self):
  998. value = 17
  999. value = (value * 31) ^ hash(self.request)
  1000. return value
  1001. def __repr__(self):
  1002. L = ['%s=%r' % (key, value)
  1003. for key, value in self.__dict__.iteritems()]
  1004. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1005. def __eq__(self, other):
  1006. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1007. def __ne__(self, other):
  1008. return not (self == other)
  1009. class alter_sentry_role_revoke_privilege_result(object):
  1010. """
  1011. Attributes:
  1012. - success
  1013. """
  1014. thrift_spec = (
  1015. (0, TType.STRUCT, 'success', (TAlterSentryRoleRevokePrivilegeResponse, TAlterSentryRoleRevokePrivilegeResponse.thrift_spec), None, ), # 0
  1016. )
  1017. def __init__(self, success=None,):
  1018. self.success = success
  1019. def read(self, iprot):
  1020. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1021. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1022. return
  1023. iprot.readStructBegin()
  1024. while True:
  1025. (fname, ftype, fid) = iprot.readFieldBegin()
  1026. if ftype == TType.STOP:
  1027. break
  1028. if fid == 0:
  1029. if ftype == TType.STRUCT:
  1030. self.success = TAlterSentryRoleRevokePrivilegeResponse()
  1031. self.success.read(iprot)
  1032. else:
  1033. iprot.skip(ftype)
  1034. else:
  1035. iprot.skip(ftype)
  1036. iprot.readFieldEnd()
  1037. iprot.readStructEnd()
  1038. def write(self, oprot):
  1039. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1040. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1041. return
  1042. oprot.writeStructBegin('alter_sentry_role_revoke_privilege_result')
  1043. if self.success is not None:
  1044. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1045. self.success.write(oprot)
  1046. oprot.writeFieldEnd()
  1047. oprot.writeFieldStop()
  1048. oprot.writeStructEnd()
  1049. def validate(self):
  1050. return
  1051. def __hash__(self):
  1052. value = 17
  1053. value = (value * 31) ^ hash(self.success)
  1054. return value
  1055. def __repr__(self):
  1056. L = ['%s=%r' % (key, value)
  1057. for key, value in self.__dict__.iteritems()]
  1058. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1059. def __eq__(self, other):
  1060. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1061. def __ne__(self, other):
  1062. return not (self == other)
  1063. class alter_sentry_role_add_groups_args(object):
  1064. """
  1065. Attributes:
  1066. - request
  1067. """
  1068. thrift_spec = (
  1069. None, # 0
  1070. (1, TType.STRUCT, 'request', (TAlterSentryRoleAddGroupsRequest, TAlterSentryRoleAddGroupsRequest.thrift_spec), None, ), # 1
  1071. )
  1072. def __init__(self, request=None,):
  1073. self.request = request
  1074. def read(self, iprot):
  1075. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1076. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1077. return
  1078. iprot.readStructBegin()
  1079. while True:
  1080. (fname, ftype, fid) = iprot.readFieldBegin()
  1081. if ftype == TType.STOP:
  1082. break
  1083. if fid == 1:
  1084. if ftype == TType.STRUCT:
  1085. self.request = TAlterSentryRoleAddGroupsRequest()
  1086. self.request.read(iprot)
  1087. else:
  1088. iprot.skip(ftype)
  1089. else:
  1090. iprot.skip(ftype)
  1091. iprot.readFieldEnd()
  1092. iprot.readStructEnd()
  1093. def write(self, oprot):
  1094. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1095. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1096. return
  1097. oprot.writeStructBegin('alter_sentry_role_add_groups_args')
  1098. if self.request is not None:
  1099. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1100. self.request.write(oprot)
  1101. oprot.writeFieldEnd()
  1102. oprot.writeFieldStop()
  1103. oprot.writeStructEnd()
  1104. def validate(self):
  1105. return
  1106. def __hash__(self):
  1107. value = 17
  1108. value = (value * 31) ^ hash(self.request)
  1109. return value
  1110. def __repr__(self):
  1111. L = ['%s=%r' % (key, value)
  1112. for key, value in self.__dict__.iteritems()]
  1113. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1114. def __eq__(self, other):
  1115. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1116. def __ne__(self, other):
  1117. return not (self == other)
  1118. class alter_sentry_role_add_groups_result(object):
  1119. """
  1120. Attributes:
  1121. - success
  1122. """
  1123. thrift_spec = (
  1124. (0, TType.STRUCT, 'success', (TAlterSentryRoleAddGroupsResponse, TAlterSentryRoleAddGroupsResponse.thrift_spec), None, ), # 0
  1125. )
  1126. def __init__(self, success=None,):
  1127. self.success = success
  1128. def read(self, iprot):
  1129. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1130. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1131. return
  1132. iprot.readStructBegin()
  1133. while True:
  1134. (fname, ftype, fid) = iprot.readFieldBegin()
  1135. if ftype == TType.STOP:
  1136. break
  1137. if fid == 0:
  1138. if ftype == TType.STRUCT:
  1139. self.success = TAlterSentryRoleAddGroupsResponse()
  1140. self.success.read(iprot)
  1141. else:
  1142. iprot.skip(ftype)
  1143. else:
  1144. iprot.skip(ftype)
  1145. iprot.readFieldEnd()
  1146. iprot.readStructEnd()
  1147. def write(self, oprot):
  1148. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1149. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1150. return
  1151. oprot.writeStructBegin('alter_sentry_role_add_groups_result')
  1152. if self.success is not None:
  1153. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1154. self.success.write(oprot)
  1155. oprot.writeFieldEnd()
  1156. oprot.writeFieldStop()
  1157. oprot.writeStructEnd()
  1158. def validate(self):
  1159. return
  1160. def __hash__(self):
  1161. value = 17
  1162. value = (value * 31) ^ hash(self.success)
  1163. return value
  1164. def __repr__(self):
  1165. L = ['%s=%r' % (key, value)
  1166. for key, value in self.__dict__.iteritems()]
  1167. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1168. def __eq__(self, other):
  1169. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1170. def __ne__(self, other):
  1171. return not (self == other)
  1172. class alter_sentry_role_delete_groups_args(object):
  1173. """
  1174. Attributes:
  1175. - request
  1176. """
  1177. thrift_spec = (
  1178. None, # 0
  1179. (1, TType.STRUCT, 'request', (TAlterSentryRoleDeleteGroupsRequest, TAlterSentryRoleDeleteGroupsRequest.thrift_spec), None, ), # 1
  1180. )
  1181. def __init__(self, request=None,):
  1182. self.request = request
  1183. def read(self, iprot):
  1184. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1185. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1186. return
  1187. iprot.readStructBegin()
  1188. while True:
  1189. (fname, ftype, fid) = iprot.readFieldBegin()
  1190. if ftype == TType.STOP:
  1191. break
  1192. if fid == 1:
  1193. if ftype == TType.STRUCT:
  1194. self.request = TAlterSentryRoleDeleteGroupsRequest()
  1195. self.request.read(iprot)
  1196. else:
  1197. iprot.skip(ftype)
  1198. else:
  1199. iprot.skip(ftype)
  1200. iprot.readFieldEnd()
  1201. iprot.readStructEnd()
  1202. def write(self, oprot):
  1203. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1204. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1205. return
  1206. oprot.writeStructBegin('alter_sentry_role_delete_groups_args')
  1207. if self.request is not None:
  1208. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1209. self.request.write(oprot)
  1210. oprot.writeFieldEnd()
  1211. oprot.writeFieldStop()
  1212. oprot.writeStructEnd()
  1213. def validate(self):
  1214. return
  1215. def __hash__(self):
  1216. value = 17
  1217. value = (value * 31) ^ hash(self.request)
  1218. return value
  1219. def __repr__(self):
  1220. L = ['%s=%r' % (key, value)
  1221. for key, value in self.__dict__.iteritems()]
  1222. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1223. def __eq__(self, other):
  1224. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1225. def __ne__(self, other):
  1226. return not (self == other)
  1227. class alter_sentry_role_delete_groups_result(object):
  1228. """
  1229. Attributes:
  1230. - success
  1231. """
  1232. thrift_spec = (
  1233. (0, TType.STRUCT, 'success', (TAlterSentryRoleDeleteGroupsResponse, TAlterSentryRoleDeleteGroupsResponse.thrift_spec), None, ), # 0
  1234. )
  1235. def __init__(self, success=None,):
  1236. self.success = success
  1237. def read(self, iprot):
  1238. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1239. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1240. return
  1241. iprot.readStructBegin()
  1242. while True:
  1243. (fname, ftype, fid) = iprot.readFieldBegin()
  1244. if ftype == TType.STOP:
  1245. break
  1246. if fid == 0:
  1247. if ftype == TType.STRUCT:
  1248. self.success = TAlterSentryRoleDeleteGroupsResponse()
  1249. self.success.read(iprot)
  1250. else:
  1251. iprot.skip(ftype)
  1252. else:
  1253. iprot.skip(ftype)
  1254. iprot.readFieldEnd()
  1255. iprot.readStructEnd()
  1256. def write(self, oprot):
  1257. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1258. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1259. return
  1260. oprot.writeStructBegin('alter_sentry_role_delete_groups_result')
  1261. if self.success is not None:
  1262. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1263. self.success.write(oprot)
  1264. oprot.writeFieldEnd()
  1265. oprot.writeFieldStop()
  1266. oprot.writeStructEnd()
  1267. def validate(self):
  1268. return
  1269. def __hash__(self):
  1270. value = 17
  1271. value = (value * 31) ^ hash(self.success)
  1272. return value
  1273. def __repr__(self):
  1274. L = ['%s=%r' % (key, value)
  1275. for key, value in self.__dict__.iteritems()]
  1276. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1277. def __eq__(self, other):
  1278. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1279. def __ne__(self, other):
  1280. return not (self == other)
  1281. class list_sentry_roles_by_group_args(object):
  1282. """
  1283. Attributes:
  1284. - request
  1285. """
  1286. thrift_spec = (
  1287. None, # 0
  1288. (1, TType.STRUCT, 'request', (TListSentryRolesRequest, TListSentryRolesRequest.thrift_spec), None, ), # 1
  1289. )
  1290. def __init__(self, request=None,):
  1291. self.request = request
  1292. def read(self, iprot):
  1293. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1294. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1295. return
  1296. iprot.readStructBegin()
  1297. while True:
  1298. (fname, ftype, fid) = iprot.readFieldBegin()
  1299. if ftype == TType.STOP:
  1300. break
  1301. if fid == 1:
  1302. if ftype == TType.STRUCT:
  1303. self.request = TListSentryRolesRequest()
  1304. self.request.read(iprot)
  1305. else:
  1306. iprot.skip(ftype)
  1307. else:
  1308. iprot.skip(ftype)
  1309. iprot.readFieldEnd()
  1310. iprot.readStructEnd()
  1311. def write(self, oprot):
  1312. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1313. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1314. return
  1315. oprot.writeStructBegin('list_sentry_roles_by_group_args')
  1316. if self.request is not None:
  1317. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1318. self.request.write(oprot)
  1319. oprot.writeFieldEnd()
  1320. oprot.writeFieldStop()
  1321. oprot.writeStructEnd()
  1322. def validate(self):
  1323. return
  1324. def __hash__(self):
  1325. value = 17
  1326. value = (value * 31) ^ hash(self.request)
  1327. return value
  1328. def __repr__(self):
  1329. L = ['%s=%r' % (key, value)
  1330. for key, value in self.__dict__.iteritems()]
  1331. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1332. def __eq__(self, other):
  1333. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1334. def __ne__(self, other):
  1335. return not (self == other)
  1336. class list_sentry_roles_by_group_result(object):
  1337. """
  1338. Attributes:
  1339. - success
  1340. """
  1341. thrift_spec = (
  1342. (0, TType.STRUCT, 'success', (TListSentryRolesResponse, TListSentryRolesResponse.thrift_spec), None, ), # 0
  1343. )
  1344. def __init__(self, success=None,):
  1345. self.success = success
  1346. def read(self, iprot):
  1347. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1348. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1349. return
  1350. iprot.readStructBegin()
  1351. while True:
  1352. (fname, ftype, fid) = iprot.readFieldBegin()
  1353. if ftype == TType.STOP:
  1354. break
  1355. if fid == 0:
  1356. if ftype == TType.STRUCT:
  1357. self.success = TListSentryRolesResponse()
  1358. self.success.read(iprot)
  1359. else:
  1360. iprot.skip(ftype)
  1361. else:
  1362. iprot.skip(ftype)
  1363. iprot.readFieldEnd()
  1364. iprot.readStructEnd()
  1365. def write(self, oprot):
  1366. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1367. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1368. return
  1369. oprot.writeStructBegin('list_sentry_roles_by_group_result')
  1370. if self.success is not None:
  1371. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1372. self.success.write(oprot)
  1373. oprot.writeFieldEnd()
  1374. oprot.writeFieldStop()
  1375. oprot.writeStructEnd()
  1376. def validate(self):
  1377. return
  1378. def __hash__(self):
  1379. value = 17
  1380. value = (value * 31) ^ hash(self.success)
  1381. return value
  1382. def __repr__(self):
  1383. L = ['%s=%r' % (key, value)
  1384. for key, value in self.__dict__.iteritems()]
  1385. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1386. def __eq__(self, other):
  1387. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1388. def __ne__(self, other):
  1389. return not (self == other)
  1390. class list_sentry_privileges_by_role_args(object):
  1391. """
  1392. Attributes:
  1393. - request
  1394. """
  1395. thrift_spec = (
  1396. None, # 0
  1397. (1, TType.STRUCT, 'request', (TListSentryPrivilegesRequest, TListSentryPrivilegesRequest.thrift_spec), None, ), # 1
  1398. )
  1399. def __init__(self, request=None,):
  1400. self.request = request
  1401. def read(self, iprot):
  1402. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1403. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1404. return
  1405. iprot.readStructBegin()
  1406. while True:
  1407. (fname, ftype, fid) = iprot.readFieldBegin()
  1408. if ftype == TType.STOP:
  1409. break
  1410. if fid == 1:
  1411. if ftype == TType.STRUCT:
  1412. self.request = TListSentryPrivilegesRequest()
  1413. self.request.read(iprot)
  1414. else:
  1415. iprot.skip(ftype)
  1416. else:
  1417. iprot.skip(ftype)
  1418. iprot.readFieldEnd()
  1419. iprot.readStructEnd()
  1420. def write(self, oprot):
  1421. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1422. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1423. return
  1424. oprot.writeStructBegin('list_sentry_privileges_by_role_args')
  1425. if self.request is not None:
  1426. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1427. self.request.write(oprot)
  1428. oprot.writeFieldEnd()
  1429. oprot.writeFieldStop()
  1430. oprot.writeStructEnd()
  1431. def validate(self):
  1432. return
  1433. def __hash__(self):
  1434. value = 17
  1435. value = (value * 31) ^ hash(self.request)
  1436. return value
  1437. def __repr__(self):
  1438. L = ['%s=%r' % (key, value)
  1439. for key, value in self.__dict__.iteritems()]
  1440. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1441. def __eq__(self, other):
  1442. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1443. def __ne__(self, other):
  1444. return not (self == other)
  1445. class list_sentry_privileges_by_role_result(object):
  1446. """
  1447. Attributes:
  1448. - success
  1449. """
  1450. thrift_spec = (
  1451. (0, TType.STRUCT, 'success', (TListSentryPrivilegesResponse, TListSentryPrivilegesResponse.thrift_spec), None, ), # 0
  1452. )
  1453. def __init__(self, success=None,):
  1454. self.success = success
  1455. def read(self, iprot):
  1456. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1457. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1458. return
  1459. iprot.readStructBegin()
  1460. while True:
  1461. (fname, ftype, fid) = iprot.readFieldBegin()
  1462. if ftype == TType.STOP:
  1463. break
  1464. if fid == 0:
  1465. if ftype == TType.STRUCT:
  1466. self.success = TListSentryPrivilegesResponse()
  1467. self.success.read(iprot)
  1468. else:
  1469. iprot.skip(ftype)
  1470. else:
  1471. iprot.skip(ftype)
  1472. iprot.readFieldEnd()
  1473. iprot.readStructEnd()
  1474. def write(self, oprot):
  1475. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1476. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1477. return
  1478. oprot.writeStructBegin('list_sentry_privileges_by_role_result')
  1479. if self.success is not None:
  1480. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1481. self.success.write(oprot)
  1482. oprot.writeFieldEnd()
  1483. oprot.writeFieldStop()
  1484. oprot.writeStructEnd()
  1485. def validate(self):
  1486. return
  1487. def __hash__(self):
  1488. value = 17
  1489. value = (value * 31) ^ hash(self.success)
  1490. return value
  1491. def __repr__(self):
  1492. L = ['%s=%r' % (key, value)
  1493. for key, value in self.__dict__.iteritems()]
  1494. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1495. def __eq__(self, other):
  1496. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1497. def __ne__(self, other):
  1498. return not (self == other)
  1499. class list_sentry_privileges_for_provider_args(object):
  1500. """
  1501. Attributes:
  1502. - request
  1503. """
  1504. thrift_spec = (
  1505. None, # 0
  1506. (1, TType.STRUCT, 'request', (TListSentryPrivilegesForProviderRequest, TListSentryPrivilegesForProviderRequest.thrift_spec), None, ), # 1
  1507. )
  1508. def __init__(self, request=None,):
  1509. self.request = request
  1510. def read(self, iprot):
  1511. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1512. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1513. return
  1514. iprot.readStructBegin()
  1515. while True:
  1516. (fname, ftype, fid) = iprot.readFieldBegin()
  1517. if ftype == TType.STOP:
  1518. break
  1519. if fid == 1:
  1520. if ftype == TType.STRUCT:
  1521. self.request = TListSentryPrivilegesForProviderRequest()
  1522. self.request.read(iprot)
  1523. else:
  1524. iprot.skip(ftype)
  1525. else:
  1526. iprot.skip(ftype)
  1527. iprot.readFieldEnd()
  1528. iprot.readStructEnd()
  1529. def write(self, oprot):
  1530. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1531. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1532. return
  1533. oprot.writeStructBegin('list_sentry_privileges_for_provider_args')
  1534. if self.request is not None:
  1535. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1536. self.request.write(oprot)
  1537. oprot.writeFieldEnd()
  1538. oprot.writeFieldStop()
  1539. oprot.writeStructEnd()
  1540. def validate(self):
  1541. return
  1542. def __hash__(self):
  1543. value = 17
  1544. value = (value * 31) ^ hash(self.request)
  1545. return value
  1546. def __repr__(self):
  1547. L = ['%s=%r' % (key, value)
  1548. for key, value in self.__dict__.iteritems()]
  1549. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1550. def __eq__(self, other):
  1551. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1552. def __ne__(self, other):
  1553. return not (self == other)
  1554. class list_sentry_privileges_for_provider_result(object):
  1555. """
  1556. Attributes:
  1557. - success
  1558. """
  1559. thrift_spec = (
  1560. (0, TType.STRUCT, 'success', (TListSentryPrivilegesForProviderResponse, TListSentryPrivilegesForProviderResponse.thrift_spec), None, ), # 0
  1561. )
  1562. def __init__(self, success=None,):
  1563. self.success = success
  1564. def read(self, iprot):
  1565. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1566. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1567. return
  1568. iprot.readStructBegin()
  1569. while True:
  1570. (fname, ftype, fid) = iprot.readFieldBegin()
  1571. if ftype == TType.STOP:
  1572. break
  1573. if fid == 0:
  1574. if ftype == TType.STRUCT:
  1575. self.success = TListSentryPrivilegesForProviderResponse()
  1576. self.success.read(iprot)
  1577. else:
  1578. iprot.skip(ftype)
  1579. else:
  1580. iprot.skip(ftype)
  1581. iprot.readFieldEnd()
  1582. iprot.readStructEnd()
  1583. def write(self, oprot):
  1584. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1585. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1586. return
  1587. oprot.writeStructBegin('list_sentry_privileges_for_provider_result')
  1588. if self.success is not None:
  1589. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1590. self.success.write(oprot)
  1591. oprot.writeFieldEnd()
  1592. oprot.writeFieldStop()
  1593. oprot.writeStructEnd()
  1594. def validate(self):
  1595. return
  1596. def __hash__(self):
  1597. value = 17
  1598. value = (value * 31) ^ hash(self.success)
  1599. return value
  1600. def __repr__(self):
  1601. L = ['%s=%r' % (key, value)
  1602. for key, value in self.__dict__.iteritems()]
  1603. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1604. def __eq__(self, other):
  1605. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1606. def __ne__(self, other):
  1607. return not (self == other)
  1608. class drop_sentry_privilege_args(object):
  1609. """
  1610. Attributes:
  1611. - request
  1612. """
  1613. thrift_spec = (
  1614. None, # 0
  1615. (1, TType.STRUCT, 'request', (TDropPrivilegesRequest, TDropPrivilegesRequest.thrift_spec), None, ), # 1
  1616. )
  1617. def __init__(self, request=None,):
  1618. self.request = request
  1619. def read(self, iprot):
  1620. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1621. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1622. return
  1623. iprot.readStructBegin()
  1624. while True:
  1625. (fname, ftype, fid) = iprot.readFieldBegin()
  1626. if ftype == TType.STOP:
  1627. break
  1628. if fid == 1:
  1629. if ftype == TType.STRUCT:
  1630. self.request = TDropPrivilegesRequest()
  1631. self.request.read(iprot)
  1632. else:
  1633. iprot.skip(ftype)
  1634. else:
  1635. iprot.skip(ftype)
  1636. iprot.readFieldEnd()
  1637. iprot.readStructEnd()
  1638. def write(self, oprot):
  1639. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1640. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1641. return
  1642. oprot.writeStructBegin('drop_sentry_privilege_args')
  1643. if self.request is not None:
  1644. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1645. self.request.write(oprot)
  1646. oprot.writeFieldEnd()
  1647. oprot.writeFieldStop()
  1648. oprot.writeStructEnd()
  1649. def validate(self):
  1650. return
  1651. def __hash__(self):
  1652. value = 17
  1653. value = (value * 31) ^ hash(self.request)
  1654. return value
  1655. def __repr__(self):
  1656. L = ['%s=%r' % (key, value)
  1657. for key, value in self.__dict__.iteritems()]
  1658. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1659. def __eq__(self, other):
  1660. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1661. def __ne__(self, other):
  1662. return not (self == other)
  1663. class drop_sentry_privilege_result(object):
  1664. """
  1665. Attributes:
  1666. - success
  1667. """
  1668. thrift_spec = (
  1669. (0, TType.STRUCT, 'success', (TDropPrivilegesResponse, TDropPrivilegesResponse.thrift_spec), None, ), # 0
  1670. )
  1671. def __init__(self, success=None,):
  1672. self.success = success
  1673. def read(self, iprot):
  1674. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1675. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1676. return
  1677. iprot.readStructBegin()
  1678. while True:
  1679. (fname, ftype, fid) = iprot.readFieldBegin()
  1680. if ftype == TType.STOP:
  1681. break
  1682. if fid == 0:
  1683. if ftype == TType.STRUCT:
  1684. self.success = TDropPrivilegesResponse()
  1685. self.success.read(iprot)
  1686. else:
  1687. iprot.skip(ftype)
  1688. else:
  1689. iprot.skip(ftype)
  1690. iprot.readFieldEnd()
  1691. iprot.readStructEnd()
  1692. def write(self, oprot):
  1693. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1694. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1695. return
  1696. oprot.writeStructBegin('drop_sentry_privilege_result')
  1697. if self.success is not None:
  1698. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1699. self.success.write(oprot)
  1700. oprot.writeFieldEnd()
  1701. oprot.writeFieldStop()
  1702. oprot.writeStructEnd()
  1703. def validate(self):
  1704. return
  1705. def __hash__(self):
  1706. value = 17
  1707. value = (value * 31) ^ hash(self.success)
  1708. return value
  1709. def __repr__(self):
  1710. L = ['%s=%r' % (key, value)
  1711. for key, value in self.__dict__.iteritems()]
  1712. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1713. def __eq__(self, other):
  1714. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1715. def __ne__(self, other):
  1716. return not (self == other)
  1717. class rename_sentry_privilege_args(object):
  1718. """
  1719. Attributes:
  1720. - request
  1721. """
  1722. thrift_spec = (
  1723. None, # 0
  1724. (1, TType.STRUCT, 'request', (TRenamePrivilegesRequest, TRenamePrivilegesRequest.thrift_spec), None, ), # 1
  1725. )
  1726. def __init__(self, request=None,):
  1727. self.request = request
  1728. def read(self, iprot):
  1729. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1730. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1731. return
  1732. iprot.readStructBegin()
  1733. while True:
  1734. (fname, ftype, fid) = iprot.readFieldBegin()
  1735. if ftype == TType.STOP:
  1736. break
  1737. if fid == 1:
  1738. if ftype == TType.STRUCT:
  1739. self.request = TRenamePrivilegesRequest()
  1740. self.request.read(iprot)
  1741. else:
  1742. iprot.skip(ftype)
  1743. else:
  1744. iprot.skip(ftype)
  1745. iprot.readFieldEnd()
  1746. iprot.readStructEnd()
  1747. def write(self, oprot):
  1748. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1749. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1750. return
  1751. oprot.writeStructBegin('rename_sentry_privilege_args')
  1752. if self.request is not None:
  1753. oprot.writeFieldBegin('request', TType.STRUCT, 1)
  1754. self.request.write(oprot)
  1755. oprot.writeFieldEnd()
  1756. oprot.writeFieldStop()
  1757. oprot.writeStructEnd()
  1758. def validate(self):
  1759. return
  1760. def __hash__(self):
  1761. value = 17
  1762. value = (value * 31) ^ hash(self.request)
  1763. return value
  1764. def __repr__(self):
  1765. L = ['%s=%r' % (key, value)
  1766. for key, value in self.__dict__.iteritems()]
  1767. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1768. def __eq__(self, other):
  1769. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1770. def __ne__(self, other):
  1771. return not (self == other)
  1772. class rename_sentry_privilege_result(object):
  1773. """
  1774. Attributes:
  1775. - success
  1776. """
  1777. thrift_spec = (
  1778. (0, TType.STRUCT, 'success', (TRenamePrivilegesResponse, TRenamePrivilegesResponse.thrift_spec), None, ), # 0
  1779. )
  1780. def __init__(self, success=None,):
  1781. self.success = success
  1782. def read(self, iprot):
  1783. if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
  1784. fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
  1785. return
  1786. iprot.readStructBegin()
  1787. while True:
  1788. (fname, ftype, fid) = iprot.readFieldBegin()
  1789. if ftype == TType.STOP:
  1790. break
  1791. if fid == 0:
  1792. if ftype == TType.STRUCT:
  1793. self.success = TRenamePrivilegesResponse()
  1794. self.success.read(iprot)
  1795. else:
  1796. iprot.skip(ftype)
  1797. else:
  1798. iprot.skip(ftype)
  1799. iprot.readFieldEnd()
  1800. iprot.readStructEnd()
  1801. def write(self, oprot):
  1802. if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
  1803. oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
  1804. return
  1805. oprot.writeStructBegin('rename_sentry_privilege_result')
  1806. if self.success is not None:
  1807. oprot.writeFieldBegin('success', TType.STRUCT, 0)
  1808. self.success.write(oprot)
  1809. oprot.writeFieldEnd()
  1810. oprot.writeFieldStop()
  1811. oprot.writeStructEnd()
  1812. def validate(self):
  1813. return
  1814. def __hash__(self):
  1815. value = 17
  1816. value = (value * 31) ^ hash(self.success)
  1817. return value
  1818. def __repr__(self):
  1819. L = ['%s=%r' % (key, value)
  1820. for key, value in self.__dict__.iteritems()]
  1821. return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
  1822. def __eq__(self, other):
  1823. return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
  1824. def __ne__(self, other):
  1825. return not (self == other)