Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythonPackages.cot: init at 2.2.1 #94179

Merged
merged 1 commit into from Aug 7, 2020
Merged

pythonPackages.cot: init at 2.2.1 #94179

merged 1 commit into from Aug 7, 2020

Conversation

evanjs
Copy link
Member

@evanjs evanjs commented Jul 29, 2020

Motivation for this change

COT (the Common OVF Tool) is a tool for editing Open Virtualization Format (.ovf, .ova) virtual appliances, with a focus on virtualized network appliances such as the Cisco CSR 1000V and Cisco IOS XRv platforms.

I figured this might be more accessible/helpful than e.g. https://code.vmware.com/tool/ovf

This might prove useful in adding ESXi virtualization support (Discourse post) if/once glennmatthews/cot#80 is resolved.

Until then, I think this might still be useful for managing OVF appliances, either during or after their generation, via the virtualbox-image and related expressions (VBoxManage export, etc).


Things done
  • Added cot to python-modules (>=python3)
  • Added cot to top-level/pythonPackages
  • Added cot to top-level/all-packages (via toPythonApplication)

Many tests are currently disabled

Without any filters, this is the output from a normal build (with all tests enabled):

python3.8-cot> =========== 189 failed, 380 passed, 24 warnings, 17 errors in 25.32s ===========
builder for '/nix/store/lakc1ns9f44l1hxw778207danhr37fim-python3.8-cot-2.2.0.drv' failed with exit code 1; last 10 log lines:
  ERROR COT/ui/tests/test_cli.py::TestCLIAddDisk::test_invalid_args - Assertion...
  ERROR COT/ui/tests/test_cli.py::TestCLIAddDisk::test_nonexistent_file - Asser...
  ERROR COT/ui/tests/test_cli.py::TestCLIEditHardware::test_args_append - Asser...
  ERROR COT/ui/tests/test_cli.py::TestCLIEditProperties::test_set_property_valid
  ERROR COT/vm_description/ovf/tests/test_item.py::TestOVFItem::test_set_property
  ERROR COT/vm_description/ovf/tests/test_item.py::TestOVFItem::test_set_property_no_modification
  ERROR COT/vm_description/ovf/tests/test_ovf.py::TestOVFInputOutput::test_input_output_bad_file
  ERROR COT/vm_description/ovf/tests/test_ovf.py::TestOVFInputOutput::test_tar_links
  ERROR COT/vm_description/ovf/tests/test_ovf.py::TestOVFInputOutput::test_tar_untar
  =========== 189 failed, 380 passed, 24 warnings, 17 errors in 25.32s ===========
[0 built (1 failed), 0.0 MiB DL]
error: build of '/nix/store/lakc1ns9f44l1hxw778207danhr37fim-python3.8-cot-2.2.0.drv' failed

I ignored any files with failing tests, vs disabling each test that was failing.
This results in 19 lines of --ignore vs ~189.

Note that this package needs py3k and up, and is disabled if !isPy3k in the expression.
I noticed that some packages do this checking earlier (e.g. in python-packages.nix), and while I'm not sure which is a best practice, the disabled attribute does prevent cot from being built with python2 (error: cot-2.2.1 not supported for interpreter python2.7)

@jonringer
Copy link
Contributor

please squash the maintainers commit

@evanjs
Copy link
Member Author

evanjs commented Aug 7, 2020

@jonringer I added a note to the disabledTests re ovftool and squashed the maintainers commit
I also removed the checkPhase so now only disabledTests is specified, making it a bit cleaner.

Anything else you can think of?

@evanjs
Copy link
Member Author

evanjs commented Aug 7, 2020

@ofborg build cot

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Result of nixpkgs-review pr 94179 1

2 packages built: - cot (python38Packages.cot) - python37Packages.cot

@jonringer jonringer merged commit 2b09ecd into NixOS:master Aug 7, 2020
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/virtualization-ova-ovf-esxi-support-extended-ova-customization/7536/2

@evanjs evanjs deleted the cot/init branch August 19, 2020 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants