primitive 0.1.62__tar.gz → 0.1.64__tar.gz

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.
Files changed (109) hide show
  1. {primitive-0.1.62 → primitive-0.1.64}/PKG-INFO +3 -4
  2. {primitive-0.1.62 → primitive-0.1.64}/linux setup.md +2 -1
  3. {primitive-0.1.62 → primitive-0.1.64}/pyproject.toml +1 -1
  4. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/__about__.py +1 -1
  5. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/agent/actions.py +12 -1
  6. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/client.py +13 -10
  7. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/exec/actions.py +7 -28
  8. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/hardware/actions.py +2 -15
  9. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/hardware/graphql/fragments.py +2 -0
  10. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/hardware/graphql/queries.py +0 -10
  11. primitive-0.1.64/src/primitive/provisioning/actions.py +62 -0
  12. primitive-0.1.64/src/primitive/provisioning/graphql/queries.py +5 -0
  13. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/reservations/graphql/fragments.py +1 -1
  14. primitive-0.1.64/src/primitive/sim/__init__.py +0 -0
  15. primitive-0.1.64/src/primitive/utils/__init__.py +0 -0
  16. {primitive-0.1.62 → primitive-0.1.64}/uv.lock +3 -54
  17. {primitive-0.1.62 → primitive-0.1.64}/.git-hooks/pre-commit +0 -0
  18. {primitive-0.1.62 → primitive-0.1.64}/.gitattributes +0 -0
  19. {primitive-0.1.62 → primitive-0.1.64}/.github/workflows/lint.yml +0 -0
  20. {primitive-0.1.62 → primitive-0.1.64}/.github/workflows/publish.yml +0 -0
  21. {primitive-0.1.62 → primitive-0.1.64}/.gitignore +0 -0
  22. {primitive-0.1.62 → primitive-0.1.64}/.vscode/settings.json +0 -0
  23. {primitive-0.1.62 → primitive-0.1.64}/LICENSE.txt +0 -0
  24. {primitive-0.1.62 → primitive-0.1.64}/Makefile +0 -0
  25. {primitive-0.1.62 → primitive-0.1.64}/README.md +0 -0
  26. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/__init__.py +0 -0
  27. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/agent/__init__.py +0 -0
  28. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/agent/commands.py +0 -0
  29. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/agent/process.py +0 -0
  30. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/agent/provision.py +0 -0
  31. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/agent/runner.py +0 -0
  32. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/agent/uploader.py +0 -0
  33. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/auth/__init__.py +0 -0
  34. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/auth/actions.py +0 -0
  35. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/auth/commands.py +0 -0
  36. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/auth/graphql/__init__.py +0 -0
  37. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/auth/graphql/queries.py +0 -0
  38. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/cli.py +0 -0
  39. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/daemons/__init__.py +0 -0
  40. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/daemons/actions.py +0 -0
  41. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/daemons/commands.py +0 -0
  42. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/daemons/launch_agents.py +0 -0
  43. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/daemons/launch_service.py +0 -0
  44. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/exec/__init__.py +0 -0
  45. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/exec/commands.py +0 -0
  46. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/exec/interactive.py +0 -0
  47. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/files/__init__.py +0 -0
  48. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/files/actions.py +0 -0
  49. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/files/commands.py +0 -0
  50. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/files/graphql/__init__.py +0 -0
  51. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/files/graphql/mutations.py +0 -0
  52. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/git/__init__.py +0 -0
  53. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/git/actions.py +0 -0
  54. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/git/commands.py +0 -0
  55. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/git/graphql/__init__.py +0 -0
  56. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/git/graphql/queries.py +0 -0
  57. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/graphql/__init__.py +0 -0
  58. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/graphql/relay.py +0 -0
  59. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/graphql/sdk.py +0 -0
  60. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/graphql/utility_fragments.py +0 -0
  61. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/hardware/__init__.py +0 -0
  62. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/hardware/commands.py +0 -0
  63. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/hardware/graphql/__init__.py +0 -0
  64. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/hardware/graphql/mutations.py +0 -0
  65. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/jobs/__init__.py +0 -0
  66. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/jobs/actions.py +0 -0
  67. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/jobs/commands.py +0 -0
  68. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/jobs/graphql/__init__.py +0 -0
  69. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/jobs/graphql/fragments.py +0 -0
  70. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/jobs/graphql/mutations.py +0 -0
  71. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/jobs/graphql/queries.py +0 -0
  72. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/lint/__init__.py +0 -0
  73. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/lint/actions.py +0 -0
  74. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/lint/commands.py +0 -0
  75. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/organizations/__init__.py +0 -0
  76. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/organizations/actions.py +0 -0
  77. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/organizations/commands.py +0 -0
  78. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/organizations/graphql/__init__.py +0 -0
  79. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/organizations/graphql/fragments.py +0 -0
  80. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/organizations/graphql/mutations.py +0 -0
  81. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/organizations/graphql/queries.py +0 -0
  82. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/projects/__init__.py +0 -0
  83. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/projects/actions.py +0 -0
  84. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/projects/commands.py +0 -0
  85. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/projects/graphql/__init__.py +0 -0
  86. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/projects/graphql/fragments.py +0 -0
  87. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/projects/graphql/mutations.py +0 -0
  88. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/projects/graphql/queries.py +0 -0
  89. {primitive-0.1.62/src/primitive/reservations → primitive-0.1.64/src/primitive/provisioning}/__init__.py +0 -0
  90. {primitive-0.1.62/src/primitive/reservations → primitive-0.1.64/src/primitive/provisioning}/graphql/__init__.py +0 -0
  91. {primitive-0.1.62/src/primitive/sim → primitive-0.1.64/src/primitive/reservations}/__init__.py +0 -0
  92. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/reservations/actions.py +0 -0
  93. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/reservations/commands.py +0 -0
  94. {primitive-0.1.62/src/primitive/utils → primitive-0.1.64/src/primitive/reservations/graphql}/__init__.py +0 -0
  95. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/reservations/graphql/mutations.py +0 -0
  96. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/reservations/graphql/queries.py +0 -0
  97. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/sim/actions.py +0 -0
  98. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/sim/commands.py +0 -0
  99. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/utils/actions.py +0 -0
  100. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/utils/auth.py +0 -0
  101. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/utils/cache.py +0 -0
  102. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/utils/config.py +0 -0
  103. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/utils/files.py +0 -0
  104. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/utils/git.py +0 -0
  105. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/utils/memory_size.py +0 -0
  106. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/utils/printer.py +0 -0
  107. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/utils/shell.py +0 -0
  108. {primitive-0.1.62 → primitive-0.1.64}/src/primitive/utils/verible.py +0 -0
  109. {primitive-0.1.62 → primitive-0.1.64}/tests/__init__.py +0 -0
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: primitive
3
- Version: 0.1.62
3
+ Version: 0.1.64
4
4
  Project-URL: Documentation, https://github.com//primitivecorp/primitive-cli#readme
