Conversation
|
@giuseppe can you review this as well? Also, there seems to be a system_containers test failure on my system; if it shows here, can you help me understand what is going wrong? |
|
I think the test is failing because we are now calling the backend "ostree", while we used to refer to the type of image as "system" (or "user" for user mode). Could you try to |
Atomic/delete.py
Outdated
| results = 2 | ||
|
|
||
| return results | ||
| # def _delete_local(self, targets, force=False): |
There was a problem hiding this comment.
if this code is not needed anymore, let's just drop it
There was a problem hiding this comment.
Done, was holding it to be certain it passed tests first.
Atomic/delete.py
Outdated
| else: | ||
| results = self._delete_local(self.args.delete_targets, self.args.force) | ||
| return results | ||
| # Peform the delete |
Atomic/info.py
Outdated
| buf.write("Image Name: {}\n".format(info_name)) | ||
| buf.writelines(sorted(["{}: {}\n".format(k, v) for k,v in list(img_obj.labels.items())])) | ||
| if img_obj.template_variables_set: | ||
| buf.write("\n\nEnvironment variables with default value, but overridable with --set:\n") |
There was a problem hiding this comment.
let's use "Template variables", as they are not passed as env variables for system containers.
Atomic/info.py
Outdated
| buf.write("\n\nEnvironment variables with default value, but overridable with --set:\n") | ||
| buf.writelines(["{}: {}\n".format(k, v) for k,v in list(img_obj.template_variables_set.items())]) | ||
| if img_obj.template_variables_unset: | ||
| buf.write("\n\nEnvironment variables that has no default value, and must be set with --set:\n") |
Atomic/objects/image.py
Outdated
| s = round(size/p, 2) # pylint: disable=round-builtin,old-division | ||
| if s > 0: | ||
| return '%s %s' % (s, size_name[i]) | ||
| return '0B' No newline at end of file |
Atomic/delete.py
Outdated
| results = 2 | ||
|
|
||
| return results | ||
| # def _delete_local(self, targets, force=False): |
Atomic/images.py
Outdated
| class Images(Atomic): | ||
| def __init__(self): | ||
| super(Images, self).__init__() | ||
| self.beu = backendutils.BackendUtils() |
There was a problem hiding this comment.
Not crazy about self.beu. Means nothing to me.
4d7eb72 to
1a589db
Compare
|
@rhatdan addressed feedback, etc |
Atomic/atomic.py
Outdated
| self.syscontainers.set_args(self.args) | ||
| try: | ||
| self.syscontainers.set_args(self.args) | ||
| except (NameError, AttributeError): |
There was a problem hiding this comment.
Is this dangerous, since some args might not have been set?
|
Other then question LGTM. If it is good with @giuseppe Merge it. |
Covers all but verify and generate. This is a refactoring of the images subverbs (i.e. info, version, delete, ...) Added in a unittest for list and info.
1a589db to
4b43643
Compare
|
I'll revert that bit and see if it passes tests. @giuseppe reviewed it this morning. If it passes, Ill merge. |
|
📌 Commit 4b43643 has been approved by |
|
☀️ Test successful - status-atomicjenkins |
Covers all but verify and generate. This is a refactoring of the
images subverbs (i.e. info, version, delete, ...)