gitlab-runner-tart-driver 0.3.2__tar.gz → 0.3.3__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {gitlab-runner-tart-driver-0.3.2/gitlab_runner_tart_driver.egg-info → gitlab-runner-tart-driver-0.3.3}/PKG-INFO +1 -1
- gitlab-runner-tart-driver-0.3.3/gitlab_runner_tart_driver/__init__.py +1 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver/modules/tart.py +39 -27
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3/gitlab_runner_tart_driver.egg-info}/PKG-INFO +1 -1
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/setup.py +1 -1
- gitlab-runner-tart-driver-0.3.2/gitlab_runner_tart_driver/__init__.py +0 -1
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/LICENSE.txt +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/MANIFEST.in +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/README.md +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver/__main__.py +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver/cli.py +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver/commands/__init__.py +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver/commands/cleanup.py +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver/commands/config.py +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver/commands/prepare.py +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver/commands/run.py +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver/modules/__init__.py +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver/modules/gitlab_custom_command_config.py +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver/modules/gitlab_custom_driver_config.py +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver/modules/utils.py +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver/scripts/install-gitlab-runner.sh.j2 +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver.egg-info/SOURCES.txt +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver.egg-info/dependency_links.txt +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver.egg-info/entry_points.txt +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver.egg-info/not-zip-safe +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver.egg-info/requires.txt +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver.egg-info/top_level.txt +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/pyproject.toml +0 -0
- {gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/setup.cfg +0 -0
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.3.3"
|
@@ -28,6 +28,8 @@ class TartVmSpec(BaseModel):
|
|
28
28
|
display: str
|
29
29
|
running: bool
|
30
30
|
ip_address: str
|
31
|
+
os: str
|
32
|
+
size: str
|
31
33
|
|
32
34
|
|
33
35
|
class TartVolume(BaseModel):
|
@@ -126,43 +128,53 @@ class Tart(object):
|
|
126
128
|
# 'spec' will look like this:
|
127
129
|
#
|
128
130
|
# tart version < 2.7
|
129
|
-
#
|
130
|
-
#
|
131
|
+
# CPU Memory Disk Display Running
|
132
|
+
# 4 8192 46 1024x768 true
|
131
133
|
#
|
132
134
|
# tart version > 2.6
|
133
135
|
# CPU Memory Disk Size Display State
|
134
136
|
# 4 8192 50 20.794 1024x768 running
|
137
|
+
#
|
138
|
+
# tart version > 2.8
|
139
|
+
# OS CPU Memory Disk Size Display State
|
140
|
+
# darwin 4 8192 50 22.294 1024x768 stopped
|
141
|
+
|
142
|
+
# Read headers
|
143
|
+
headers = specs.split("\n")[0]
|
144
|
+
header_elements = headers.split(" ")
|
145
|
+
header_elements = [s.strip().lower() for s in header_elements if s]
|
135
146
|
|
136
|
-
|
137
|
-
spec_elements =
|
147
|
+
spec = specs.split("\n")[1]
|
148
|
+
spec_elements = spec.split(" ")
|
138
149
|
spec_elements = [s.strip() for s in spec_elements if s]
|
139
150
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
)
|
150
|
-
elif len(spec_elements) == 6:
|
151
|
-
spec = TartVmSpec(
|
152
|
-
cpu_count=int(spec_elements[0]),
|
153
|
-
memory=int(spec_elements[1]),
|
154
|
-
disk=int(spec_elements[2]),
|
155
|
-
display=spec_elements[4],
|
156
|
-
running=True if spec_elements[5].lower() == "running" else False,
|
157
|
-
ip_address="n/a",
|
158
|
-
)
|
151
|
+
specs = {}
|
152
|
+
for i, spec_element in enumerate(spec_elements):
|
153
|
+
specs[header_elements[i]] = spec_element
|
154
|
+
|
155
|
+
# check the state of the machine
|
156
|
+
vm_state = specs.get("state", "n/a")
|
157
|
+
running = True
|
158
|
+
if vm_state == "running" or vm_state == "true":
|
159
|
+
running = True
|
159
160
|
else:
|
160
|
-
|
161
|
+
running = False
|
162
|
+
|
163
|
+
vm_spec = TartVmSpec(
|
164
|
+
cpu_count=int(specs.get("cpu", 0)),
|
165
|
+
memory=int(specs.get("memory", 0)),
|
166
|
+
disk=int(specs.get("disk", 0)),
|
167
|
+
display=specs.get("display", "n/a"),
|
168
|
+
running=running,
|
169
|
+
ip_address="n/a",
|
170
|
+
os=specs.get("os", "n/a"),
|
171
|
+
size=specs.get("size", "n/a"),
|
172
|
+
)
|
161
173
|
|
162
|
-
if
|
163
|
-
|
174
|
+
if vm_spec.running:
|
175
|
+
vm_spec.ip_address = self.ip(name)
|
164
176
|
|
165
|
-
return
|
177
|
+
return vm_spec
|
166
178
|
|
167
179
|
def print_spec(self, name, tablefmt="fancy_grid"):
|
168
180
|
spec = self.get(name)
|
@@ -10,7 +10,7 @@ this_directory = os.path.abspath(os.path.dirname(__file__))
|
|
10
10
|
with open(os.path.join(this_directory, "README.md"), encoding="utf-8") as f:
|
11
11
|
long_description = f.read()
|
12
12
|
|
13
|
-
version = "0.3.
|
13
|
+
version = "0.3.3"
|
14
14
|
|
15
15
|
version = f"{version}{os.environ.get('PIP_VERSION_POSTFIX','')}"
|
16
16
|
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = "0.3.2"
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{gitlab-runner-tart-driver-0.3.2 → gitlab-runner-tart-driver-0.3.3}/gitlab_runner_tart_driver/cli.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|