5
5
  Project-URL: Issues, https://github.com//primitivecorp/primitive-cli/issues
6
6
  Project-URL: Source, https://github.com//primitivecorp/primitive-cli
7
7
  Author-email: Dylan Stein <dylan@primitive.tech>, Chase Zimmerman <chase@primitive.tech>
8
- License-Expression: MIT
9
- License-File: LICENSE.txt
8
+ License: MIT
10
9
  Classifier: Development Status :: 4 - Beta
11
10
  Classifier: Programming Language :: Python
12
11
  Classifier: Programming Language :: Python :: 3
@@ -21,7 +20,7 @@ Requires-Python: >=3.11
21
20
  Requires-Dist: click
22
21
  Requires-Dist: gql[all]
23
22
  Requires-Dist: loguru
24
- Requires-Dist: paramiko[all]
23
+ Requires-Dist: paramiko[invoke]
25
24
  Requires-Dist: primitive-pal==0.1.4
26
25
  Requires-Dist: pyyaml
27
26
  Description-Content-Type: text/markdown
@@ -17,10 +17,11 @@ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
17
17
  # FOR UBUNTU
18
18
  sudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \
19
19
  libbz2-dev libreadline-dev libsqlite3-dev curl git \
20
- libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
20
+ libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev \ libkrb5-dev
21
21
 
