remotivelabs-cli 0.0.1a14__py3-none-any.whl → 0.0.1a15__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.
cli/cloud/auth_tokens.py CHANGED
@@ -35,11 +35,10 @@ def list_personal_access_tokens():
35
35
 
36
36
  @app.command(name="revoke", help="Revoke the specified access token")
37
37
  def revoke(
38
- token_name: str = typer.Option(..., help="Name of the access token to revoke")
38
+ name: str = typer.Option(..., help="Name of the access token to revoke")
39
39
  ):
40
40
  rest.ensure_auth_token()
41
- rest.handle_delete(f'/api/me/keys/{token_name}')
42
-
41
+ rest.handle_delete(f'/api/me/keys/{name}', success_msg="Successfully revoked")
43
42
 
44
43
  @app.command()
45
44
  def describe(
cli/cloud/rest_helper.py CHANGED
@@ -77,7 +77,7 @@ def has_access(url, params={}):
77
77
  return True
78
78
 
79
79
 
80
- def handle_delete(url, params={}, quiet=False):
80
+ def handle_delete(url, params={}, quiet=False, success_msg="Successfully deleted"):
81
81
  ensure_auth_token()
82
82
  r = requests.delete(f'{base_url}{url}', headers=headers, params=params)
83
83
  if r.status_code == 200:
@@ -85,7 +85,7 @@ def handle_delete(url, params={}, quiet=False):
85
85
  print(json.dumps(r.json()))
86
86
  if r.status_code == 204:
87
87
  if quiet == False:
88
- sys.stderr.write('Successfully deleted\n')
88
+ sys.stderr.write(f'{success_msg}\n')
89
89
  else:
90
90
  print(f'Got status code: {r.status_code}')
91
91
  print(r.text)
@@ -47,10 +47,10 @@ def list_files():
47
47
 
48
48
  @app.command(name="revoke", help="Revoke service account access token")
49
49
  def revoke(
50
+ name: str = typer.Argument(..., help="Access token name"),
50
51
  service_account: str = typer.Option(..., help="Service account name"),
51
- token_name: str = typer.Option(..., help="Access token name"),
52
52
  project: str = typer.Option(..., help="Project ID", envvar='REMOTIVE_CLOUD_PROJECT')):
53
- rest.handle_delete(f"/api/project/{project}/admin/accounts/{service_account}/keys/{token_name}")
53
+ rest.handle_delete(f"/api/project/{project}/admin/accounts/{service_account}/keys/{name}")
54
54
 
55
55
 
56
56
  def write_token(file, token):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: remotivelabs-cli
3
- Version: 0.0.1a14
3
+ Version: 0.0.1a15
4
4
  Summary:
5
5
  Author: Johan Rask
6
6
  Author-email: johan.rask@remotivelabs.com
@@ -3,22 +3,22 @@ cli/__init__.py,sha256=Mjnyow0Ngm-b-SdPz4HAkREzch7wKZ2Wy_hxLez49Lc,26
3
3
  cli/brokers.py,sha256=aBPML6W0nbCaAu5LLHGzRSiPV_TQhB17fi6oPWLb22U,5365
4
4
  cli/cloud/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
5
5
  cli/cloud/auth.py,sha256=h7xnxGQmZ-8AxbjXstXFy6BD6bsGbkIRlRaRAKZnlw0,3547
6
- cli/cloud/auth_tokens.py,sha256=Jz2dZdlqECYqy43nPqRybGfbhJAr9hq2XY5IgHwGCVc,3118
6
+ cli/cloud/auth_tokens.py,sha256=WWfnUlwc703JQrv9HyN2aRlhqYV-nvSE_gmrwXWvumE,3141
7
7
  cli/cloud/brokers.py,sha256=-R1F4gpiIUfr8__QbP_CxVvH7ZdVBgKApP7cregn5Uo,3685
8
8
  cli/cloud/cloud_cli.py,sha256=un7h49FbIf-IrW_51cTx2CyBK7pUg4A2zs768p9sxN8,1348
9
9
  cli/cloud/configs.py,sha256=2qPP4XxVO4deVT0srdP4FN6IRj4Ig4i9229thtfO710,3507
10
10
  cli/cloud/projects.py,sha256=w5Oqie80e59XrMNiIxIUIrlt3frYOyOpCbalkqZR7RQ,1366
11
11
  cli/cloud/recordings.py,sha256=k2bfRLD482HOwtjn4CYqGhdIuAzP0R0mzmlI1VrARlc,14592
12
- cli/cloud/rest_helper.py,sha256=A4gfNsrPyat6neK5hVe6fL8JXzacM2HPY9C71aZZmYE,3658
13
- cli/cloud/service_account_tokens.py,sha256=VrwF6WhIFzEFhgqbH1CsZeFz7fy2w8Ab_WHxAFYOq7U,2332
12
+ cli/cloud/rest_helper.py,sha256=8mHu-IEku-fs9mLYpJT0uPl7gwgx97dEEXN2u31Y7LA,3688
13
+ cli/cloud/service_account_tokens.py,sha256=24GebX1JE3ATHfUGSDTZzcH3qmeJ9x34VSpJYGNX_hM,2322
14
14
  cli/cloud/service_accounts.py,sha256=jpiSuteew_9hz0-dtLbLfavM9Bg6Zs2wTbS2a-4FVwM,1630
15
15
  cli/lib/__about__.py,sha256=GLOW8iEx5xn9rbJvxUH3elZiLi47SAWamMjdJTd52k0,141
16
16
  cli/lib/broker.py,sha256=6LUSC4-KhixXHkeclXZblIQ8xLMzmkoJp1ldcnp3el8,5123
17
17
  cli/remotive.py,sha256=3tqaStMU1HZy2BQoNjXOHXw4Sb0-yP80yP3R8SVGK_0,432
18
18
  cli/requirements.txt,sha256=k2SdtUayWWypl_24paMPHrMu7oH0E3_S_9w9zdAng-Y,77
19
19
  cli/test/test_simple.py,sha256=c60_dg5EmhNVmBC6rDcDP-tvKJCBqjIA2Z5Ym9ums4M,63
20
- remotivelabs_cli-0.0.1a14.dist-info/LICENSE,sha256=qDPP_yfuv1fF-u7EfexN-cN3M8aFgGVndGhGLovLKz0,608
21
- remotivelabs_cli-0.0.1a14.dist-info/METADATA,sha256=uiYq75plF6d51vAS7s6BtIxAfyV060e8B05JRi94hE0,2790
22
- remotivelabs_cli-0.0.1a14.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
23
- remotivelabs_cli-0.0.1a14.dist-info/entry_points.txt,sha256=lvDhPgagLqW_KTnLPCwKSqfYlEp-1uYVosRiPjsVj10,45
24
- remotivelabs_cli-0.0.1a14.dist-info/RECORD,,
20
+ remotivelabs_cli-0.0.1a15.dist-info/LICENSE,sha256=qDPP_yfuv1fF-u7EfexN-cN3M8aFgGVndGhGLovLKz0,608
21
+ remotivelabs_cli-0.0.1a15.dist-info/METADATA,sha256=6HskOGehbXCRNcid28l5CfYZy_RsfiBXHKQUBS6HvB0,2790
22
+ remotivelabs_cli-0.0.1a15.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
23
+ remotivelabs_cli-0.0.1a15.dist-info/entry_points.txt,sha256=lvDhPgagLqW_KTnLPCwKSqfYlEp-1uYVosRiPjsVj10,45
24
+ remotivelabs_cli-0.0.1a15.dist-info/RECORD,,