22
22
  pyenv install 3.12.5
23
23
  pyenv global 3.12.5
24
24
  pip install --upgrade pip
25
25
 
26
+ curl -LsSf https://astral.sh/uv/install.sh | sh
26
27
  ```
@@ -32,7 +32,7 @@ dependencies = [
32
32
  "loguru",
33
33
  "pyyaml",
34
34
  "primitive-pal == 0.1.4",
35
- "paramiko[all]"
35
+ "paramiko[invoke]"
36
36
  ]
37
37
 
38
38
  [tool.uv]
@@ -1,4 +1,4 @@
1
1
  # SPDX-FileCopyrightText: 2024-present Dylan Stein <dylan@primitive.tech>
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
- __version__ = "0.1.62"
4
+ __version__ = "0.1.64"
@@ -20,7 +20,7 @@ class Agent(BaseAction):
20
20
  logger.info(" [*] primitive")
21
21
  logger.info(f" [*] Version: {__version__}")
22
22
 
23
- # Create cache dir if it doesnt exist
23
+ # Create cache dir if it doesn't exist
24
24
  cache_dir = get_sources_cache()
25
25
 
26
26
  # Create uploader
@@ -53,6 +53,11 @@ class Agent(BaseAction):
53
53
  logger.debug("Active Reservation:")
54
54
  logger.debug(f"Node ID: {active_reservation_id}")
55
55
  logger.debug(f"PK: {active_reservation_pk}")
56
+
57
+ logger.debug("Running pre provisioning steps for reservation.")
58
+ self.primitive.provisioning.add_reservation_authorized_keys(
59
+ reservation_id=active_reservation_id
60
+ )
56
61
  else:
57
62
  if (
58
63
  hardware["activeReservation"] is None
@@ -62,6 +67,12 @@ class Agent(BaseAction):
62
67
  logger.debug("Previous Reservation is Complete:")
63
68
  logger.debug(f"Node ID: {active_reservation_id}")
64
69
  logger.debug(f"PK: {active_reservation_pk}")
70
+ logger.debug(
71
+ "Running cleanup provisioning steps for reservation."
72
+ )
73
+ self.primitive.provisioning.remove_reservation_authorized_keys(
74
+ reservation_id=active_reservation_id
75
+ )
65
76
  active_reservation_id = None
66
77
  active_reservation_pk = None
67
78
 
@@ -1,20 +1,22 @@
1
1
  import sys
2
+
3
+ from loguru import logger
4
+
5
+ from .agent.actions import Agent
2
6
  from .auth.actions import Auth
3
- from .projects.actions import Projects
4
- from .utils.config import read_config_file
7
+ from .daemons.actions import Daemons
8
+ from .exec.actions import Exec
5
9
  from .files.actions import Files
6
- from .sim.actions import Sim
7
- from .hardware.actions import Hardware
8
- from .lint.actions import Lint
9
- from .agent.actions import Agent
10
10
  from .git.actions import Git
11
- from .daemons.actions import Daemons
11
+ from .hardware.actions import Hardware
12
12
  from .jobs.actions import Jobs
13
+ from .lint.actions import Lint
13
14
  from .organizations.actions import Organizations
14
- from .exec.actions import Exec
15
+ from .projects.actions import Projects
16
+ from .provisioning.actions import Provisioning
15
17
  from .reservations.actions import Reservations
16
-
17
- from loguru import logger
18
+ from .sim.actions import Sim
19
+ from .utils.config import read_config_file
18
20
 
19
21
  logger.disable("primitive")
20
22
 
@@ -67,6 +69,7 @@ class Primitive:
67
69
  self.git: Git = Git(self)
68
70
  self.daemons: Daemons = Daemons(self)
69
71
  self.exec: Exec = Exec(self)
72
+ self.provisioning: Provisioning = Provisioning(self)
70
73
 
71
74
  def get_host_config(self):
72
75
  self.full_config = read_config_file()
@@ -1,4 +1,3 @@
1
- import tempfile
2
1
  import typing
3
2
 
4
3
  from primitive.exec.interactive import interactive_shell
@@ -46,34 +45,16 @@ class Exec(BaseAction):
46
45
  reservation_id=reservation["id"], desired_status="in_progress"
47
46
  )
48
47
 
49
- ssh_credentials = self.primitive.hardware.get_hardware_ssh_credentials(
50
- hardware_id=hardware["id"]
51
- )
52
-
53
- ssh_hostname = ssh_credentials["ssh_hostname"]
54
- ssh_username = ssh_credentials["ssh_username"]
55
- ssh_password = ssh_credentials["ssh_password"]
56
- ssh_private_key = ssh_credentials["ssh_private_key"]
48
+ ssh_hostname = hardware["hostname"]
49
+ ssh_username = hardware["ssh_username"]
57
50
 
58
51
  ssh_client = SSHClient()
59
52
  ssh_client.load_system_host_keys()
60
- keyfile = None
61
- if ssh_private_key:
62
- keyfile = tempfile.NamedTemporaryFile()
63
- keyfile.write(ssh_private_key.encode())
64
- keyfile.flush()
65
- ssh_client.connect(
66
- hostname=ssh_hostname,
67
- username=ssh_username,
68
- key_filename=keyfile.name,
69
- )
70
- else:
71
- ssh_client.connect(
72
- hostname=ssh_hostname,
73
- username=ssh_username,
74
- pkey=ssh_private_key,
75
- password=ssh_password,
76
- )
53
+
54
+ ssh_client.connect(
55
+ hostname=ssh_hostname,
56
+ username=ssh_username,
57
+ )
77
58
 
78
59
  if command:
79
60
  formatted_command = " ".join(command)
@@ -86,8 +67,6 @@ class Exec(BaseAction):
86
67
  channel.invoke_shell()
87
68
  interactive_shell(channel)
88
69
  ssh_client.close()
89
- if keyfile:
90
- keyfile.close()
91
70
 
92
71
  if created_reservation_on_behalf_of_user:
93
72
  print("Cleaning up reservation.")
@@ -22,7 +22,7 @@ from .graphql.mutations import (
22
22
  hardware_update_mutation,
23
23
  register_hardware_mutation,
24
24
  )
25
- from .graphql.queries import hardware_list, hardware_ssh_credentials
25
+ from .graphql.queries import hardware_list
26
26
 
27
27
  if typing.TYPE_CHECKING:
28
28
  pass
@@ -303,7 +303,7 @@ class Hardware(BaseAction):
303
303
  # and headers are set correctly
304
304
  self.primitive.get_host_config()
305
305
  self.check_in_http(is_healthy=True)
306
- return True
306
+ return result
307
307
 
308
308
  @guard
309
309
  def update_hardware_system_info(self):
@@ -479,16 +479,3 @@ class Hardware(BaseAction):
479
479
  raise Exception(f"No hardware found with slug {hardware_identifier}")
480
480
 
481
481
  return hardware
482
-
483
- @guard
484
- def get_hardware_ssh_credentials(self, hardware_id: str):
485
- query = gql(hardware_ssh_credentials)
486
-
487
- variables = {
488
- "id": hardware_id,
489
- }
490
- result = self.primitive.session.execute(
491
- query, variable_values=variables, get_execution_result=True
492
- )
493
- ssh_credentials = result.data.get("hardware").get("sshCredentials")
494
- return ssh_credentials
@@ -10,6 +10,8 @@ fragment HardwareFragment on Hardware {
10
10
  isOnline
11
11
  isQuarantined
12
12
  isHealthy
13
+ hostname
14
+ sshUsername
13
15
  capabilities {
14
16
  id
15
17
  pk
@@ -29,13 +29,3 @@ query hardwareList(
29
29
  }
30
30
  """
31
31
  )
32
-
33
- hardware_ssh_credentials = """
34
- query hardwareSSHCredentials($id: GlobalID!) {
35
- hardware(id: $id) {
36
- id
37
- pk
38
- sshCredentials
39
- }
40
- }
41
- """
@@ -0,0 +1,62 @@
1
+ from pathlib import Path
2
+
3
+ from gql import gql
4
+
5
+ from primitive.utils.actions import BaseAction
6
+
7
+ from ..utils.auth import guard
8
+ from .graphql.queries import authorized_keys_query
9
+
10
+ HOME_DIRECTORY = Path.home()
11
+ AUTHORIZED_KEYS_FILEPATH = Path(HOME_DIRECTORY / ".ssh" / "authorized_keys")
12
+
13
+
14
+ class Provisioning(BaseAction):
15
+ @guard
16
+ def get_authorized_keys(self, reservation_id: str) -> str:
17
+ variables = {
18
+ "reservationId": reservation_id,
19
+ }
20
+ query = gql(authorized_keys_query)
21
+ result = self.primitive.session.execute(
22
+ query, variable_values=variables, get_execution_result=True
23
+ )
24
+ return result.data["authorizedKeys"]
25
+
26
+ def add_reservation_authorized_keys(self, reservation_id: str) -> None:
27
+ AUTHORIZED_KEYS_BACKUP_FILEPATH = Path(
28
+ HOME_DIRECTORY / ".ssh" / f"authorized_keys.bak-{reservation_id}"
29
+ )
30
+
31
+ if AUTHORIZED_KEYS_FILEPATH.exists():
32
+ AUTHORIZED_KEYS_BACKUP_FILEPATH.write_text(
33
+ AUTHORIZED_KEYS_FILEPATH.read_text()
34
+ )
35
+ else:
36
+ AUTHORIZED_KEYS_FILEPATH.touch()
37
+
38
+ authorized_keys = self.get_authorized_keys(reservation_id=reservation_id)
39
+
40
+ AUTHORIZED_KEYS_FILEPATH.write_text(
41
+ AUTHORIZED_KEYS_FILEPATH.read_text()
42
+ + f"\n## START PRIMITIVE SSH PUBLIC KEYS FOR RESERVATION ID {reservation_id}\n"
43
+ + authorized_keys
44
+ + f"\n## END PRIMITIVE SSH PUBLIC KEYS FOR RESERVATION ID {reservation_id}\n"
45
+ )
46
+
47
+ # self.primitive.sshd.reload()
48
+
49
+ def remove_reservation_authorized_keys(self, reservation_id: str) -> None:
50
+ AUTHORIZED_KEYS_BACKUP_FILEPATH = Path(
51
+ HOME_DIRECTORY / ".ssh" / f"authorized_keys.bak-{reservation_id}"
52
+ )
53
+
54
+ if AUTHORIZED_KEYS_BACKUP_FILEPATH.exists():
55
+ AUTHORIZED_KEYS_FILEPATH.write_text(
56
+ AUTHORIZED_KEYS_BACKUP_FILEPATH.read_text()
57
+ )
58
+ AUTHORIZED_KEYS_BACKUP_FILEPATH.unlink()
59
+ else:
60
+ AUTHORIZED_KEYS_FILEPATH.unlink()
61
+
62
+ # self.primitive.sshd.reload()
@@ -0,0 +1,5 @@
1
+ authorized_keys_query = """
2
+ query authorizedKeys($reservationId: GlobalID!) {
3
+ authorizedKeys(reservationId: $reservationId)
4
+ }
5
+ """
@@ -32,7 +32,7 @@ fragment ReservationFragment on Reservation {
32
32
  reason
33
33
  startedAt
34
34
  endedAt
35
- elapsedTime
35
+ # elapsedTime
36
36
  status
37
37
  conclusion
38
38
  conclusionMessage
File without changes
File without changes
@@ -434,29 +434,6 @@ wheels = [
434
434
  { url = "https://files.pythonhosted.org/packages/e3/dc/078bd6b304de790618ebb95e2aedaadb78f4527ac43a9ad8815f006636b6/graphql_core-3.2.5-py3-none-any.whl", hash = "sha256:2f150d5096448aa4f8ab26268567bbfeef823769893b39c1a2e1409590939c8a", size = 203189 },
435
435
  ]
436
436
 
437
- [[distribution]]
438
- name = "gssapi"
439
- version = "1.9.0"
440
- source = { registry = "https://pypi.org/simple" }
441
- dependencies = [
442
- { name = "decorator" },
443
- ]
444
- sdist = { url = "https://files.pythonhosted.org/packages/04/2f/fcffb772a00e658f608e657791484e3111a19a722b464e893fef35f35097/gssapi-1.9.0.tar.gz", hash = "sha256:f468fac8f3f5fca8f4d1ca19e3cd4d2e10bd91074e7285464b22715d13548afe", size = 94285 }
445
- wheels = [
446
- { url = "https://files.pythonhosted.org/packages/d1/14/39d320ac0c8c8ab05f4b48322d38aacb1572f7a51b2c5b908e51f141e367/gssapi-1.9.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:67d9be5e34403e47fb5749d5a1ad4e5a85b568e6a9add1695edb4a5b879f7560", size = 707912 },
447
- { url = "https://files.pythonhosted.org/packages/cc/04/5d46c5b37b96f87a8efb320ab347e876db2493e1aedaa29068936b063097/gssapi-1.9.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:11e9b92cef11da547fc8c210fa720528fd854038504103c1b15ae2a89dce5fcd", size = 683779 },
448
- { url = "https://files.pythonhosted.org/packages/05/29/b673b4ed994796e133e3e7eeec0d8991b7dcbed6b0b4bfc95ac0fe3871ff/gssapi-1.9.0-cp311-cp311-win32.whl", hash = "sha256:6c5f8a549abd187687440ec0b72e5b679d043d620442b3637d31aa2766b27cbe", size = 776532 },
449
- { url = "https://files.pythonhosted.org/packages/31/07/3bb8521da3ca89e202b50f8de46a9e8e793be7f24318a4f7aaaa022d15d1/gssapi-1.9.0-cp311-cp311-win_amd64.whl", hash = "sha256:59e1a1a9a6c5dc430dc6edfcf497f5ca00cf417015f781c9fac2e85652cd738f", size = 874225 },
450
- { url = "https://files.pythonhosted.org/packages/98/f1/76477c66aa9f2abc9ab53f936e9085402d6697db93834437e5ee651e5106/gssapi-1.9.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:b66a98827fbd2864bf8993677a039d7ba4a127ca0d2d9ed73e0ef4f1baa7fd7f", size = 698148 },
451
- { url = "https://files.pythonhosted.org/packages/96/34/b737e2a46efc63c6a6ad3baf0f3a8484d7698e673874b060a7d52abfa7b4/gssapi-1.9.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2bddd1cc0c9859c5e0fd96d4d88eb67bd498fdbba45b14cdccfe10bfd329479f", size = 681597 },
452
- { url = "https://files.pythonhosted.org/packages/71/4b/4cbb8b6bc34ed02591e05af48bd4722facb99b10defc321e3b177114dbeb/gssapi-1.9.0-cp312-cp312-win32.whl", hash = "sha256:10134db0cf01bd7d162acb445762dbcc58b5c772a613e17c46cf8ad956c4dfec", size = 770295 },
453
- { url = "https://files.pythonhosted.org/packages/c1/73/33a65e9d6c5ea43cdb1ee184b201678adaf3a7bbb4f7a1c7a80195c884ac/gssapi-1.9.0-cp312-cp312-win_amd64.whl", hash = "sha256:e28c7d45da68b7e36ed3fb3326744bfe39649f16e8eecd7b003b082206039c76", size = 867625 },
454
- { url = "https://files.pythonhosted.org/packages/bc/bb/6fbbeff852b6502e1d33858865822ab2e0efd84764caad1ce9e3ed182b53/gssapi-1.9.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:cea344246935b5337e6f8a69bb6cc45619ab3a8d74a29fcb0a39fd1e5843c89c", size = 686934 },
455
- { url = "https://files.pythonhosted.org/packages/c9/72/89eeb28a2cebe8ec3a560be79e89092913d6cf9dc68b32eb4774e8bac785/gssapi-1.9.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:1a5786bd9fcf435bd0c87dc95ae99ad68cefcc2bcc80c71fef4cb0ccdfb40f1e", size = 672249 },
456
- { url = "https://files.pythonhosted.org/packages/5f/f7/3d9d4a198e34b844dc4acb25891e2405f8dca069a8f346f51127196436bc/gssapi-1.9.0-cp313-cp313-win32.whl", hash = "sha256:c99959a9dd62358e370482f1691e936cb09adf9a69e3e10d4f6a097240e9fd28", size = 755372 },
457
- { url = "https://files.pythonhosted.org/packages/67/00/f4be5211d5dd8e9ca551ded3071b1433880729006768123e1ee7b744b1d8/gssapi-1.9.0-cp313-cp313-win_amd64.whl", hash = "sha256:a2e43f50450e81fe855888c53df70cdd385ada979db79463b38031710a12acd9", size = 845005 },
458
- ]
459
-
460
437
  [[distribution]]
461
438
  name = "h11"
462
439
  version = "0.14.0"
@@ -680,11 +657,8 @@ wheels = [
680
657
  ]
681
658
 
682
659
  [distribution.optional-dependencies]
683
- all = [
684
- { name = "gssapi", marker = "platform_system != 'Windows'" },
660
+ invoke = [
685
661
  { name = "invoke" },
686
- { name = "pyasn1" },
687
- { name = "pywin32", marker = "platform_system == 'Windows'" },
688
662
  ]
689
663
 
690
664
  [[distribution]]
@@ -710,13 +684,13 @@ wheels = [
710
684
 
711
685
  [[distribution]]
712
686
  name = "primitive"
713
- version = "0.1.60"
687
+ version = "0.1.62"
714
688
  source = { editable = "." }
715
689
  dependencies = [
716
690
  { name = "click" },
717
691
  { name = "gql", extra = ["all"] },
718
692
  { name = "loguru" },
719
- { name = "paramiko", extra = ["all"] },
693
+ { name = "paramiko", extra = ["invoke"] },
720
694
  { name = "primitive-pal" },
721
695
  { name = "pyyaml" },
722
696
  ]
@@ -848,15 +822,6 @@ wheels = [
848
822
  { url = "https://files.pythonhosted.org/packages/8e/37/efad0257dc6e593a18957422533ff0f87ede7c9c6ea010a2177d738fb82f/pure_eval-0.2.3-py3-none-any.whl", hash = "sha256:1db8e35b67b3d218d818ae653e27f06c3aa420901fa7b081ca98cbedc874e0d0", size = 11842 },
849
823
  ]
850
824
 
851
- [[distribution]]
852
- name = "pyasn1"
853
- version = "0.6.1"
854
- source = { registry = "https://pypi.org/simple" }
855
- sdist = { url = "https://files.pythonhosted.org/packages/ba/e9/01f1a64245b89f039897cb0130016d79f77d52669aae6ee7b159a6c4c018/pyasn1-0.6.1.tar.gz", hash = "sha256:6f580d2bdd84365380830acf45550f2511469f673cb4a5ae3857a3170128b034", size = 145322 }
856
- wheels = [
857
- { url = "https://files.pythonhosted.org/packages/c8/f1/d6a797abb14f6283c0ddff96bbdd46937f64122b8c925cab503dd37f8214/pyasn1-0.6.1-py3-none-any.whl", hash = "sha256:0d632f46f2ba09143da3a8afe9e33fb6f92fa2320ab7e886e2d0f7672af84629", size = 83135 },
858
- ]
859
-
860
825
  [[distribution]]
861
826
  name = "pycparser"
862
827
  version = "2.22"
@@ -920,22 +885,6 @@ wheels = [
920
885
  { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892 },
921
886
  ]
922
887
 
923
- [[distribution]]
924
- name = "pywin32"
925
- version = "308"
926
- source = { registry = "https://pypi.org/simple" }
927
- wheels = [
928
- { url = "https://files.pythonhosted.org/packages/eb/e2/02652007469263fe1466e98439831d65d4ca80ea1a2df29abecedf7e47b7/pywin32-308-cp311-cp311-win32.whl", hash = "sha256:5d8c8015b24a7d6855b1550d8e660d8daa09983c80e5daf89a273e5c6fb5095a", size = 5928156 },
929
- { url = "https://files.pythonhosted.org/packages/48/ef/f4fb45e2196bc7ffe09cad0542d9aff66b0e33f6c0954b43e49c33cad7bd/pywin32-308-cp311-cp311-win_amd64.whl", hash = "sha256:575621b90f0dc2695fec346b2d6302faebd4f0f45c05ea29404cefe35d89442b", size = 6559559 },
930
- { url = "https://files.pythonhosted.org/packages/79/ef/68bb6aa865c5c9b11a35771329e95917b5559845bd75b65549407f9fc6b4/pywin32-308-cp311-cp311-win_arm64.whl", hash = "sha256:100a5442b7332070983c4cd03f2e906a5648a5104b8a7f50175f7906efd16bb6", size = 7972495 },
931
- { url = "https://files.pythonhosted.org/packages/00/7c/d00d6bdd96de4344e06c4afbf218bc86b54436a94c01c71a8701f613aa56/pywin32-308-cp312-cp312-win32.whl", hash = "sha256:587f3e19696f4bf96fde9d8a57cec74a57021ad5f204c9e627e15c33ff568897", size = 5939729 },
932
- { url = "https://files.pythonhosted.org/packages/21/27/0c8811fbc3ca188f93b5354e7c286eb91f80a53afa4e11007ef661afa746/pywin32-308-cp312-cp312-win_amd64.whl", hash = "sha256:00b3e11ef09ede56c6a43c71f2d31857cf7c54b0ab6e78ac659497abd2834f47", size = 6543015 },
933
- { url = "https://files.pythonhosted.org/packages/9d/0f/d40f8373608caed2255781a3ad9a51d03a594a1248cd632d6a298daca693/pywin32-308-cp312-cp312-win_arm64.whl", hash = "sha256:9b4de86c8d909aed15b7011182c8cab38c8850de36e6afb1f0db22b8959e3091", size = 7976033 },
934
- { url = "https://files.pythonhosted.org/packages/a9/a4/aa562d8935e3df5e49c161b427a3a2efad2ed4e9cf81c3de636f1fdddfd0/pywin32-308-cp313-cp313-win32.whl", hash = "sha256:1c44539a37a5b7b21d02ab34e6a4d314e0788f1690d65b48e9b0b89f31abbbed", size = 5938579 },
935
- { url = "https://files.pythonhosted.org/packages/c7/50/b0efb8bb66210da67a53ab95fd7a98826a97ee21f1d22949863e6d588b22/pywin32-308-cp313-cp313-win_amd64.whl", hash = "sha256:fd380990e792eaf6827fcb7e187b2b4b1cede0585e3d0c9e84201ec27b9905e4", size = 6542056 },
936
- { url = "https://files.pythonhosted.org/packages/26/df/2b63e3e4f2df0224f8aaf6d131f54fe4e8c96400eb9df563e2aae2e1a1f9/pywin32-308-cp313-cp313-win_arm64.whl", hash = "sha256:ef313c46d4c18dfb82a2431e3051ac8f112ccee1a34f29c263c583c568db63cd", size = 7974986 },
937
- ]
938
-
939
888
  [[distribution]]
940
889
  name = "pyyaml"
941
890
  version = "6.0.2"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes