├── .config └── gitlint │ └── rules │ └── on-behalf-of-marker.py ├── .github └── workflows │ ├── commit-lint.yml │ ├── qa.yml │ ├── reuse.yaml │ └── stale.yaml ├── .gitignore ├── .gitlab-ci.yml ├── .gitlint ├── .typos.toml ├── CONTRIBUTING.md ├── LICENSE ├── LICENSES └── Apache-2.0.txt ├── README.md ├── REUSE.toml ├── checks └── default.nix ├── flake.lock ├── flake.nix ├── lib ├── gitlab-ci.nix └── rootwrap-conf.nix ├── modules ├── compute │ ├── compute.nix │ ├── neutron.nix │ └── nova.nix ├── controller │ ├── generic.nix │ ├── glance.nix │ ├── horizon-settings.py │ ├── horizon.nix │ ├── keystone.nix │ ├── neutron.nix │ ├── nova.nix │ ├── openstack-controller.nix │ └── placement.nix ├── default.nix └── testing │ └── default.nix ├── packages ├── automaton.nix ├── castellan.nix ├── cursive.nix ├── default.nix ├── django-debreach.nix ├── django-discover-runner.nix ├── django-pyscss.nix ├── doc8.nix ├── enmerkar.nix ├── etcd3gw.nix ├── flake8-logging-format.nix ├── futurist.nix ├── gabbi.nix ├── glance-store.nix ├── glance.nix ├── horizon.nix ├── jsonpath-rw-ext.nix ├── keystone.nix ├── keystoneauth1.nix ├── keystonemiddleware.nix ├── microversion-parse.nix ├── neutron-lib.nix ├── neutron.nix ├── nova.nix ├── openstack-placement.nix ├── os-brick.nix ├── os-client-config.nix ├── os-ken.nix ├── os-resource-classes.nix ├── os-traits.nix ├── os-vif.nix ├── os-win.nix ├── osc-placement.nix ├── oslo-cache.nix ├── oslo-concurrency.nix ├── oslo-config.nix ├── oslo-context.nix ├── oslo-db.nix ├── oslo-i18n.nix ├── oslo-limit.nix ├── oslo-log.nix ├── oslo-messaging.nix ├── oslo-metrics.nix ├── oslo-middleware.nix ├── oslo-policy.nix ├── oslo-privsep.nix ├── oslo-reports.nix ├── oslo-rootwrap.nix ├── oslo-serialization.nix ├── oslo-service.nix ├── oslo-upgradecheck.nix ├── oslo-utils.nix ├── oslo-versionedobjects.nix ├── oslo-vmware.nix ├── oslotest.nix ├── osprofiler.nix ├── ovs.nix ├── ovsdbapp.nix ├── pre-commit.nix ├── pycadf.nix ├── python-barbicanclient.nix ├── python-binary-memcached.nix ├── python-designateclient.nix ├── python-keystoneclient.nix ├── python-neutronclient.nix ├── python-swiftclient.nix ├── reno.nix ├── sphinxcontrib-svg2pdfconverter.nix ├── suds-community.nix ├── taskflow.nix ├── tooz.nix ├── uhashring.nix ├── xstatic-angular-bootstrap.nix ├── xstatic-angular-fileupload.nix ├── xstatic-angular-gettext.nix ├── xstatic-angular-lrdragndrop.nix ├── xstatic-angular-schema-form.nix ├── xstatic-angular.nix ├── xstatic-bootstrap-datepicker.nix ├── xstatic-bootstrap-scss.nix ├── xstatic-bootswatch.nix ├── xstatic-d3.nix ├── xstatic-font-awesome.nix ├── xstatic-hogan.nix ├── xstatic-jasmine.nix ├── xstatic-jquery-migrate.nix ├── xstatic-jquery-quicksearch.nix ├── xstatic-jquery-tablesorter.nix ├── xstatic-jsencrypt.nix ├── xstatic-mdi.nix ├── xstatic-objectpath.nix ├── xstatic-rickshaw.nix ├── xstatic-roboto-fontface.nix ├── xstatic-smart-table.nix ├── xstatic-spin.nix ├── xstatic-term-js.nix ├── xstatic-tv4.nix └── zake.nix └── tests ├── default.nix ├── openstack-default-setup.nix └── openstack-live-migration.nix /.config/gitlint/rules/on-behalf-of-marker.py: -------------------------------------------------------------------------------- 1 | from gitlint.rules import LineRule, RuleViolation, CommitMessageTitle, CommitRule 2 | 3 | class BodyContainsOnBehalfOfSAPMarker(CommitRule): 4 | """Enforce that each commit coming from an SAP contractor contains an 5 | "On-behalf-of SAP user@sap.com" marker. 6 | """ 7 | 8 | # A rule MUST have a human friendly name 9 | name = "body-requires-on-behalf-of-sap" 10 | 11 | # A rule MUST have a *unique* id 12 | # We recommend starting with UC (for User-defined Commit-rule). 13 | id = "UC-sap" 14 | 15 | # Lower-case list of contractors 16 | contractors = [ 17 | "@cyberus-technology.de" 18 | ] 19 | 20 | # Marker followed by " name.surname@sap.com" 21 | marker = "On-behalf-of: SAP" 22 | 23 | def validate(self, commit): 24 | if "@sap.com" in commit.author_email.lower(): 25 | return 26 | 27 | # Allow third-party open-source contributions 28 | if not any(contractor in commit.author_email.lower() for contractor in self.contractors): 29 | return 30 | 31 | for line in commit.message.body: 32 | if line.startswith(self.marker) and "@sap.com" in line.lower(): 33 | return 34 | 35 | msg = f"Body does not contain a '{self.marker} user@sap.com' line" 36 | return [RuleViolation(self.id, msg, line_nr=1)] 37 | -------------------------------------------------------------------------------- /.github/workflows/commit-lint.yml: -------------------------------------------------------------------------------- 1 | name: Commit Lint 2 | on: [ pull_request ] 3 | jobs: 4 | gitlint: 5 | name: Check commit messages 6 | runs-on: ubuntu-latest 7 | steps: 8 | - name: Checkout repository 9 | uses: actions/checkout@v4 10 | with: 11 | ref: ${{ github.event.pull_request.head.sha }} 12 | fetch-depth: 0 13 | - name: Set up Python 3.10 14 | uses: actions/setup-python@v3 15 | with: 16 | python-version: "3.10" 17 | - name: Install dependencies 18 | run: | 19 | python -m pip install --upgrade pip 20 | pip install --upgrade gitlint 21 | - name: Lint git commit messages 22 | run: | 23 | gitlint --commits origin/$GITHUB_BASE_REF.. 24 | -------------------------------------------------------------------------------- /.github/workflows/qa.yml: -------------------------------------------------------------------------------- 1 | name: QA 2 | on: [ pull_request ] 3 | jobs: 4 | flake-check: 5 | name: Nix Flake Checks 6 | runs-on: ubuntu-latest 7 | steps: 8 | - uses: actions/checkout@v4 9 | - uses: cachix/install-nix-action@v30 10 | - name: Nix Flake Checks 11 | run: nix flake check --all-systems 12 | nixos-tests: 13 | runs-on: large_runner_16core_64gb 14 | steps: 15 | - uses: actions/checkout@v4 16 | - uses: cachix/install-nix-action@v30 17 | - name: Basic setup 18 | run: | 19 | nix build .#tests.x86_64-linux.openstack-default-setup.driver 20 | ./result/bin/nixos-test-driver 21 | - name: Live migration 22 | run: | 23 | nix build .#tests.x86_64-linux.openstack-live-migration.driver 24 | ./result/bin/nixos-test-driver 25 | -------------------------------------------------------------------------------- /.github/workflows/reuse.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright 2024 SAP SE or an SAP affiliate company and cobaltcore-dev contributors 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | name: REUSE Compliance Check 6 | 7 | on: [push, pull_request] 8 | 9 | jobs: 10 | test: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v4 14 | - name: REUSE Compliance Check 15 | uses: fsfe/reuse-action@v5 16 | -------------------------------------------------------------------------------- /.github/workflows/stale.yaml: -------------------------------------------------------------------------------- 1 | # SPDX-FileCopyrightText: Copyright 2024 SAP SE or an SAP affiliate company and cobaltcore-dev contributors 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | name: Close inactive issues 6 | on: 7 | schedule: 8 | - cron: "35 1 * * *" 9 | 10 | jobs: 11 | close-issues: 12 | runs-on: ubuntu-latest 13 | permissions: 14 | issues: write 15 | pull-requests: write 16 | steps: 17 | - uses: actions/stale@v9 18 | with: 19 | repo-token: ${{ secrets.GITHUB_TOKEN }} 20 | days-before-issue-stale: 90 21 | days-before-issue-close: 14 22 | days-before-pr-stale: 45 23 | days-before-pr-close: 14 24 | stale-issue-label: "stale" 25 | stale-issue-message: "This issue is stale because it has been open for 90 days with no activity." 26 | close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale." 27 | stale-pr-label: 'stale' 28 | stale-pr-message: "This PR is stale because it has been open for 45 days with no activity." 29 | close-pr-message: "This PR was closed because it has been inactive for 14 days since being marked as stale." 30 | exempt-issue-labels: "pinned,security,backlog,bug" 31 | exempt-pr-labels: "pinned,security,backlog,bug" 32 | exempt-draft-pr: true 33 | 34 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | result* 2 | /.pre-commit-config.yaml 3 | /.nixos-test-history 4 | 5 | # Produced by gitlint 6 | __pycache__ 7 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | stages: 2 | - check 3 | - generate 4 | - run 5 | 6 | check:style: 7 | stage: check 8 | interruptible: true 9 | tags: 10 | - native-nix 11 | before_script: 12 | - git config --global --add url.${CI_SERVER_PROTOCOL}://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/.insteadOf "git@${CI_SERVER_HOST}:" 13 | - git config --global --add url.${CI_SERVER_PROTOCOL}://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/.insteadOf "ssh://git@${CI_SERVER_HOST}/" 14 | script: 15 | - nix flake check 16 | 17 | generate_ci: 18 | stage: generate 19 | tags: 20 | - native-nix 21 | script: 22 | - nix build .#ci 23 | - nix-shell -p yq --command "cat result | yq -y" > generated_ci.yaml 24 | artifacts: 25 | paths: 26 | - generated_ci.yaml 27 | 28 | trigger_ci: 29 | stage: run 30 | needs: 31 | - generate_ci 32 | trigger: 33 | include: 34 | - artifact: generated_ci.yaml 35 | job: generate_ci 36 | strategy: depend -------------------------------------------------------------------------------- /.gitlint: -------------------------------------------------------------------------------- 1 | [general] 2 | extra-path=.config/gitlint/rules 3 | regex-style-search=true 4 | ignore=body-is-missing 5 | 6 | [ignore-by-author-name] 7 | regex=dependabot 8 | ignore=all 9 | 10 | # default 72 11 | [title-max-length] 12 | line-length=72 13 | 14 | # default 80 15 | [body-max-line-length] 16 | line-length=72 17 | 18 | # Empty bodies are fine 19 | [body-min-length] 20 | min-length=0 21 | -------------------------------------------------------------------------------- /.typos.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cobaltcore-dev/openstack-nix/50ad7c18bce749908109977ba4d50e20f341f425/.typos.toml -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | # Contributing 8 | 9 | ## Code of Conduct 10 | 11 | All members of the project community must abide by the [SAP Open Source Code of Conduct](https://github.com/SAP/.github/blob/main/CODE_OF_CONDUCT.md). 12 | Only by respecting each other we can develop a productive, collaborative community. 13 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting [a project maintainer](.reuse/dep5). 14 | 15 | ## Engaging in Our Project 16 | 17 | We use GitHub to manage reviews of pull requests. 18 | 19 | * If you are a new contributor, see: [Steps to Contribute](#steps-to-contribute) 20 | 21 | * Before implementing your change, create an issue that describes the problem you would like to solve or the code that should be enhanced. Please note that you are willing to work on that issue. 22 | 23 | * The team will review the issue and decide whether it should be implemented as a pull request. In that case, they will assign the issue to you. If the team decides against picking up the issue, the team will post a comment with an explanation. 24 | 25 | ## Steps to Contribute 26 | 27 | Should you wish to work on an issue, please claim it first by commenting on the GitHub issue that you want to work on. This is to prevent duplicated efforts from other contributors on the same issue. 28 | 29 | If you have questions about one of the issues, please comment on them, and one of the maintainers will clarify. 30 | 31 | ## Contributing Code or Documentation 32 | 33 | You are welcome to contribute code in order to fix a bug or to implement a new feature that is logged as an issue. 34 | 35 | The following rule governs code contributions: 36 | 37 | * Contributions must be licensed under the [Apache 2.0 License](./LICENSE) 38 | * Due to legal reasons, contributors will be asked to accept a Developer Certificate of Origin (DCO) when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses [the standard DCO text of the Linux Foundation](https://developercertificate.org/). 39 | 40 | ## Issues and Planning 41 | 42 | * We use GitHub issues to track bugs and enhancement requests. 43 | 44 | * Please provide as much context as possible when you open an issue. The information you provide must be comprehensive enough to reproduce that issue for the assignee. 45 | -------------------------------------------------------------------------------- /LICENSES/Apache-2.0.txt: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. 10 | 11 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. 12 | 13 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 14 | 15 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. 16 | 17 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. 18 | 19 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. 20 | 21 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). 22 | 23 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. 24 | 25 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." 26 | 27 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 28 | 29 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 30 | 31 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 32 | 33 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: 34 | 35 | (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and 36 | 37 | (b) You must cause any modified files to carry prominent notices stating that You changed the files; and 38 | 39 | (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and 40 | 41 | (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. 42 | 43 | You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 44 | 45 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 46 | 47 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 48 | 49 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 50 | 51 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 52 | 53 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. 54 | 55 | END OF TERMS AND CONDITIONS 56 | 57 | APPENDIX: How to apply the Apache License to your work. 58 | 59 | To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. 60 | 61 | Copyright [yyyy] [name of copyright owner] 62 | 63 | Licensed under the Apache License, Version 2.0 (the "License"); 64 | you may not use this file except in compliance with the License. 65 | You may obtain a copy of the License at 66 | 67 | http://www.apache.org/licenses/LICENSE-2.0 68 | 69 | Unless required by applicable law or agreed to in writing, software 70 | distributed under the License is distributed on an "AS IS" BASIS, 71 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 72 | See the License for the specific language governing permissions and 73 | limitations under the License. 74 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![REUSE status](https://api.reuse.software/badge/github.com/cobaltcore-dev/openstack-nix)](https://api.reuse.software/info/github.com/cobaltcore-dev/openstack-nix) 2 | 3 | # openstack-nix 4 | 5 | A set of Nix packages and NixOS modules allowing the usage of OpenStack in NixOS. 6 | 7 | ## About this project 8 | 9 | The repository contains the following things: 10 | 11 | * Nix package descriptions for OpenStack libraries and executables 12 | * NixOS modules starting the basic OpenStack services (Keystone, Glance, Placement, Neutron, Nova, ...) 13 | * NixOS modules mimicking the configuration for a [minimal OpenStack setup](https://docs.openstack.org/install-guide/openstack-services.html#minimal-deployment-for-2024-2-dalmatian) (e.g. create users and databases) 14 | * NixOS tests checking basic OpenStack functions (e.g. server creation and live migration) 15 | 16 | ## Style Checks 17 | 18 | In our repo, we use [pre-commit](https://pre-commit.com/) via 19 | [pre-commit-hooks.nix](https://github.com/cachix/pre-commit-hooks.nix) 20 | to enforce a consistent style. 21 | 22 | If you use the `nix develop` environment, pre-commit will be 23 | automatically configured for you and fix or flag any style issues when you 24 | commit. 25 | 26 | When style changes are necessary on files that were not touched in the 27 | commit, you can re-run the checks on all files using: 28 | 29 | ```console 30 | $ pre-commit run --all-files 31 | ``` 32 | 33 | This happens for example when the version of the style checking tool 34 | is updated or its configuration was changed. 35 | 36 | Single checks can be skipped using the 37 | [`SKIP`](https://pre-commit.com/#temporarily-disabling-hooks) 38 | environment variable, if they are problematic. As an escape hatch, use 39 | `git commit --no-verify` to avoid running _any_ checks. 40 | 41 | ## Usage 42 | 43 | The `openstack-nix` repository exports everything via a nix flake. You can 44 | specify it as a flake input in your project or directly build certain 45 | attributes. 46 | 47 | ### OpenStack Nix packages 48 | 49 | The OpenStack services require a number of dependencies that are exported via: 50 | 51 | ```nix 52 | openstack-nix.packages 53 | ``` 54 | 55 | ### NixOS modules 56 | 57 | The NixOS modules are exported via 58 | 59 | ```nix 60 | openstack-nix.nixosModules 61 | ``` 62 | 63 | There are modules to setup the OpenStack controller, an OpenStack compute node 64 | and modules simplifying the creation of new NixOS tests. 65 | 66 | ### NixOS tests 67 | 68 | The NixOS tests are located under the `tests` attribute. To execute a NixOS test 69 | do the following: 70 | 71 | ```shell 72 | nix build .#tests.x86_64-linux. 73 | ``` 74 | 75 | If you want an interactive session: 76 | 77 | ```shell 78 | nix build .#tests.x86_64-linux..driverInteractive 79 | ./result/bin/nixos-test-driver 80 | ``` 81 | 82 | ## Scope 83 | 84 | OpenStack is a very large and super actively maintained project. We are aware that we cannot keep track of all its development or offer every single configuration option via NixOS modules. 85 | 86 | Therefore, we restricted ourself to the following goals for this project: 87 | 88 | * Make it easy to use OpenStack in a sane and useful default configuration. 89 | * Allow the user to customize packages and configurations, but there are no 90 | guarantees that things will work then. 91 | 92 | ## Support, Feedback, Contributing 93 | 94 | This project is open to feature requests/suggestions, bug reports etc. via [GitHub issues](https://github.com/cobaltcore-dev/openstack-nix/issues). Contribution and feedback are encouraged and always welcome. For more information about how to contribute, the project structure, as well as additional contribution information, see our [Contribution Guidelines](CONTRIBUTING.md). 95 | 96 | ## Security / Disclosure 97 | If you find any bug that may be a security problem, please follow our instructions at [in our security policy](https://github.com/cobaltcore-dev/openstack-nix/security/policy) on how to report it. Please do not create GitHub issues for security-related doubts or problems. 98 | 99 | ## Code of Conduct 100 | 101 | We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone. By participating in this project, you agree to abide by its [Code of Conduct](https://github.com/SAP/.github/blob/main/CODE_OF_CONDUCT.md) at all times. 102 | 103 | ## Licensing 104 | 105 | Copyright 2025 SAP SE or an SAP affiliate company and openstack-nix contributors. Please see our [LICENSE](LICENSE) for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available [via the REUSE tool](https://api.reuse.software/info/github.com/cobaltcore-dev/openstack-nix). 106 | -------------------------------------------------------------------------------- /REUSE.toml: -------------------------------------------------------------------------------- 1 | version = 1 2 | SPDX-PackageName = "openstack-nix" 3 | SPDX-PackageSupplier = "ospo@sap.com" 4 | SPDX-PackageDownloadLocation = "https://github.com/cobaltcore-dev/openstack-nix" 5 | SPDX-PackageComment = "The code in this project may include calls to APIs (\"API Calls\") of\n SAP or third-party products or services developed outside of this project\n (\"External Products\").\n \"APIs\" means application programming interfaces, as well as their respective\n specifications and implementing code that allows software to communicate with\n other software.\n API Calls to External Products are not licensed under the open source license\n that governs this project. The use of such API Calls and related External\n Products are subject to applicable additional agreements with the relevant\n provider of the External Products. In no event shall the open source license\n that governs this project grant any rights in or to any External Products,or\n alter, expand or supersede any terms of the applicable additional agreements.\n If you have a valid license agreement with SAP for the use of a particular SAP\n External Product, then you may make use of any API Calls included in this\n project's code for that SAP External Product, subject to the terms of such\n license agreement. If you do not have a valid license agreement for the use of\n a particular SAP External Product, then you may only make use of any API Calls\n in this project for that SAP External Product for your internal, non-productive\n and non-commercial test and evaluation of such API Calls. Nothing herein grants\n you any rights to use or access any SAP External Product, or provide any third\n parties the right to use of access any SAP External Product, through API Calls." 6 | 7 | [[annotations]] 8 | path = "**" 9 | precedence = "aggregate" 10 | SPDX-FileCopyrightText = "2025 SAP SE or an SAP affiliate company and openstack-nix contributors" 11 | SPDX-License-Identifier = "Apache-2.0" 12 | -------------------------------------------------------------------------------- /checks/default.nix: -------------------------------------------------------------------------------- 1 | { pkgs, pre-commit-hooks-run }: 2 | { 3 | pre-commit-check = pre-commit-hooks-run { 4 | src = pkgs.nix-gitignore.gitignoreSource [ ] ../.; 5 | tools = pkgs; 6 | hooks = { 7 | nixfmt-rfc-style.enable = true; 8 | deadnix.enable = true; 9 | typos.enable = true; 10 | }; 11 | }; 12 | } 13 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "flake-compat": { 4 | "flake": false, 5 | "locked": { 6 | "lastModified": 1696426674, 7 | "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", 8 | "owner": "edolstra", 9 | "repo": "flake-compat", 10 | "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", 11 | "type": "github" 12 | }, 13 | "original": { 14 | "owner": "edolstra", 15 | "repo": "flake-compat", 16 | "type": "github" 17 | } 18 | }, 19 | "flake-utils": { 20 | "inputs": { 21 | "systems": "systems" 22 | }, 23 | "locked": { 24 | "lastModified": 1731533236, 25 | "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", 26 | "owner": "numtide", 27 | "repo": "flake-utils", 28 | "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", 29 | "type": "github" 30 | }, 31 | "original": { 32 | "id": "flake-utils", 33 | "type": "indirect" 34 | } 35 | }, 36 | "gitignore": { 37 | "inputs": { 38 | "nixpkgs": [ 39 | "pre-commit-hooks-nix", 40 | "nixpkgs" 41 | ] 42 | }, 43 | "locked": { 44 | "lastModified": 1709087332, 45 | "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", 46 | "owner": "hercules-ci", 47 | "repo": "gitignore.nix", 48 | "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", 49 | "type": "github" 50 | }, 51 | "original": { 52 | "owner": "hercules-ci", 53 | "repo": "gitignore.nix", 54 | "type": "github" 55 | } 56 | }, 57 | "nixpkgs": { 58 | "locked": { 59 | "lastModified": 1737299813, 60 | "narHash": "sha256-Qw2PwmkXDK8sPQ5YQ/y/icbQ+TYgbxfjhgnkNJyT1X8=", 61 | "owner": "nixos", 62 | "repo": "nixpkgs", 63 | "rev": "107d5ef05c0b1119749e381451389eded30fb0d5", 64 | "type": "github" 65 | }, 66 | "original": { 67 | "owner": "nixos", 68 | "ref": "nixos-24.11", 69 | "repo": "nixpkgs", 70 | "type": "github" 71 | } 72 | }, 73 | "pre-commit-hooks-nix": { 74 | "inputs": { 75 | "flake-compat": "flake-compat", 76 | "gitignore": "gitignore", 77 | "nixpkgs": [ 78 | "nixpkgs" 79 | ] 80 | }, 81 | "locked": { 82 | "lastModified": 1737465171, 83 | "narHash": "sha256-R10v2hoJRLq8jcL4syVFag7nIGE7m13qO48wRIukWNg=", 84 | "owner": "cachix", 85 | "repo": "pre-commit-hooks.nix", 86 | "rev": "9364dc02281ce2d37a1f55b6e51f7c0f65a75f17", 87 | "type": "github" 88 | }, 89 | "original": { 90 | "owner": "cachix", 91 | "repo": "pre-commit-hooks.nix", 92 | "type": "github" 93 | } 94 | }, 95 | "root": { 96 | "inputs": { 97 | "flake-utils": "flake-utils", 98 | "nixpkgs": "nixpkgs", 99 | "pre-commit-hooks-nix": "pre-commit-hooks-nix" 100 | } 101 | }, 102 | "systems": { 103 | "locked": { 104 | "lastModified": 1681028828, 105 | "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", 106 | "owner": "nix-systems", 107 | "repo": "default", 108 | "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", 109 | "type": "github" 110 | }, 111 | "original": { 112 | "owner": "nix-systems", 113 | "repo": "default", 114 | "type": "github" 115 | } 116 | } 117 | }, 118 | "root": "root", 119 | "version": 7 120 | } 121 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | description = "OpenStack Packages and Modules for NixOS"; 3 | 4 | inputs = { 5 | nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-24.11"; 6 | pre-commit-hooks-nix = { 7 | url = "github:cachix/pre-commit-hooks.nix"; 8 | inputs.nixpkgs.follows = "nixpkgs"; 9 | }; 10 | }; 11 | 12 | outputs = 13 | { 14 | self, 15 | nixpkgs, 16 | flake-utils, 17 | pre-commit-hooks-nix, 18 | ... 19 | }: 20 | flake-utils.lib.eachSystem [ "x86_64-linux" ] ( 21 | system: 22 | let 23 | pkgs = import nixpkgs { inherit system; }; 24 | pre-commit-hooks-run = pre-commit-hooks-nix.lib.${system}.run; 25 | in 26 | rec { 27 | formatter = pkgs.nixfmt-rfc-style; 28 | devShells.default = pkgs.mkShellNoCC { 29 | inherit (self.checks.${system}.pre-commit-check) shellHook; 30 | buildInputs = self.checks.${system}.pre-commit-check.enabledPackages; 31 | packages = with pkgs; [ gitlint ]; 32 | }; 33 | 34 | lib = { 35 | generateRootwrapConf = 36 | { 37 | package, 38 | filterPath, 39 | execDirs, 40 | }: 41 | pkgs.callPackage ./lib/rootwrap-conf.nix { 42 | inherit package filterPath; 43 | utils_env = execDirs; 44 | }; 45 | }; 46 | 47 | packages = import ./packages { inherit (pkgs) callPackage python3Packages; }; 48 | 49 | checks = import ./checks { inherit pkgs pre-commit-hooks-run; }; 50 | 51 | nixosModules = import ./modules { openstackPkgs = packages; }; 52 | 53 | tests = import ./tests/default.nix { 54 | inherit pkgs nixosModules; 55 | inherit (lib) generateRootwrapConf; 56 | }; 57 | } 58 | ) 59 | // { 60 | ci = import ./lib/gitlab-ci.nix { input = { inherit (self) packages tests; }; }; 61 | }; 62 | } 63 | -------------------------------------------------------------------------------- /lib/gitlab-ci.nix: -------------------------------------------------------------------------------- 1 | { input }: 2 | let 3 | # This helper builds a path string from a current nesting position by joining 4 | # the current path segment and the attribute using ".". Basically a join 5 | # operation to deal with the root set. 6 | pathString = builtins.foldl' ( 7 | current: attr: (if current == "" then "" else current + ".") + attr 8 | ) ""; 9 | 10 | isDerivation = x: x ? "type" && x.type == "derivation"; 11 | 12 | # Recursively descend into all reachable build attributes 13 | # currentPath : current position in the nesting structure 14 | # currentSet : current attribute set 15 | # For all attributes in the current set: 16 | # - If the attribute is a derivation, add it to the list of build attributes 17 | # - If the attribute is a nested set, recursively descend into it, extending 18 | # the current path by "." 19 | discoverBuildAttributes = 20 | currentPath: currentSet: 21 | let 22 | accumulate = 23 | accumList: name: 24 | let 25 | value = currentSet."${name}"; 26 | attrsInSet = 27 | if isDerivation value then 28 | [ 29 | { 30 | path = (pathString (currentPath ++ [ name ])); 31 | drv = value; 32 | } 33 | ] 34 | else if builtins.typeOf value == "set" then 35 | discoverBuildAttributes (currentPath ++ [ name ]) value 36 | else 37 | [ ]; 38 | in 39 | accumList ++ attrsInSet; 40 | in 41 | builtins.foldl' accumulate [ ] (builtins.attrNames currentSet); 42 | 43 | releaseNixAttributes = discoverBuildAttributes [ ] input; 44 | 45 | # The common build job will need to be tagged as "nix" and runs the 46 | # command "nix build .#". 47 | defaultBuildJob = attrPath: { 48 | "tags" = [ "native-nix" ]; 49 | "stage" = "build"; 50 | "script" = [ 51 | "NIX_PATH= nix build .#${attrPath}" 52 | ]; 53 | }; 54 | 55 | nixIntegrationTestBuildJob = attrPath: { 56 | "tags" = [ "native-nix" ]; 57 | "stage" = "test"; 58 | # The resource groups leads to integration test not running in parallel 59 | # (both intra and inter pipeline). It has turned out, that the nixos tests 60 | # are too heavyweight and run in timeouts if executed in parallel. 61 | "resource_group" = "nixos-test"; 62 | "script" = [ 63 | "NIX_PATH= nix build .#${attrPath}.driver" 64 | "./result/bin/nixos-test-driver" 65 | ]; 66 | }; 67 | 68 | hasMetaTag = 69 | drv: tag: builtins.hasAttr "meta" drv && builtins.hasAttr "tag" (drv.meta) && drv.meta.tag == tag; 70 | 71 | generateJobDescs = 72 | attr: 73 | let 74 | drv = attr.drv; 75 | attrPath = attr.path; 76 | in 77 | if hasMetaTag drv "nix-integration-test" then 78 | [ 79 | { 80 | name = "${attrPath}"; 81 | value = nixIntegrationTestBuildJob attrPath; 82 | } 83 | ] 84 | else 85 | [ 86 | { 87 | name = "${attrPath}"; 88 | value = defaultBuildJob attrPath; 89 | } 90 | ]; 91 | 92 | # Build the job list: Each job is represented as one element with name 93 | # denoting the build job's name and value being the job's attributes. 94 | # This will later be converted to an attribute set using listToAttrs. 95 | jobs = builtins.concatMap generateJobDescs releaseNixAttributes; 96 | 97 | # Global settings of the pipeline (e.g., default image, default before_script) 98 | header = { 99 | # define workflow rules so the child pipeline is created in all possible pipeline contexts, 100 | # e.g., in a MR pipeline 101 | workflow = { 102 | rules = [ 103 | { when = "always"; } 104 | ]; 105 | }; 106 | # Nix builds need to be able to access our Gitlab to fetch repositories. 107 | before_script = [ 108 | "git config --global --add url.\${CI_SERVER_PROTOCOL}://gitlab-ci-token:\${CI_JOB_TOKEN}@\${CI_SERVER_HOST}/.insteadOf \"git@\${CI_SERVER_HOST}:\"" 109 | "git config --global --add url.$\{CI_SERVER_PROTOCOL}://gitlab-ci-token:\${CI_JOB_TOKEN}@\${CI_SERVER_HOST}/.insteadOf \"ssh://git@\${CI_SERVER_HOST}/\"" 110 | ]; 111 | }; 112 | in 113 | builtins.toFile "generated_ci.yaml" (builtins.toJSON (header // (builtins.listToAttrs jobs))) 114 | -------------------------------------------------------------------------------- /lib/rootwrap-conf.nix: -------------------------------------------------------------------------------- 1 | { 2 | writeText, 3 | coreutils, 4 | package, 5 | filterPath, 6 | utils_env, 7 | }: 8 | writeText "rootwrap.conf" '' 9 | # Configuration for neutron-rootwrap 10 | # This file should be owned by (and only-writeable by) the root user 11 | 12 | [DEFAULT] 13 | # List of directories to load filter definitions from (separated by ','). 14 | # These directories MUST all be only writeable by root ! 15 | filters_path=${package}/${filterPath} 16 | 17 | # List of directories to search executables in, in case filters do not 18 | # explicitly specify a full path (separated by ',') 19 | # If not specified, defaults to system PATH environment variable. 20 | # These directories MUST all be only writeable by root ! 21 | exec_dirs=/run/current-system/sw/bin,/${coreutils}/bin,${utils_env}/bin 22 | 23 | # Enable logging to syslog 24 | # Default value is False 25 | use_syslog=False 26 | 27 | # Which syslog facility to use. 28 | # Valid values include auth, authpriv, syslog, local0, local1... 29 | # Default value is 'syslog' 30 | syslog_log_facility=syslog 31 | 32 | # Which messages to log. 33 | # INFO means log all usage 34 | # ERROR means only log unsuccessful attempts 35 | syslog_log_level=INFO 36 | 37 | # Rootwrap daemon exits after this seconds of inactivity 38 | daemon_timeout=600 39 | 40 | # Rootwrap daemon limits itself to that many file descriptors (Linux only) 41 | rlimit_nofile=1024 42 | '' 43 | -------------------------------------------------------------------------------- /modules/compute/compute.nix: -------------------------------------------------------------------------------- 1 | { neutron, nova }: 2 | { ... }: 3 | { 4 | imports = [ 5 | (import ./neutron.nix { inherit neutron; }) 6 | (import ./nova.nix { inherit nova; }) 7 | ]; 8 | } 9 | -------------------------------------------------------------------------------- /modules/compute/neutron.nix: -------------------------------------------------------------------------------- 1 | { neutron }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | with lib; 10 | 11 | let 12 | cfg = config.neutron; 13 | neutron_env = pkgs.python3.buildEnv.override { 14 | extraLibs = [ neutron ]; 15 | }; 16 | 17 | utils_env = pkgs.buildEnv { 18 | name = "utils"; 19 | paths = [ neutron_env ]; 20 | }; 21 | 22 | neutronConf = pkgs.writeText "neutron.conf" '' 23 | [DEFAULT] 24 | core_plugin = ml2 25 | debug = false 26 | # File name for the paste.deploy config for api service (string value) 27 | api_paste_config = ${neutron}/etc/neutron/api-paste.ini 28 | transport_url = rabbit://openstack:openstack@controller 29 | log_dir = /var/log/neutron 30 | 31 | [agent] 32 | root_helper = "/run/current-system/sw/bin/sudo ${neutron}/bin/neutron-rootwrap ${rootwrapConf}" 33 | 34 | [oslo_concurrency] 35 | lock_path = /var/lib/neutron/tmp 36 | ''; 37 | 38 | openvswitchConf = pkgs.writeText "openvswitch_agent.ini" '' 39 | [ovs] 40 | bridge_mappings = provider:br-provider 41 | ovsdb_connection = unix:/run/openvswitch/db.sock 42 | 43 | [securitygroup] 44 | firewall_driver = openvswitch 45 | enable_security_group = true 46 | ''; 47 | 48 | rootwrapConf = pkgs.callPackage ../../lib/rootwrap-conf.nix { 49 | package = neutron_env; 50 | filterPath = "/etc/neutron/rootwrap.d"; 51 | inherit utils_env; 52 | }; 53 | in 54 | { 55 | options.neutron = { 56 | enable = mkEnableOption "Enable OpenStack Neutron." // { 57 | default = true; 58 | }; 59 | config = mkOption { 60 | default = neutronConf; 61 | description = '' 62 | The Neutron config. 63 | ''; 64 | }; 65 | openvswitchConfig = mkOption { 66 | default = openvswitchConf; 67 | description = '' 68 | The Neutron OpenVSwitch config. 69 | ''; 70 | }; 71 | providerInterface = mkOption { 72 | default = "eth2"; 73 | type = types.str; 74 | description = '' 75 | The name of the physical network interface used for the provider 76 | network. 77 | ''; 78 | }; 79 | }; 80 | 81 | config = mkIf cfg.enable { 82 | users.extraUsers.neutron = { 83 | group = "neutron"; 84 | isSystemUser = true; 85 | }; 86 | users.groups.neutron = { 87 | name = "neutron"; 88 | members = [ "neutron" ]; 89 | }; 90 | 91 | systemd.tmpfiles.settings = { 92 | "10-neutron" = { 93 | "/var/log/neutron" = { 94 | d = { 95 | group = "neutron"; 96 | mode = "0755"; 97 | user = "neutron"; 98 | }; 99 | }; 100 | "/var/lock/neutron" = { 101 | d = { 102 | group = "neutron"; 103 | mode = "0755"; 104 | user = "neutron"; 105 | }; 106 | }; 107 | "/var/lib/neutron" = { 108 | d = { 109 | group = "neutron"; 110 | mode = "0755"; 111 | user = "neutron"; 112 | }; 113 | }; 114 | "/etc/neutron/plugins/ml2" = { 115 | d = { 116 | group = "neutron"; 117 | mode = "0755"; 118 | user = "neutron"; 119 | }; 120 | }; 121 | }; 122 | }; 123 | 124 | security.sudo.enable = true; 125 | security.sudo.extraConfig = '' 126 | neutron ALL = (root) NOPASSWD: ${neutron}/bin/neutron-rootwrap ${rootwrapConf} * 127 | ''; 128 | 129 | virtualisation.vswitch = { 130 | enable = true; 131 | resetOnStart = true; 132 | }; 133 | 134 | systemd.services.neutron-openvswitch-agent = { 135 | description = "OpenStack Neutron OpenVSwitch Agent"; 136 | after = [ 137 | "network.target" 138 | "ovsdb.service" 139 | ]; 140 | wantedBy = [ "multi-user.target" ]; 141 | path = with pkgs; [ 142 | sudo 143 | neutron 144 | qemu 145 | bridge-utils 146 | procps 147 | iproute2 148 | dnsmasq 149 | openvswitch 150 | conntrack-tools 151 | ]; 152 | serviceConfig = { 153 | ExecStartPre = pkgs.writeShellScript "neutron-openvswitch-agent-pre.sh" '' 154 | ${pkgs.openvswitch}/bin/ovs-vsctl add-br br-provider 155 | ${pkgs.openvswitch}/bin/ovs-vsctl add-port br-provider ${cfg.providerInterface} 156 | ''; 157 | ExecStart = pkgs.writeShellScript "neutron-openvswitch-agent.sh" '' 158 | ${neutron}/bin/neutron-openvswitch-agent --config-file=${cfg.config} --config-file=${cfg.openvswitchConfig} 159 | ''; 160 | }; 161 | }; 162 | }; 163 | } 164 | -------------------------------------------------------------------------------- /modules/compute/nova.nix: -------------------------------------------------------------------------------- 1 | { nova }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | with lib; 10 | 11 | let 12 | cfg = config.nova; 13 | nova_env = pkgs.python3.buildEnv.override { 14 | extraLibs = [ cfg.novaPackage ]; 15 | }; 16 | utils_env = pkgs.buildEnv { 17 | name = "utils"; 18 | paths = [ nova_env ]; 19 | }; 20 | 21 | novaConf = pkgs.writeText "nova.conf" '' 22 | [DEFAULT] 23 | log_dir = /var/log/nova 24 | lock_path = /var/lock/nova 25 | state_path = /var/lib/nova 26 | rootwrap_config = ${rootwrapConf} 27 | compute_driver = libvirt.LibvirtDriver 28 | my_ip = 10.0.0.39 29 | transport_url = rabbit://openstack:openstack@controller 30 | 31 | [api] 32 | auth_strategy = keystone 33 | 34 | [api_database] 35 | connection = sqlite:////var/lib/nova/nova_api.sqlite 36 | 37 | [database] 38 | connection = sqlite:////var/lib/nova/nova.sqlite 39 | 40 | [glance] 41 | api_servers = http://controller:9292 42 | 43 | [keystone_authtoken] 44 | www_authenticate_uri = http://controller:5000/ 45 | auth_url = http://controller:5000/ 46 | memcached_servers = controller:11211 47 | auth_type = password 48 | project_domain_name = Default 49 | user_domain_name = Default 50 | project_name = service 51 | username = nova 52 | password = nova 53 | 54 | [libvirt] 55 | virt_type = kvm 56 | 57 | [neutron] 58 | auth_url = http://controller:5000 59 | auth_type = password 60 | project_domain_name = Default 61 | user_domain_name = Default 62 | region_name = RegionOne 63 | project_name = service 64 | username = neutron 65 | password = neutron 66 | 67 | [os_vif_ovs] 68 | ovsdb_connection = unix:/run/openvswitch/db.sock 69 | 70 | [oslo_concurrency] 71 | lock_path = /var/lib/nova/tmp 72 | 73 | [placement] 74 | region_name = RegionOne 75 | project_domain_name = Default 76 | project_name = service 77 | auth_type = password 78 | user_domain_name = Default 79 | auth_url = http://controller:5000/v3 80 | username = placement 81 | password = placement 82 | 83 | [service_user] 84 | send_service_user_token = true 85 | auth_url = http://controller:5000/ 86 | auth_strategy = keystone 87 | auth_type = password 88 | project_domain_name = Default 89 | project_name = service 90 | user_domain_name = Default 91 | username = nova 92 | password = nova 93 | 94 | [vnc] 95 | enabled = true 96 | server_listen = 0.0.0.0 97 | server_proxyclient_address = $my_ip 98 | novncproxy_base_url = http://controller:6080/vnc_lite.html 99 | 100 | [cells] 101 | enable = False 102 | 103 | [os_region_name] 104 | openstack = 105 | ''; 106 | 107 | rootwrapConf = pkgs.callPackage ../../lib/rootwrap-conf.nix { 108 | package = nova_env; 109 | filterPath = "/etc/nova/rootwrap.d"; 110 | inherit utils_env; 111 | }; 112 | in 113 | { 114 | options.nova = { 115 | enable = mkEnableOption "Enable OpenStack Nova." // { 116 | default = true; 117 | }; 118 | config = mkOption { 119 | default = novaConf; 120 | description = '' 121 | The Nova config. 122 | ''; 123 | }; 124 | novaPackage = mkOption { 125 | default = nova; 126 | type = types.package; 127 | description = '' 128 | The OpenStack Nova package to use. 129 | ''; 130 | }; 131 | extraPkgs = mkOption { 132 | default = [ ]; 133 | type = types.listOf types.package; 134 | description = '' 135 | Extra packages to be available in the PATH of the nova-compute service 136 | e.g. an additional hypervisor. 137 | ''; 138 | }; 139 | }; 140 | 141 | config = mkIf cfg.enable { 142 | users.extraUsers.nova = { 143 | group = "nova"; 144 | isSystemUser = true; 145 | }; 146 | users.groups.nova = { 147 | name = "nova"; 148 | members = [ "nova" ]; 149 | }; 150 | 151 | # Nova requires libvirtd and RabbitMQ. 152 | virtualisation.libvirtd.enable = true; 153 | 154 | systemd.tmpfiles.settings = { 155 | "10-nova" = { 156 | "/var/log/nova" = { 157 | D = { 158 | group = "nova"; 159 | mode = "0755"; 160 | user = "nova"; 161 | }; 162 | }; 163 | "/var/lock/nova" = { 164 | D = { 165 | group = "nova"; 166 | mode = "0755"; 167 | user = "nova"; 168 | }; 169 | }; 170 | "/var/lib/nova" = { 171 | D = { 172 | group = "nova"; 173 | mode = "0755"; 174 | user = "nova"; 175 | }; 176 | }; 177 | "/var/lib/nova/instances" = { 178 | D = { 179 | group = "nova"; 180 | mode = "0755"; 181 | user = "nova"; 182 | }; 183 | }; 184 | }; 185 | }; 186 | 187 | systemd.services.nova-compute = { 188 | description = "OpenStack Nova Scheduler Daemon"; 189 | after = [ 190 | "rabbitmq.service" 191 | "network.target" 192 | ]; 193 | wantedBy = [ "multi-user.target" ]; 194 | path = 195 | with pkgs; 196 | [ 197 | sudo 198 | nova_env 199 | qemu 200 | ] 201 | ++ cfg.extraPkgs; 202 | environment.PYTHONPATH = "${nova_env}/${pkgs.python3.sitePackages}"; 203 | serviceConfig = { 204 | ExecStart = pkgs.writeShellScript "nova-compute.sh" '' 205 | ${cfg.novaPackage}/bin/nova-compute --config-file=${cfg.config} 206 | ''; 207 | }; 208 | }; 209 | }; 210 | } 211 | -------------------------------------------------------------------------------- /modules/controller/generic.nix: -------------------------------------------------------------------------------- 1 | { 2 | lib, 3 | pkgs, 4 | ... 5 | }: 6 | { 7 | services.mysql.enable = true; 8 | services.mysql.package = lib.mkDefault pkgs.mariadb; 9 | 10 | services.rabbitmq = { 11 | enable = true; 12 | listenAddress = "0.0.0.0"; 13 | configItems = { 14 | "default_user" = "openstack"; 15 | "default_pass" = "openstack"; 16 | "default_permissions.configure" = ".*"; 17 | "default_permissions.read" = ".*"; 18 | "default_permissions.write" = ".*"; 19 | }; 20 | }; 21 | 22 | services.memcached.enable = true; 23 | 24 | systemd.tmpfiles.settings = { 25 | "10-uwsgi" = { 26 | "/run/uwsgi" = { 27 | D = { 28 | user = "nginx"; 29 | group = "nginx"; 30 | mode = "0755"; 31 | }; 32 | }; 33 | }; 34 | }; 35 | 36 | services.uwsgi = { 37 | enable = true; 38 | plugins = [ "python3" ]; 39 | user = "nginx"; 40 | group = "nginx"; 41 | capabilities = [ 42 | "CAP_SETGID" 43 | "CAP_SETUID" 44 | ]; 45 | instance.type = "emperor"; 46 | }; 47 | } 48 | -------------------------------------------------------------------------------- /modules/controller/glance.nix: -------------------------------------------------------------------------------- 1 | { glance }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | with lib; 10 | 11 | let 12 | cfg = config.glance; 13 | 14 | glanceConf = pkgs.writeText "glance-api.conf" '' 15 | [DEFAULT] 16 | enabled_backends=fs:file 17 | log_dir = /var/log/glance 18 | 19 | [database] 20 | connection = mysql+pymysql://glance:glance@controller/glance 21 | 22 | [keystone_authtoken] 23 | www_authenticate_uri = http://controller:5000 24 | auth_url = http://controller:5000 25 | memcached_servers = controller:11211 26 | auth_type = password 27 | project_domain_name = Default 28 | user_domain_name = Default 29 | project_name = service 30 | username = glance 31 | password = glance 32 | 33 | [paste_deploy] 34 | flavor = keystone 35 | 36 | [glance_store] 37 | default_backend = fs 38 | 39 | [fs] 40 | filesystem_store_datadir = /var/lib/glance/images/ 41 | 42 | [oslo_limit] 43 | auth_url = http://controller:5000 44 | auth_type = password 45 | user_domain_id = default 46 | username = glance 47 | system_scope = all 48 | password = glance 49 | 50 | region_name = RegionOne 51 | ''; 52 | in 53 | { 54 | options.glance = { 55 | enable = mkEnableOption "Enable OpenStack Glance." // { 56 | default = true; 57 | }; 58 | config = mkOption { 59 | default = glanceConf; 60 | description = '' 61 | The Glance config. 62 | ''; 63 | }; 64 | }; 65 | config = mkIf cfg.enable { 66 | 67 | users.extraUsers.glance = { 68 | group = "glance"; 69 | isSystemUser = true; 70 | }; 71 | users.groups.glance = { 72 | name = "glance"; 73 | members = [ "glance" ]; 74 | }; 75 | 76 | systemd.tmpfiles.settings = { 77 | "10-glance" = { 78 | "/var/lib/glance/" = { 79 | D = { 80 | user = "glance"; 81 | group = "glance"; 82 | mode = "0755"; 83 | }; 84 | }; 85 | "/var/log/glance/" = { 86 | D = { 87 | user = "glance"; 88 | group = "glance"; 89 | mode = "0755"; 90 | }; 91 | }; 92 | "/var/lib/glance/images" = { 93 | D = { 94 | user = "glance"; 95 | group = "glance"; 96 | mode = "0755"; 97 | }; 98 | }; 99 | "/etc/glance/glance-api.conf" = { 100 | L = { 101 | argument = "${cfg.config}"; 102 | }; 103 | }; 104 | "/etc/glance/glance-api-paste.ini" = { 105 | L = { 106 | argument = "${glance}/etc/glance/glance-api-paste.ini"; 107 | }; 108 | }; 109 | "/etc/glance/schema-image.json" = { 110 | L = { 111 | argument = "${glance}/etc/glance/schema-image.json"; 112 | }; 113 | }; 114 | }; 115 | }; 116 | 117 | systemd.services.glance-api = { 118 | description = "OpenStack Glance API Daemon"; 119 | after = [ 120 | "glance.service" 121 | "rabbitmq.service" 122 | "mysql.service" 123 | "network.target" 124 | ]; 125 | path = [ glance ]; 126 | wantedBy = [ "multi-user.target" ]; 127 | serviceConfig = { 128 | User = "glance"; 129 | Group = "glance"; 130 | ExecStart = pkgs.writeShellScript "exec.sh" '' 131 | glance-api --config-file=${cfg.config} --config-file=/etc/glance/glance-api-paste.ini 132 | ''; 133 | }; 134 | }; 135 | 136 | services.uwsgi = { 137 | instance.vassals.glance = { 138 | socket-timeout = 10; 139 | http-auto-chunked = true; 140 | http-chunked-input = true; 141 | http-raw-body = true; 142 | chmod-socket = 666; 143 | lazy-apps = true; 144 | add-header = "Connection: close"; 145 | buffer-size = 65535; 146 | thunder-lock = true; 147 | enable-threads = true; 148 | exit-on-reload = true; 149 | die-on-term = true; 150 | master = true; 151 | processes = 4; 152 | http-socket = "127.0.0.1:60999"; 153 | type = "normal"; 154 | immediate-uid = "glance"; 155 | immediate-gid = "glance"; 156 | wsgi-file = "${glance}/bin/.glance-wsgi-api-wrapped"; 157 | }; 158 | }; 159 | }; 160 | } 161 | -------------------------------------------------------------------------------- /modules/controller/horizon.nix: -------------------------------------------------------------------------------- 1 | { horizon }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | with lib; 10 | let 11 | cfg = config.horizon; 12 | user = "nginx"; 13 | group = "nginx"; 14 | in 15 | { 16 | options.horizon = { 17 | enable = mkEnableOption "Enable OpenStack Dashboard" // { 18 | default = true; 19 | }; 20 | 21 | config = mkOption { 22 | default = ./horizon-settings.py; 23 | type = types.path; 24 | description = '' 25 | The OpenStack Dashboard local_settings.py 26 | ''; 27 | }; 28 | package = mkOption { 29 | default = horizon; 30 | description = ''The Horizon Package to use''; 31 | type = types.package; 32 | }; 33 | }; 34 | 35 | config = { 36 | systemd.tmpfiles.settings = { 37 | "10-horizon" = { 38 | "/var/lib/static" = { 39 | D = { 40 | inherit user group; 41 | mode = "0755"; 42 | }; 43 | }; 44 | "/var/lib/openstack_dashboard/" = { 45 | "C+" = { 46 | inherit user group; 47 | mode = "0755"; 48 | argument = "${cfg.package}/${pkgs.python3.sitePackages}/openstack_dashboard/"; 49 | }; 50 | Z = { 51 | inherit user group; 52 | mode = "0766"; 53 | }; 54 | }; 55 | "/var/lib/openstack_dashboard/local/.secret_key_store" = { 56 | z = { 57 | inherit user group; 58 | mode = "0600"; 59 | }; 60 | }; 61 | "/var/lib/openstack_dashboard/local/local_settings.py" = { 62 | "L+" = { 63 | inherit user group; 64 | mode = "0600"; 65 | argument = "${cfg.config}"; 66 | }; 67 | }; 68 | }; 69 | }; 70 | 71 | services.uwsgi = { 72 | instance.vassals.horizon = { 73 | type = "normal"; 74 | socket = "/run/uwsgi/horizon.sock"; 75 | buffer-size = 65535; 76 | immediate-uid = user; 77 | immediate-gid = group; 78 | master = true; 79 | wsgi-file = "/var/lib/openstack_dashboard/wsgi.py"; 80 | static-map = "/static=${cfg.package}/static-compressed"; 81 | static-map2 = "/horizon/static=${cfg.package}/static-compressed"; 82 | 83 | enable-threads = true; 84 | pythonPackages = _: [ 85 | horizon 86 | ]; 87 | processes = 3; 88 | threads = 10; 89 | thunder-lock = true; 90 | lazy-apps = true; 91 | chdir = "/var/lib/openstack_dashboard"; 92 | }; 93 | }; 94 | 95 | services.nginx = { 96 | enable = true; 97 | virtualHosts.horizon = { 98 | listen = [ 99 | { 100 | addr = "*"; 101 | port = 80; 102 | } 103 | ]; 104 | extraConfig = '' 105 | include ${config.services.nginx.package}/conf/uwsgi_params; 106 | ''; 107 | locations."/" = { 108 | extraConfig = " 109 | uwsgi_pass unix:/run/uwsgi/horizon.sock; 110 | "; 111 | }; 112 | }; 113 | }; 114 | }; 115 | } 116 | -------------------------------------------------------------------------------- /modules/controller/keystone.nix: -------------------------------------------------------------------------------- 1 | { keystone }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | with lib; 10 | 11 | let 12 | cfg = config.keystone; 13 | 14 | serviceEndPointTemplateConf = pkgs.writeText "default_catalog.templates" '' 15 | # config for templated.Catalog, using camelCase because I don't want to do 16 | # translations for keystone compat 17 | catalog.RegionOne.identity.publicURL = http://controller:5000/v3 18 | catalog.RegionOne.identity.adminURL = http://controller:5000/v3 19 | catalog.RegionOne.identity.internalURL = http://controller:5000/v3 20 | catalog.RegionOne.identity.name = Identity Service 21 | 22 | # fake compute service for now to help novaclient tests work 23 | catalog.RegionOne.compute.publicURL = http://controller:8774/v2.1 24 | catalog.RegionOne.compute.adminURL = http://controller:8774/v2.1 25 | catalog.RegionOne.compute.internalURL = http://controller:8774/v2.1 26 | catalog.RegionOne.compute.name = Compute Service V2.1 27 | 28 | catalog.RegionOne.image.publicURL = http://controller:9292 29 | catalog.RegionOne.image.adminURL = http://controller:9292 30 | catalog.RegionOne.image.internalURL = http://controller:9292 31 | catalog.RegionOne.image.name = Image Service 32 | 33 | catalog.RegionOne.network.publicURL = http://controller:9696 34 | catalog.RegionOne.network.adminURL = http://controller:9696 35 | catalog.RegionOne.network.internalURL = http://controller:9696 36 | catalog.RegionOne.network.name = Network Service 37 | 38 | catalog.RegionOne.placement.publicURL = http://controller:8778 39 | catalog.RegionOne.placement.adminURL = http://controller:8778 40 | catalog.RegionOne.placement.internalURL = http://controller:8778 41 | catalog.RegionOne.placement.name = Placement Service 42 | ''; 43 | 44 | keystoneConf = pkgs.writeText "keystone.conf" '' 45 | [DEFAULT] 46 | log_dir = /var/log/keystone 47 | [database] 48 | connection = mysql+pymysql://keystone:keystone@controller/keystone 49 | 50 | [token] 51 | provider = fernet 52 | 53 | [catalog] 54 | driver = templated 55 | template_file = ${serviceEndPointTemplateConf} 56 | ''; 57 | in 58 | { 59 | options.keystone = { 60 | enable = mkEnableOption "Enable OpenStack Keystone." // { 61 | default = true; 62 | }; 63 | config = mkOption { 64 | default = keystoneConf; 65 | description = '' 66 | The Keystone config. 67 | ''; 68 | }; 69 | }; 70 | 71 | config = mkIf cfg.enable { 72 | 73 | users.extraUsers.keystone = { 74 | group = "keystone"; 75 | isSystemUser = true; 76 | }; 77 | users.groups.keystone = { 78 | name = "keystone"; 79 | members = [ "keystone" ]; 80 | }; 81 | 82 | systemd.tmpfiles.settings = { 83 | "10-keystone" = { 84 | "/var/lib/keystone/" = { 85 | D = { 86 | user = "keystone"; 87 | group = "keystone"; 88 | mode = "0755"; 89 | }; 90 | }; 91 | "/var/log/keystone/" = { 92 | D = { 93 | user = "keystone"; 94 | group = "keystone"; 95 | mode = "0755"; 96 | }; 97 | }; 98 | # Certain executables e.g. keystone-wsgi-public expect the config file 99 | # at a default location. 100 | "/etc/keystone/keystone.conf" = { 101 | L = { 102 | argument = "${cfg.config}"; 103 | }; 104 | }; 105 | }; 106 | }; 107 | 108 | services.nginx = { 109 | enable = true; 110 | virtualHosts = { 111 | controller = { 112 | locations."/".proxyPass = "http://127.0.0.1:5001/"; 113 | listen = [ 114 | { 115 | addr = "*"; 116 | port = 5000; 117 | } 118 | ]; 119 | }; 120 | }; 121 | }; 122 | 123 | services.uwsgi = { 124 | enable = true; 125 | plugins = [ "python3" ]; 126 | capabilities = [ 127 | "CAP_SETGID" 128 | "CAP_SETUID" 129 | ]; 130 | 131 | instance.type = "emperor"; 132 | instance.vassals.keystone = { 133 | type = "normal"; 134 | http11-socket = "127.0.0.1:5001"; 135 | buffer-size = 65535; 136 | immediate-uid = "keystone"; 137 | immediate-gid = "keystone"; 138 | wsgi-file = "${keystone}/bin/.keystone-wsgi-public-wrapped"; 139 | 140 | master = true; 141 | enable-threads = true; 142 | processes = 4; 143 | threads = 4; 144 | thunder-lock = true; 145 | lazy-apps = true; 146 | }; 147 | }; 148 | }; 149 | } 150 | -------------------------------------------------------------------------------- /modules/controller/nova.nix: -------------------------------------------------------------------------------- 1 | { nova }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | with lib; 10 | 11 | let 12 | cfg = config.nova; 13 | 14 | novaConf = pkgs.writeText "nova.conf" '' 15 | [api_database] 16 | connection = mysql+pymysql://nova:nova@controller/nova_api 17 | 18 | [database] 19 | connection = mysql+pymysql://nova:nova@controller/nova 20 | 21 | [DEFAULT] 22 | transport_url = rabbit://openstack:openstack@controller:5672/ 23 | my_ip = 10.0.0.11 24 | log_dir = /var/log/nova 25 | lock_path = /var/lock/nova 26 | state_path = /var/lib/nova 27 | 28 | [api] 29 | auth_strategy = keystone 30 | 31 | [keystone_authtoken] 32 | www_authenticate_uri = http://controller:5000/ 33 | auth_url = http://controller:5000/ 34 | memcached_servers = controller:11211 35 | auth_type = password 36 | project_domain_name = Default 37 | user_domain_name = Default 38 | project_name = service 39 | username = nova 40 | password = nova 41 | 42 | [service_user] 43 | send_service_user_token = true 44 | auth_url = http://controller:5000/ 45 | auth_strategy = keystone 46 | auth_type = password 47 | project_domain_name = Default 48 | project_name = service 49 | user_domain_name = Default 50 | username = nova 51 | password = nova 52 | 53 | [vnc] 54 | enabled = true 55 | server_listen = $my_ip 56 | server_proxyclient_address = $my_ip 57 | 58 | [glance] 59 | api_servers = http://controller:9292 60 | 61 | [oslo_concurrency] 62 | lock_path = /var/lib/nova/tmp 63 | 64 | [placement] 65 | project_domain_name = Default 66 | project_name = service 67 | auth_type = password 68 | user_domain_name = Default 69 | auth_url = http://controller:5000/v3 70 | username = placement 71 | password = placement 72 | 73 | [scheduler] 74 | discover_hosts_in_cells_interval = 300 75 | 76 | [neutron] 77 | auth_url = http://controller:5000 78 | auth_type = password 79 | project_domain_name = Default 80 | user_domain_name = Default 81 | region_name = RegionOne 82 | project_name = service 83 | username = neutron 84 | password = neutron 85 | service_metadata_proxy = true 86 | metadata_proxy_shared_secret = neutron_metadata_secret 87 | ''; 88 | in 89 | { 90 | options.nova = { 91 | enable = mkEnableOption "Enable OpenStack Nova." // { 92 | default = true; 93 | }; 94 | config = mkOption { 95 | default = novaConf; 96 | description = '' 97 | The Nova config. 98 | ''; 99 | }; 100 | novaPackage = mkOption { 101 | default = nova; 102 | type = types.package; 103 | description = '' 104 | The OpenStack Nova package to use. 105 | ''; 106 | }; 107 | }; 108 | config = mkIf cfg.enable { 109 | 110 | users.extraUsers.nova = { 111 | group = "nova"; 112 | isSystemUser = true; 113 | }; 114 | users.groups.nova = { 115 | name = "nova"; 116 | members = [ "nova" ]; 117 | }; 118 | 119 | systemd.tmpfiles.settings = { 120 | "10-nova" = { 121 | "/etc/nova/nova.conf" = { 122 | L = { 123 | argument = "${cfg.config}"; 124 | }; 125 | }; 126 | "/etc/nova/api-paste.ini" = { 127 | L = { 128 | argument = "${cfg.novaPackage}/etc/nova/api-paste.ini"; 129 | }; 130 | }; 131 | "/var/log/nova" = { 132 | D = { 133 | group = "nova"; 134 | mode = "0755"; 135 | user = "nova"; 136 | }; 137 | }; 138 | "/var/lib/nova" = { 139 | D = { 140 | group = "nova"; 141 | mode = "0755"; 142 | user = "nova"; 143 | }; 144 | }; 145 | "/var/lock/nova" = { 146 | D = { 147 | group = "nova"; 148 | mode = "0755"; 149 | user = "nova"; 150 | }; 151 | }; 152 | "/usr/share/novnc" = { 153 | L = { 154 | argument = "${pkgs.novnc}/share/webapps/novnc"; 155 | }; 156 | }; 157 | }; 158 | }; 159 | 160 | systemd.services.nova-api = { 161 | description = "OpenStack Compute API"; 162 | after = [ 163 | "nova.service" 164 | "postgresql.service" 165 | "mysql.service" 166 | "keystone.service" 167 | "rabbitmq.service" 168 | "ntp.service" 169 | "network-online.target" 170 | "local-fs.target" 171 | "remote-fs.target" 172 | ]; 173 | wants = [ "network-online.target" ]; 174 | wantedBy = [ "multi-user.target" ]; 175 | path = [ cfg.novaPackage ]; 176 | serviceConfig = { 177 | User = "nova"; 178 | Group = "nova"; 179 | Type = "simple"; 180 | ExecStart = pkgs.writeShellScript "nova-api.sh" '' 181 | nova-api --config-file ${cfg.config} 182 | ''; 183 | }; 184 | }; 185 | 186 | systemd.services.nova-conductor = { 187 | description = "OpenStack Compute Conductor"; 188 | after = [ 189 | "neutron-server.service" 190 | "nova.service" 191 | "glance-api.service" 192 | "placement-api.service" 193 | "postgresql.service" 194 | "mysql.service" 195 | "keystone.service" 196 | "rabbitmq.service" 197 | "ntp.service" 198 | "network-online.target" 199 | "local-fs.target" 200 | "remote-fs.target" 201 | ]; 202 | wants = [ "network-online.target" ]; 203 | wantedBy = [ "multi-user.target" ]; 204 | path = [ cfg.novaPackage ]; 205 | serviceConfig = { 206 | User = "nova"; 207 | Group = "nova"; 208 | Type = "simple"; 209 | ExecStart = pkgs.writeShellScript "nova-conductor.sh" '' 210 | nova-conductor --config-file ${cfg.config} 211 | ''; 212 | Restart = "on-failure"; 213 | LimitNOFILE = 65535; 214 | TimeoutStopSec = 15; 215 | }; 216 | }; 217 | 218 | systemd.services.nova-scheduler = { 219 | description = "OpenStack Compute Scheduler"; 220 | after = [ 221 | "neutron-server.service" 222 | "glance-api.service" 223 | "placement-api.service" 224 | "nova.service" 225 | "postgresql.service" 226 | "mysql.service" 227 | "keystone.service" 228 | "rabbitmq.service" 229 | "ntp.service" 230 | "network-online.target" 231 | "local-fs.target" 232 | "remote-fs.target" 233 | ]; 234 | wants = [ "network-online.target" ]; 235 | wantedBy = [ "multi-user.target" ]; 236 | path = [ cfg.novaPackage ]; 237 | serviceConfig = { 238 | User = "nova"; 239 | Group = "nova"; 240 | Type = "simple"; 241 | ExecStart = pkgs.writeShellScript "nova-scheduler.sh" '' 242 | nova-scheduler --config-file ${cfg.config} 243 | ''; 244 | Restart = "on-failure"; 245 | LimitNOFILE = 65535; 246 | TimeoutStopSec = 15; 247 | }; 248 | }; 249 | 250 | systemd.services.nova-host-discovery = { 251 | description = "OpenStack Nova Host DB Sync Service"; 252 | requires = [ 253 | "nova-scheduler.service" 254 | "nova-conductor.service" 255 | "nova-api.service" 256 | ]; 257 | wants = [ "network-online.target" ]; 258 | wantedBy = [ ]; 259 | path = [ cfg.novaPackage ]; 260 | serviceConfig = { 261 | User = "nova"; 262 | Group = "nova"; 263 | Type = "exec"; 264 | ExecStart = pkgs.writeShellScript "nova-host-discovery.sh" '' 265 | set -euxo pipefail 266 | nova-manage cell_v2 discover_hosts --verbose 267 | ''; 268 | }; 269 | }; 270 | 271 | systemd.services.nova-novncproxy = { 272 | description = "OpenStack Compute Scheduler"; 273 | after = [ 274 | "neutron-server.service" 275 | "glance-api.service" 276 | "placement-api.service" 277 | "nova.service" 278 | "postgresql.service" 279 | "mysql.service" 280 | "keystone.service" 281 | "rabbitmq.service" 282 | "ntp.service" 283 | "network-online.target" 284 | "local-fs.target" 285 | "remote-fs.target" 286 | ]; 287 | wants = [ "network-online.target" ]; 288 | wantedBy = [ "multi-user.target" ]; 289 | path = [ cfg.novaPackage ]; 290 | serviceConfig = { 291 | User = "nova"; 292 | Group = "nova"; 293 | Type = "simple"; 294 | ExecStart = pkgs.writeShellScript "nova-novncproxy.sh" '' 295 | nova-novncproxy --config-file ${cfg.config} 296 | ''; 297 | Restart = "on-failure"; 298 | LimitNOFILE = 65535; 299 | TimeoutStopSec = 15; 300 | }; 301 | }; 302 | }; 303 | } 304 | -------------------------------------------------------------------------------- /modules/controller/openstack-controller.nix: -------------------------------------------------------------------------------- 1 | { 2 | nova, 3 | neutron, 4 | keystone, 5 | glance, 6 | placement, 7 | horizon, 8 | }: 9 | { 10 | config, 11 | pkgs, 12 | ... 13 | }: 14 | let 15 | adminEnv = { 16 | OS_USERNAME = "admin"; 17 | OS_PASSWORD = "admin"; 18 | OS_PROJECT_NAME = "admin"; 19 | OS_USER_DOMAIN_NAME = "Default"; 20 | OS_PROJECT_DOMAIN_NAME = "Default"; 21 | OS_AUTH_URL = "http://controller:5000/v3"; 22 | OS_IDENTITY_API_VERSION = "3"; 23 | }; 24 | in 25 | { 26 | imports = [ 27 | ./generic.nix 28 | (import ./keystone.nix { inherit keystone; }) 29 | (import ./glance.nix { inherit glance; }) 30 | (import ./placement.nix { inherit placement; }) 31 | (import ./nova.nix { inherit nova; }) 32 | (import ./neutron.nix { inherit neutron; }) 33 | (import ./horizon.nix { inherit horizon; }) 34 | ]; 35 | 36 | config = { 37 | 38 | systemd.services.database-setup = { 39 | description = "OpenStack Database setup"; 40 | after = [ 41 | "mysql.service" 42 | "network.target" 43 | "uwsgi.service" 44 | ]; 45 | wantedBy = [ "multi-user.target" ]; 46 | path = [ pkgs.mariadb ]; 47 | serviceConfig = { 48 | Type = "oneshot"; 49 | ExecStart = pkgs.writeShellScript "database-setup.sh" '' 50 | # Keystone 51 | mysql -N -e "drop database keystone;" || true 52 | mysql -N -e "create database keystone;" || true 53 | mysql -N -e "GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' IDENTIFIED BY 'keystone';" 54 | mysql -N -e "GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' IDENTIFIED BY 'keystone';" 55 | 56 | # Glance 57 | mysql -N -e "drop database glance;" || true 58 | mysql -N -e "create database glance;" || true 59 | mysql -N -e "GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'glance';" 60 | mysql -N -e "GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'glance';" 61 | 62 | # Placement 63 | mysql -N -e "drop database placement;" || true 64 | mysql -N -e "create database placement;" || true 65 | mysql -N -e "GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' IDENTIFIED BY 'placement';" 66 | mysql -N -e "GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' IDENTIFIED BY 'placement';" 67 | 68 | # Nova 69 | mysql -N -e "drop database nova_api;" || true 70 | mysql -N -e "drop database nova;" || true 71 | mysql -N -e "drop database nova_cell0;" || true 72 | mysql -N -e "create database nova_api;" || true 73 | mysql -N -e "create database nova;" || true 74 | mysql -N -e "create database nova_cell0;" || true 75 | 76 | mysql -N -e "GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';" 77 | mysql -N -e "GRANT ALL PRIVILEGES ON nova_api.* TO 'nova'@'%' IDENTIFIED BY 'nova';" 78 | mysql -N -e "GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';" 79 | mysql -N -e "GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'nova';" 80 | mysql -N -e "GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'localhost' IDENTIFIED BY 'nova';" 81 | mysql -N -e "GRANT ALL PRIVILEGES ON nova_cell0.* TO 'nova'@'%' IDENTIFIED BY 'nova';" 82 | 83 | # Neutron 84 | mysql -N -e "drop database neutron;" || true 85 | mysql -N -e "create database neutron;" || true 86 | mysql -N -e "GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'localhost' IDENTIFIED BY 'neutron';" 87 | mysql -N -e "GRANT ALL PRIVILEGES ON neutron.* TO 'neutron'@'%' IDENTIFIED BY 'neutron';" 88 | ''; 89 | }; 90 | }; 91 | 92 | systemd.services.keystone-all = { 93 | description = "OpenStack Keystone Daemon"; 94 | after = [ "database-setup.service" ]; 95 | path = [ 96 | keystone 97 | pkgs.openstackclient 98 | ]; 99 | environment = adminEnv; 100 | wantedBy = [ "multi-user.target" ]; 101 | preStart = '' 102 | # Initialise the database 103 | keystone-manage --config-file ${config.keystone.config} db_sync 104 | # Set up the keystone's PKI infrastructure 105 | keystone-manage --config-file ${config.keystone.config} fernet_setup --keystone-user keystone --keystone-group keystone 106 | keystone-manage --config-file ${config.keystone.config} credential_setup --keystone-user keystone --keystone-group keystone 107 | chown -R keystone:keystone /etc/keystone 108 | chown -R keystone:keystone /var/log/keystone 109 | ''; 110 | serviceConfig = { 111 | PermissionsStartOnly = true; 112 | User = "keystone"; 113 | Group = "keystone"; 114 | Type = "oneshot"; 115 | ExecStart = pkgs.writeShellScript "keystone-all.sh" '' 116 | set -euxo pipefail 117 | keystone-manage --config-file ${config.keystone.config} bootstrap \ 118 | --bootstrap-password admin\ 119 | --bootstrap-region-id RegionOne 120 | openstack project create --domain default --description "Service Project" service 121 | ''; 122 | }; 123 | }; 124 | 125 | systemd.services.glance = { 126 | description = "OpenStack Glance setup"; 127 | after = [ "keystone-all.service" ]; 128 | wantedBy = [ "multi-user.target" ]; 129 | environment = adminEnv; 130 | path = [ 131 | pkgs.openstackclient 132 | glance 133 | ]; 134 | serviceConfig = { 135 | Type = "oneshot"; 136 | User = "glance"; 137 | Group = "glance"; 138 | ExecStart = pkgs.writeShellScript "glance.sh" '' 139 | set -euxo pipefail 140 | openstack user create --domain default --password glance glance 141 | openstack role add --project service --user glance admin 142 | openstack role add --user glance --user-domain default --system all reader 143 | glance-manage --config-file ${config.glance.config} db_sync 144 | ''; 145 | }; 146 | }; 147 | 148 | # Placement service can be tested by executing 149 | # curl http://controller:8778 150 | # and receive some json with version info as result. 151 | systemd.services.placement = { 152 | description = "OpenStack Placement setup"; 153 | after = [ "glance.service" ]; 154 | requiredBy = [ "multi-user.target" ]; 155 | environment = adminEnv; 156 | path = [ 157 | pkgs.openstackclient 158 | placement 159 | ]; 160 | serviceConfig = { 161 | Type = "oneshot"; 162 | User = "placement"; 163 | Group = "placement"; 164 | ExecStart = pkgs.writeShellScript "placement.sh" '' 165 | set -euxo pipefail 166 | openstack user create --domain default --password placement placement 167 | openstack role add --project service --user placement admin 168 | placement-manage --config-file ${config.placement.config} db sync 169 | ''; 170 | }; 171 | }; 172 | 173 | systemd.services.nova = { 174 | description = "OpenStack Nova setup"; 175 | after = [ "neutron.service" ]; 176 | wantedBy = [ "multi-user.target" ]; 177 | environment = adminEnv; 178 | path = [ 179 | pkgs.openstackclient 180 | nova 181 | ]; 182 | serviceConfig = { 183 | Type = "oneshot"; 184 | User = "nova"; 185 | Group = "nova"; 186 | ExecStart = pkgs.writeShellScript "nova.sh" '' 187 | set -euxo pipefail 188 | openstack user create --domain default --password nova nova 189 | openstack role add --project service --user nova admin 190 | nova-manage --config-file ${config.nova.config} api_db sync 191 | nova-manage --config-file ${config.nova.config} cell_v2 map_cell0 192 | nova-manage --config-file ${config.nova.config} cell_v2 create_cell --name=cell1 --verbose 193 | nova-manage --config-file ${config.nova.config} db sync 194 | ''; 195 | }; 196 | }; 197 | 198 | systemd.services.neutron = { 199 | description = "OpenStack Neutron setup"; 200 | after = [ "placement.service" ]; 201 | wantedBy = [ "multi-user.target" ]; 202 | environment = adminEnv; 203 | path = [ 204 | pkgs.openstackclient 205 | neutron 206 | ]; 207 | serviceConfig = { 208 | Type = "oneshot"; 209 | User = "neutron"; 210 | Group = "neutron"; 211 | ExecStart = pkgs.writeShellScript "neutron.sh" '' 212 | set -euxo pipefail 213 | openstack user create --domain default --password neutron neutron 214 | openstack role add --project service --user neutron admin 215 | neutron-db-manage --config-file ${config.neutron.config} --config-file ${config.neutron.ml2Config} upgrade head 216 | ''; 217 | }; 218 | }; 219 | }; 220 | } 221 | -------------------------------------------------------------------------------- /modules/controller/placement.nix: -------------------------------------------------------------------------------- 1 | { placement }: 2 | { 3 | config, 4 | lib, 5 | pkgs, 6 | ... 7 | }: 8 | 9 | with lib; 10 | 11 | let 12 | cfg = config.placement; 13 | 14 | placementConf = pkgs.writeText "placement.conf" '' 15 | [DEFAULT] 16 | auth_strategy = keystone 17 | 18 | [keystone_authtoken] 19 | www_authenticate_uri = http://controller:5000 20 | auth_url = http://controller:5000 21 | auth_type = password 22 | project_domain_name = Default 23 | user_domain_name = Default 24 | project_name = service 25 | username = placement 26 | password = placement 27 | 28 | [placement_database] 29 | connection = mysql+pymysql://placement:placement@controller/placement 30 | ''; 31 | in 32 | { 33 | options.placement = { 34 | enable = mkEnableOption "Enable OpenStack Placement." // { 35 | default = true; 36 | }; 37 | config = mkOption { 38 | default = placementConf; 39 | description = '' 40 | The Placement config. 41 | ''; 42 | }; 43 | }; 44 | config = mkIf cfg.enable { 45 | 46 | users.extraUsers.placement = { 47 | group = "placement"; 48 | isSystemUser = true; 49 | }; 50 | users.groups.placement = { 51 | name = "placement"; 52 | members = [ "placement" ]; 53 | }; 54 | 55 | systemd.tmpfiles.settings = { 56 | "10-placement" = { 57 | "/etc/placement/placement.conf" = { 58 | L = { 59 | argument = "${cfg.config}"; 60 | }; 61 | }; 62 | }; 63 | }; 64 | 65 | systemd.services.placement-api = { 66 | description = "OpenStack Placement API Daemon"; 67 | after = [ 68 | "placement.service" 69 | "rabbitmq.service" 70 | "mysql.service" 71 | "network.target" 72 | ]; 73 | path = [ placement ]; 74 | wantedBy = [ "multi-user.target" ]; 75 | serviceConfig = { 76 | User = "placement"; 77 | Group = "placement"; 78 | ExecStart = pkgs.writeShellScript "placement-api.sh" '' 79 | # Using the placement-api binary directly warns about that should only 80 | # be done in development environments. The "correct" way is to use 81 | # uwsgi, which is kinda tricky in nixos because we would have to start 82 | # the keystone uwsgi service at first, and placement later. That 83 | # cannot be expressed in the nixos config AFAIK. 84 | placement-api --port 8778 85 | ''; 86 | }; 87 | }; 88 | }; 89 | } 90 | -------------------------------------------------------------------------------- /modules/default.nix: -------------------------------------------------------------------------------- 1 | { openstackPkgs }: 2 | { 3 | controllerModule = import ./controller/openstack-controller.nix { 4 | inherit (openstackPkgs) 5 | nova 6 | neutron 7 | keystone 8 | glance 9 | horizon 10 | ; 11 | placement = openstackPkgs.openstack-placement; 12 | }; 13 | 14 | computeModule = import ./compute/compute.nix { inherit (openstackPkgs) neutron nova; }; 15 | 16 | testModules = import ./testing { }; 17 | } 18 | -------------------------------------------------------------------------------- /modules/testing/default.nix: -------------------------------------------------------------------------------- 1 | { }: 2 | let 3 | adminEnv = { 4 | OS_USERNAME = "admin"; 5 | OS_PASSWORD = "admin"; 6 | OS_PROJECT_NAME = "admin"; 7 | OS_USER_DOMAIN_NAME = "Default"; 8 | OS_PROJECT_DOMAIN_NAME = "Default"; 9 | OS_AUTH_URL = "http://controller:5000/v3"; 10 | OS_IDENTITY_API_VERSION = "3"; 11 | }; 12 | 13 | common = 14 | { pkgs, lib, ... }: 15 | { 16 | system.stateVersion = lib.trivial.release; 17 | 18 | services.getty.autologinUser = "root"; 19 | 20 | networking.extraHosts = '' 21 | 10.0.0.11 controller controller.local 22 | ''; 23 | 24 | networking = { 25 | useDHCP = false; 26 | networkmanager.enable = false; 27 | useNetworkd = true; 28 | firewall.enable = false; 29 | }; 30 | 31 | environment.systemPackages = [ 32 | pkgs.openstackclient 33 | ]; 34 | 35 | environment.variables = adminEnv; 36 | }; 37 | in 38 | { 39 | testController = 40 | { pkgs, ... }: 41 | let 42 | image = pkgs.fetchurl { 43 | url = "https://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img"; 44 | hash = "sha256-B+RKc+VMlNmIAoUVQDwe12IFXgG4OnZ+3zwrOH94zgA="; 45 | }; 46 | in 47 | { 48 | imports = [ common ]; 49 | 50 | virtualisation = { 51 | cores = 4; 52 | memorySize = 6144; 53 | interfaces = { 54 | eth1 = { 55 | vlan = 1; 56 | }; 57 | eth2 = { 58 | vlan = 2; 59 | }; 60 | }; 61 | }; 62 | 63 | systemd.services.openstack-create-vm = { 64 | description = "OpenStack"; 65 | path = [ 66 | pkgs.openstackclient 67 | pkgs.openssh 68 | ]; 69 | environment = adminEnv; 70 | serviceConfig = { 71 | Type = "simple"; 72 | ExecStart = pkgs.writeShellScript "openstack-create-vm.sh" '' 73 | set -euxo pipefail 74 | 75 | openstack network create --share --external \ 76 | --provider-physical-network provider \ 77 | --provider-network-type flat provider 78 | 79 | openstack subnet create --network provider \ 80 | --allocation-pool start=192.168.44.50,end=192.168.44.100 \ 81 | --dns-nameserver 8.8.4.4 --gateway 192.168.44.1 \ 82 | --subnet-range 192.168.44.0/24 provider 83 | 84 | openstack image create --disk-format qcow2 --container-format bare --public --file ${image} cirros 85 | openstack flavor create --public m1.nano --id auto --ram 256 --disk 0 --vcpus 1 86 | 87 | openstack security group rule create --proto icmp default 88 | openstack security group rule create --proto tcp --dst-port 22 default 89 | 90 | mkdir -p /root/.ssh/ 91 | ssh-keygen -q -N "" -t rsa -f /root/.ssh/id_rsa 92 | openstack keypair create --public-key ~/.ssh/id_rsa.pub mykey 93 | 94 | openstack server create \ 95 | --flavor m1.nano \ 96 | --image cirros \ 97 | --key-name mykey \ 98 | --security-group default test_vm \ 99 | --network provider 100 | ''; 101 | }; 102 | }; 103 | 104 | systemd.network = { 105 | enable = true; 106 | wait-online.enable = false; 107 | 108 | networks = { 109 | eth0 = { 110 | matchConfig.Name = [ "eth0" ]; 111 | networkConfig = { 112 | DHCP = "yes"; 113 | }; 114 | }; 115 | eth1 = { 116 | matchConfig.Name = [ "eth1" ]; 117 | networkConfig = { 118 | Address = "10.0.0.11/24"; 119 | Gateway = "10.0.0.1"; 120 | DNS = "8.8.8.8"; 121 | }; 122 | }; 123 | 124 | eth2 = { 125 | matchConfig.Name = [ "eth2" ]; 126 | networkConfig = { 127 | DHCP = "no"; 128 | LinkLocalAddressing = "no"; 129 | KeepConfiguration = "yes"; 130 | }; 131 | }; 132 | }; 133 | }; 134 | }; 135 | 136 | testCompute = 137 | { ... }: 138 | { 139 | imports = [ common ]; 140 | 141 | virtualisation = { 142 | memorySize = 4096; 143 | cores = 4; 144 | interfaces = { 145 | eth1 = { 146 | vlan = 1; 147 | }; 148 | eth2 = { 149 | vlan = 2; 150 | }; 151 | }; 152 | }; 153 | 154 | systemd.network = { 155 | enable = true; 156 | wait-online.enable = false; 157 | 158 | networks = { 159 | eth1 = { 160 | matchConfig.Name = [ "eth1" ]; 161 | networkConfig = { 162 | Address = "10.0.0.39/24"; 163 | Gateway = "10.0.0.1"; 164 | DNS = "8.8.8.8"; 165 | }; 166 | }; 167 | 168 | eth2 = { 169 | matchConfig.Name = [ "eth2" ]; 170 | networkConfig = { 171 | DHCP = "no"; 172 | LinkLocalAddressing = "no"; 173 | KeepConfiguration = "yes"; 174 | }; 175 | }; 176 | }; 177 | }; 178 | 179 | }; 180 | } 181 | -------------------------------------------------------------------------------- /packages/automaton.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | let 3 | inherit (python3Packages) 4 | pbr 5 | stestr 6 | ; 7 | in 8 | python3Packages.buildPythonPackage rec { 9 | pname = "automaton"; 10 | version = "3.2.0"; 11 | 12 | nativeBuildInputs = [ 13 | pbr 14 | ]; 15 | 16 | nativeCheckInputs = [ 17 | stestr 18 | ]; 19 | 20 | checkPhase = '' 21 | stestr run 22 | ''; 23 | 24 | src = fetchPypi { 25 | inherit pname version; 26 | sha256 = "sha256-BHZwiG6bwxbjkVwjsJLN5QHUnK4NN6k6xt3jS1BEssw="; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /packages/castellan.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | keystoneauth1, 4 | oslo-config, 5 | oslo-context, 6 | oslo-i18n, 7 | oslo-log, 8 | oslo-utils, 9 | oslotest, 10 | pifpaf, 11 | python-barbicanclient, 12 | python3Packages, 13 | }: 14 | let 15 | inherit (python3Packages) 16 | coverage 17 | cryptography 18 | fixtures 19 | pbr 20 | python-dateutil 21 | python-subunit 22 | requests 23 | requests-mock 24 | stestr 25 | stevedore 26 | testscenarios 27 | testtools 28 | ; 29 | in 30 | python3Packages.buildPythonPackage rec { 31 | pname = "castellan"; 32 | version = "5.1.1"; 33 | 34 | nativeBuildInputs = [ 35 | pbr 36 | pifpaf 37 | ]; 38 | 39 | propagatedBuildInputs = [ 40 | cryptography 41 | keystoneauth1 42 | oslo-config 43 | oslo-context 44 | oslo-i18n 45 | oslo-log 46 | oslo-utils 47 | python-barbicanclient 48 | python-dateutil 49 | requests 50 | stevedore 51 | ]; 52 | 53 | nativeCheckInputs = [ 54 | stestr 55 | ]; 56 | 57 | checkInputs = [ 58 | coverage 59 | fixtures 60 | oslotest 61 | python-barbicanclient 62 | python-subunit 63 | requests-mock 64 | testscenarios 65 | testtools 66 | ]; 67 | 68 | checkPhase = '' 69 | stestr run 70 | ''; 71 | 72 | src = fetchPypi { 73 | inherit pname version; 74 | sha256 = "sha256-eZPOpkc4OuAsgYFtdesiwqQoDi0bmLHij//UD8bYuy8="; 75 | }; 76 | } 77 | -------------------------------------------------------------------------------- /packages/cursive.nix: -------------------------------------------------------------------------------- 1 | { 2 | castellan, 3 | fetchPypi, 4 | oslo-i18n, 5 | oslo-log, 6 | oslo-serialization, 7 | oslo-utils, 8 | oslotest, 9 | python3Packages, 10 | }: 11 | let 12 | inherit (python3Packages) 13 | coverage 14 | cryptography 15 | hacking 16 | mock 17 | pbr 18 | python-subunit 19 | stestr 20 | testrepository 21 | testresources 22 | testtools 23 | ; 24 | in 25 | python3Packages.buildPythonPackage rec { 26 | pname = "cursive"; 27 | version = "0.2.3"; 28 | 29 | nativeBuildInputs = [ 30 | pbr 31 | ]; 32 | 33 | propagatedBuildInputs = [ 34 | castellan 35 | cryptography 36 | oslo-i18n 37 | oslo-log 38 | oslo-serialization 39 | oslo-utils 40 | ]; 41 | 42 | nativeCheckInputs = [ 43 | stestr 44 | ]; 45 | 46 | checkInputs = [ 47 | coverage 48 | hacking 49 | mock 50 | oslotest 51 | python-subunit 52 | testrepository 53 | testresources 54 | testtools 55 | ]; 56 | 57 | checkPhase = '' 58 | stestr run 59 | ''; 60 | 61 | src = fetchPypi { 62 | inherit pname version; 63 | sha256 = "sha256-9DX2zb5qUX8FTBEFw25DbXhoEk8bIn0xD+gJ2RiowQw="; 64 | }; 65 | 66 | } 67 | -------------------------------------------------------------------------------- /packages/django-debreach.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | let 3 | inherit (python3Packages) 4 | setuptools 5 | pip 6 | django 7 | ; 8 | in 9 | python3Packages.buildPythonPackage rec { 10 | pname = "django-debreach"; 11 | version = "2.1.0"; 12 | 13 | pyproject = true; 14 | 15 | nativeBuildInputs = [ 16 | setuptools 17 | pip 18 | ]; 19 | 20 | propagagedBuildInputs = [ 21 | django 22 | ]; 23 | 24 | src = fetchPypi { 25 | inherit pname version; 26 | sha256 = "sha256-rqyfQ+Dql4ML7WnLMJrVdGte0rnc5zOsTBNsjhan1uU="; 27 | }; 28 | } 29 | -------------------------------------------------------------------------------- /packages/django-discover-runner.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | let 3 | inherit (python3Packages) 4 | django 5 | ; 6 | in 7 | python3Packages.buildPythonPackage rec { 8 | pname = "django-discover-runner"; 9 | version = "1.0"; 10 | 11 | propagatedBuildInputs = [ 12 | django 13 | ]; 14 | 15 | src = fetchPypi { 16 | inherit pname version; 17 | sha256 = "sha256-C6kf5yLCVry/3rNvrH6sDyflv9pV2YxMHPmrYrWwhP4="; 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /packages/django-pyscss.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | python3Packages, 4 | }: 5 | let 6 | inherit (python3Packages) 7 | django 8 | pyscss 9 | ; 10 | in 11 | python3Packages.buildPythonPackage rec { 12 | pname = "django-pyscss"; 13 | version = "2.0.3"; 14 | 15 | propagatedBuildInputs = [ 16 | django 17 | pyscss 18 | ]; 19 | 20 | src = fetchPypi { 21 | inherit pname version; 22 | sha256 = "sha256-uXbDV1eWIL8hoQFSqGPTD2a7YozU+Z3vlZVfyFgeNtI="; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /packages/doc8.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | python3Packages, 4 | }: 5 | let 6 | inherit (python3Packages) 7 | docutils 8 | pygments 9 | restructuredtext-lint 10 | setuptools_scm 11 | stevedore 12 | tomli 13 | ; 14 | in 15 | python3Packages.buildPythonPackage rec { 16 | pname = "doc8"; 17 | version = "1.1.2"; 18 | pyproject = true; 19 | 20 | nativeBuildInputs = [ 21 | setuptools_scm 22 | ]; 23 | 24 | propagatedBuildInputs = [ 25 | docutils 26 | pygments 27 | restructuredtext-lint 28 | stevedore 29 | tomli 30 | ]; 31 | 32 | src = fetchPypi { 33 | inherit version pname; 34 | sha256 = "sha256-EiXzAUThzJfjiNuvf+PpltKJdHOlOm2uJo3d4hw1S5g="; 35 | }; 36 | } 37 | -------------------------------------------------------------------------------- /packages/enmerkar.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | python3Packages, 4 | }: 5 | let 6 | inherit (python3Packages) 7 | babel 8 | django 9 | pytest 10 | pytest-cov 11 | pytest-django 12 | ; 13 | in 14 | python3Packages.buildPythonPackage rec { 15 | pname = "enmerkar"; 16 | version = "0.7.1"; 17 | 18 | nativeBuildInputs = [ 19 | babel 20 | django 21 | ]; 22 | 23 | nativeCheckInputs = [ 24 | pytest 25 | pytest-cov 26 | pytest-django 27 | ]; 28 | 29 | src = fetchPypi { 30 | inherit version pname; 31 | 32 | sha256 = "sha256-pKbIWbTtKT3u5A/2HWaVs/97wVN3CheZ8r6HIYEoLgA="; 33 | }; 34 | } 35 | -------------------------------------------------------------------------------- /packages/etcd3gw.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | futurist, 4 | pifpaf, 5 | python3Packages, 6 | }: 7 | let 8 | inherit (python3Packages) 9 | coverage 10 | oslotest 11 | pbr 12 | pytest 13 | python-subunit 14 | requests 15 | testrepository 16 | testscenarios 17 | testtools 18 | urllib3 19 | ; 20 | in 21 | python3Packages.buildPythonPackage rec { 22 | pname = "etcd3gw"; 23 | version = "2.4.2"; 24 | 25 | nativeBuildInputs = [ 26 | pbr 27 | ]; 28 | 29 | propagatedBuildInputs = [ 30 | futurist 31 | requests 32 | ]; 33 | 34 | checkInputs = [ 35 | coverage 36 | oslotest 37 | pifpaf 38 | pytest 39 | python-subunit 40 | testrepository 41 | testscenarios 42 | testtools 43 | urllib3 44 | ]; 45 | 46 | src = fetchPypi { 47 | inherit pname version; 48 | sha256 = "sha256-bG6eQrgQ7pqUVd00LemJ8fq2N6lNqk/DTKyySKVEc/o="; 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /packages/flake8-logging-format.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | python3Packages, 4 | }: 5 | python3Packages.buildPythonPackage rec { 6 | pname = "flake8_logging_format"; 7 | version = "2024.24.12"; 8 | format = "wheel"; 9 | 10 | src = fetchPypi { 11 | inherit pname version format; 12 | python = "py3"; 13 | dist = "py3"; 14 | sha256 = "sha256-fZPCEHNUsQoFsaDYzNOpv7eTruEIAHdlEUyVinVB1nQ="; 15 | }; 16 | } 17 | -------------------------------------------------------------------------------- /packages/futurist.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslotest, 4 | python3Packages, 5 | }: 6 | let 7 | inherit (python3Packages) 8 | coverage 9 | eventlet 10 | pbr 11 | prettytable 12 | python-subunit 13 | stestr 14 | testscenarios 15 | testtools 16 | ; 17 | 18 | in 19 | python3Packages.buildPythonPackage rec { 20 | pname = "futurist"; 21 | version = "3.0.0"; 22 | 23 | nativeBuildInputs = [ 24 | pbr 25 | ]; 26 | 27 | nativeCheckInputs = [ 28 | stestr 29 | ]; 30 | 31 | checkInputs = [ 32 | coverage 33 | eventlet 34 | oslotest 35 | prettytable 36 | python-subunit 37 | testscenarios 38 | testtools 39 | ]; 40 | 41 | checkPhase = '' 42 | stestr run 43 | ''; 44 | 45 | src = fetchPypi { 46 | inherit pname version; 47 | sha256 = "sha256-ZCIBF5JBTDkijhFL7FSUMDqvBtzTNeT43U+Qf3ikH3k="; 48 | }; 49 | } 50 | -------------------------------------------------------------------------------- /packages/gabbi.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | jsonpath-rw-ext, 4 | python3Packages, 5 | }: 6 | let 7 | inherit (python3Packages) 8 | certifi 9 | colorama 10 | coverage 11 | hacking 12 | pbr 13 | pytest 14 | pytest-cov 15 | pyyaml 16 | requests-mock 17 | sphinx 18 | stestr 19 | urllib3 20 | wsgi-intercept 21 | ; 22 | 23 | in 24 | python3Packages.buildPythonPackage rec { 25 | pname = "gabbi"; 26 | version = "3.0.0"; 27 | 28 | nativeBuildInputs = [ 29 | pbr 30 | ]; 31 | 32 | propagatedBuildInputs = [ 33 | pytest 34 | pyyaml 35 | urllib3 36 | certifi 37 | jsonpath-rw-ext 38 | wsgi-intercept 39 | colorama 40 | ]; 41 | 42 | nativeCheckInputs = [ 43 | stestr 44 | ]; 45 | 46 | checkInputs = [ 47 | requests-mock 48 | coverage 49 | pytest-cov 50 | hacking 51 | sphinx 52 | ]; 53 | 54 | # We skip the below tests, because they need internet 55 | checkPhase = '' 56 | stestr run --exclude-regex ".*test_live|test_intercept.*" 57 | ''; 58 | 59 | src = fetchPypi { 60 | inherit pname version; 61 | sha256 = "sha256-zP9PtbyssmKzvyzPF52axUdVsVmtcMSYRSBp34dZ8Pw="; 62 | }; 63 | } 64 | -------------------------------------------------------------------------------- /packages/glance-store.nix: -------------------------------------------------------------------------------- 1 | { 2 | castellan, 3 | cursive, 4 | fetchPypi, 5 | keystoneauth1, 6 | keystonemiddleware, 7 | lib, 8 | os-brick, 9 | os-win, 10 | oslo-db, 11 | oslo-i18n, 12 | oslo-limit, 13 | oslo-log, 14 | oslo-messaging, 15 | oslo-middleware, 16 | oslo-reports, 17 | oslo-upgradecheck, 18 | oslo-vmware, 19 | oslotest, 20 | osprofiler, 21 | python-cinderclient, 22 | python3Packages, 23 | taskflow, 24 | writeScript, 25 | }: 26 | let 27 | inherit (python3Packages) 28 | boto3 29 | ddt 30 | defusedxml 31 | httplib2 32 | jsonschema 33 | pbr 34 | python-swiftclient 35 | requests-mock 36 | retrying 37 | stestr 38 | ; 39 | 40 | excludeList = [ 41 | "test_add_check_metadata_list_with_valid_mountpoint_locations" 42 | ]; 43 | 44 | excludeListFile = writeScript "testExcludes" (lib.concatStringsSep "\n" excludeList); 45 | in 46 | python3Packages.buildPythonPackage (rec { 47 | pname = "glance_store"; 48 | version = "4.8.1"; 49 | pyproject = true; 50 | 51 | nativeBuildInputs = [ 52 | pbr 53 | ]; 54 | 55 | propagatedBuildInputs = [ 56 | castellan 57 | cursive 58 | ddt 59 | defusedxml 60 | httplib2 61 | jsonschema 62 | keystoneauth1 63 | keystonemiddleware 64 | os-win 65 | oslo-db 66 | oslo-i18n 67 | oslo-limit 68 | oslo-log 69 | oslo-messaging 70 | oslo-middleware 71 | oslo-reports 72 | oslo-upgradecheck 73 | osprofiler 74 | retrying 75 | taskflow 76 | ]; 77 | 78 | nativeCheckInputs = [ 79 | stestr 80 | ]; 81 | 82 | checkInputs = [ 83 | boto3 84 | os-brick 85 | oslo-vmware 86 | oslotest 87 | python-cinderclient 88 | python-swiftclient 89 | requests-mock 90 | ]; 91 | 92 | checkPhase = '' 93 | stestr run --exclude-list ${excludeListFile} 94 | ''; 95 | 96 | src = fetchPypi { 97 | inherit pname version; 98 | sha256 = "sha256-nkLWMCzcytNyI+rZoHRBWh1LnA7+gCcrN7YoZFb0dzc="; 99 | }; 100 | }) 101 | -------------------------------------------------------------------------------- /packages/glance.nix: -------------------------------------------------------------------------------- 1 | { 2 | castellan, 3 | cursive, 4 | fetchPypi, 5 | glance-store, 6 | keystoneauth1, 7 | keystonemiddleware, 8 | os-brick, 9 | os-win, 10 | oslo-db, 11 | oslo-i18n, 12 | oslo-limit, 13 | oslo-log, 14 | oslo-messaging, 15 | oslo-middleware, 16 | oslo-policy, 17 | oslo-reports, 18 | oslo-upgradecheck, 19 | osprofiler, 20 | python-cinderclient, 21 | python3Packages, 22 | qemu, 23 | taskflow, 24 | wsme, 25 | }: 26 | let 27 | inherit (python3Packages) 28 | defusedxml 29 | httplib2 30 | jsonschema 31 | pbr 32 | pymysql 33 | python-memcached 34 | python-swiftclient 35 | pythonRelaxDepsHook 36 | retrying 37 | stestr 38 | ; 39 | 40 | in 41 | python3Packages.buildPythonPackage (rec { 42 | pname = "glance"; 43 | version = "29.0.0"; 44 | pyproject = true; 45 | 46 | nativeBuildInputs = [ 47 | pbr 48 | pythonRelaxDepsHook 49 | ]; 50 | 51 | pythonRelaxDeps = [ "defusedxml" ]; 52 | 53 | propagatedBuildInputs = [ 54 | castellan 55 | cursive 56 | defusedxml 57 | glance-store 58 | httplib2 59 | jsonschema 60 | keystoneauth1 61 | keystonemiddleware 62 | os-brick 63 | os-win 64 | oslo-db 65 | oslo-i18n 66 | oslo-limit 67 | oslo-log 68 | oslo-messaging 69 | oslo-middleware 70 | oslo-policy 71 | oslo-reports 72 | oslo-upgradecheck 73 | osprofiler 74 | pymysql 75 | python-memcached 76 | retrying 77 | taskflow 78 | wsme 79 | ]; 80 | 81 | nativeCheckInputs = [ 82 | qemu 83 | stestr 84 | ]; 85 | 86 | checkInputs = [ 87 | python-cinderclient 88 | python-swiftclient 89 | ]; 90 | 91 | # The schema-image.json is required for glance configuration but currently not 92 | # exported by the python package. 93 | postFixup = '' 94 | cp etc/schema-image.json $out/etc/glance/ 95 | ''; 96 | 97 | checkPhase = '' 98 | stestr run 99 | ''; 100 | 101 | src = fetchPypi { 102 | inherit pname version; 103 | sha256 = "sha256-gI6+t3MnSiD3adVMDedWlRnk1wyGyVnGHCM3ByLYIrk="; 104 | }; 105 | }) 106 | -------------------------------------------------------------------------------- /packages/horizon.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | python3Packages, 4 | xvfb-run, 5 | django-debreach, 6 | django-pyscss, 7 | enmerkar, 8 | futurist, 9 | gettext, 10 | keystoneauth1, 11 | oslo-concurrency, 12 | oslo-config, 13 | oslo-i18n, 14 | oslo-policy, 15 | oslo-serialization, 16 | oslo-upgradecheck, 17 | oslo-utils, 18 | osprofiler, 19 | python-cinderclient, 20 | python-glanceclient, 21 | python-keystoneclient, 22 | python-neutronclient, 23 | python-novaclient, 24 | python-swiftclient, 25 | xstatic-angular, 26 | xstatic-angular-bootstrap, 27 | xstatic-angular-fileupload, 28 | xstatic-angular-gettext, 29 | xstatic-angular-lrdragndrop, 30 | xstatic-angular-schema-form, 31 | xstatic-bootstrap-datepicker, 32 | xstatic-bootstrap-scss, 33 | xstatic-bootswatch, 34 | xstatic-jsencrypt, 35 | xstatic-d3, 36 | xstatic-font-awesome, 37 | xstatic-hogan, 38 | xstatic-jasmine, 39 | xstatic-jquery-migrate, 40 | xstatic-jquery-quicksearch, 41 | xstatic-jquery-tablesorter, 42 | xstatic-mdi, 43 | xstatic-objectpath, 44 | xstatic-rickshaw, 45 | xstatic-roboto-fontface, 46 | xstatic-smart-table, 47 | xstatic-spin, 48 | xstatic-term-js, 49 | xstatic-tv4, 50 | }: 51 | let 52 | inherit (python3Packages) 53 | babel 54 | coverage 55 | django 56 | django-compressor 57 | freezegun 58 | hacking 59 | iso8601 60 | libsass 61 | netaddr 62 | nodeenv 63 | pbr 64 | pycodestyle 65 | pymemcache 66 | pyscss 67 | pytest 68 | pytest-django 69 | pytest-html 70 | pyyaml 71 | requests 72 | selenium 73 | semantic-version 74 | testscenarios 75 | testtools 76 | tzdata 77 | xstatic 78 | xstatic-jquery 79 | xstatic-jquery-ui 80 | xvfbwrapper 81 | ; 82 | in 83 | python3Packages.buildPythonPackage rec { 84 | pname = "horizon"; 85 | version = "25.1.0"; 86 | 87 | nativeBuildInputs = [ 88 | pbr 89 | gettext 90 | enmerkar 91 | ]; 92 | 93 | propagatedBuildInputs = [ 94 | babel 95 | django 96 | django-compressor 97 | django-debreach 98 | django-pyscss 99 | futurist 100 | iso8601 101 | keystoneauth1 102 | libsass 103 | netaddr 104 | oslo-concurrency 105 | oslo-config 106 | oslo-i18n 107 | oslo-policy 108 | oslo-serialization 109 | oslo-upgradecheck 110 | oslo-utils 111 | osprofiler 112 | pymemcache 113 | pyscss 114 | python-cinderclient 115 | python-glanceclient 116 | python-keystoneclient 117 | python-neutronclient 118 | python-novaclient 119 | python-swiftclient 120 | pyyaml 121 | requests 122 | semantic-version 123 | tzdata 124 | xstatic 125 | xstatic-angular 126 | xstatic-angular-bootstrap 127 | xstatic-angular-fileupload 128 | xstatic-angular-gettext 129 | xstatic-angular-lrdragndrop 130 | xstatic-angular-schema-form 131 | xstatic-bootstrap-datepicker 132 | xstatic-bootstrap-scss 133 | xstatic-bootswatch 134 | xstatic-d3 135 | xstatic-font-awesome 136 | xstatic-hogan 137 | xstatic-jasmine 138 | xstatic-jquery 139 | xstatic-jquery-migrate 140 | xstatic-jquery-quicksearch 141 | xstatic-jquery-tablesorter 142 | xstatic-jquery-ui 143 | xstatic-jsencrypt 144 | xstatic-mdi 145 | xstatic-objectpath 146 | xstatic-rickshaw 147 | xstatic-roboto-fontface 148 | xstatic-smart-table 149 | xstatic-spin 150 | xstatic-term-js 151 | xstatic-tv4 152 | ]; 153 | 154 | preBuild = '' 155 | python ./manage.py compilemessages 156 | python ./manage.py collectstatic -c --noinput 157 | python ./manage.py compress --force 158 | ''; 159 | 160 | nativeCheckInputs = [ 161 | pytest 162 | xvfb-run 163 | ]; 164 | 165 | checkInputs = [ 166 | coverage 167 | freezegun 168 | hacking 169 | nodeenv 170 | pycodestyle 171 | pytest-django 172 | pytest-html 173 | selenium 174 | testscenarios 175 | testtools 176 | xvfbwrapper 177 | ]; 178 | 179 | postInstall = '' 180 | cp -r static $out/static-compressed 181 | ''; 182 | # Tox is needed as test framework. Tox requires pip install inside the virtual env. Thus we test manually 183 | checkPhase = " 184 | ./tools/unit_tests.sh . horizon 185 | ./tools/unit_tests.sh . openstack_auth 186 | "; 187 | 188 | src = fetchPypi { 189 | inherit pname version; 190 | sha256 = "sha256-w+NOvS9kFlXJMgU8V7NRO92t2jE1UaE5A5CItyHy/Dc="; 191 | }; 192 | } 193 | -------------------------------------------------------------------------------- /packages/jsonpath-rw-ext.nix: -------------------------------------------------------------------------------- 1 | { 2 | discover, 3 | fetchPypi, 4 | python3Packages, 5 | }: 6 | let 7 | inherit (python3Packages) 8 | coverage 9 | hacking 10 | jsonpath-rw 11 | oslotest 12 | pbr 13 | python-subunit 14 | sphinx 15 | testrepository 16 | testscenarios 17 | testtools 18 | ; 19 | 20 | in 21 | python3Packages.buildPythonPackage rec { 22 | pname = "jsonpath-rw-ext"; 23 | version = "1.2.2"; 24 | 25 | nativeBuildInputs = [ 26 | pbr 27 | ]; 28 | 29 | propagatedBuildInputs = [ 30 | jsonpath-rw 31 | ]; 32 | 33 | checkInputs = [ 34 | coverage 35 | discover 36 | hacking 37 | oslotest 38 | python-subunit 39 | sphinx 40 | testrepository 41 | testscenarios 42 | testtools 43 | ]; 44 | 45 | src = fetchPypi { 46 | inherit pname version; 47 | 48 | sha256 = "sha256-qeROgDtth9E1sJ0eWvDbTUz5e6YnEagKpRyMchmAqZQ="; 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /packages/keystone.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | keystonemiddleware, 4 | oslo-cache, 5 | oslo-db, 6 | oslo-log, 7 | oslo-messaging, 8 | oslo-middleware, 9 | oslo-policy, 10 | oslo-serialization, 11 | oslo-upgradecheck, 12 | oslotest, 13 | osprofiler, 14 | python-keystoneclient, 15 | python3Packages, 16 | which, 17 | }: 18 | let 19 | inherit (python3Packages) 20 | bandit 21 | bcrypt 22 | cryptography 23 | flask 24 | flask-restful 25 | freezegun 26 | hacking 27 | jsonschema 28 | ldap 29 | ldappool 30 | lxml 31 | oauthlib 32 | passlib 33 | pbr 34 | py_scrypt 35 | pycodestyle 36 | pymysql 37 | pysaml2 38 | requests 39 | sqlalchemy 40 | stestr 41 | tempest 42 | testresources 43 | testscenarios 44 | testtools 45 | webob 46 | webtest 47 | ; 48 | in 49 | python3Packages.buildPythonPackage (rec { 50 | pname = "keystone"; 51 | version = "26.0.0"; 52 | pyproject = true; 53 | 54 | nativeBuildInputs = [ 55 | pbr 56 | ]; 57 | 58 | propagatedBuildInputs = [ 59 | bcrypt 60 | cryptography 61 | flask 62 | flask-restful 63 | jsonschema 64 | keystonemiddleware 65 | oauthlib 66 | oslo-cache 67 | oslo-db 68 | oslo-log 69 | oslo-messaging 70 | oslo-middleware 71 | oslo-policy 72 | oslo-serialization 73 | oslo-upgradecheck 74 | osprofiler 75 | passlib 76 | py_scrypt 77 | pymysql 78 | pysaml2 79 | python-keystoneclient 80 | sqlalchemy 81 | webob 82 | ]; 83 | 84 | nativeCheckInputs = [ 85 | oslo-policy 86 | stestr 87 | which 88 | ]; 89 | 90 | checkInputs = [ 91 | bandit 92 | freezegun 93 | hacking 94 | ldap 95 | ldappool 96 | lxml 97 | oslo-db 98 | oslotest 99 | pycodestyle 100 | requests 101 | tempest 102 | testresources 103 | testscenarios 104 | testtools 105 | webtest 106 | ]; 107 | 108 | checkPhase = '' 109 | stestr run 110 | ''; 111 | 112 | src = fetchPypi { 113 | inherit pname version; 114 | sha256 = "sha256-dUFsKwu17C7eFsvGMuRA+Vsd7U/bBvixZrolwXGv1+k="; 115 | }; 116 | }) 117 | -------------------------------------------------------------------------------- /packages/keystoneauth1.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-config, 4 | oslo-utils, 5 | oslotest, 6 | python3Packages, 7 | }: 8 | let 9 | inherit (python3Packages) 10 | bandit 11 | betamax 12 | coverage 13 | fixtures 14 | flake8-docstrings 15 | flake8-import-order 16 | hacking 17 | iso8601 18 | lxml 19 | oauthlib 20 | os-service-types 21 | pbr 22 | pyyaml 23 | requests 24 | requests-kerberos 25 | requests-mock 26 | stestr 27 | stevedore 28 | testresources 29 | testtools 30 | typing-extensions 31 | ; 32 | in 33 | python3Packages.buildPythonPackage rec { 34 | pname = "keystoneauth1"; 35 | version = "5.8.0"; 36 | 37 | nativeBuildInputs = [ 38 | pbr 39 | ]; 40 | 41 | propagatedBuildInputs = [ 42 | iso8601 43 | requests 44 | stevedore 45 | typing-extensions 46 | os-service-types 47 | ]; 48 | 49 | nativeCheckInputs = [ 50 | stestr 51 | ]; 52 | 53 | checkInputs = [ 54 | bandit 55 | betamax 56 | coverage 57 | fixtures 58 | flake8-docstrings 59 | flake8-import-order 60 | hacking 61 | lxml 62 | oauthlib 63 | oslo-config 64 | oslo-utils 65 | oslotest 66 | pyyaml 67 | requests-kerberos 68 | requests-mock 69 | testresources 70 | testtools 71 | ]; 72 | 73 | checkPhase = '' 74 | stestr run . --exclude-regex test_keystoneauth_betamax_fixture 75 | ''; 76 | 77 | src = fetchPypi { 78 | inherit pname version; 79 | sha256 = "sha256-MVfCEuEhFk3mTWPl734dqtK9NkmmjeHpcbdodwGe8cQ="; 80 | }; 81 | } 82 | -------------------------------------------------------------------------------- /packages/keystonemiddleware.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | keystoneauth1, 4 | oslo-cache, 5 | oslo-config, 6 | oslo-context, 7 | oslo-i18n, 8 | oslo-log, 9 | oslo-messaging, 10 | oslo-serialization, 11 | oslo-utils, 12 | oslotest, 13 | pycadf, 14 | python-keystoneclient, 15 | python3Packages, 16 | }: 17 | let 18 | inherit (python3Packages) 19 | bandit 20 | coverage 21 | cryptography 22 | fixtures 23 | flake8-docstrings 24 | hacking 25 | pbr 26 | pyjwt 27 | python-memcached 28 | requests 29 | requests-mock 30 | stestr 31 | stevedore 32 | testresources 33 | testtools 34 | webob 35 | webtest 36 | ; 37 | in 38 | python3Packages.buildPythonPackage rec { 39 | pname = "keystonemiddleware"; 40 | version = "10.8.0"; 41 | 42 | nativeBuildInputs = [ 43 | pbr 44 | ]; 45 | 46 | propagatedBuildInputs = [ 47 | keystoneauth1 48 | oslo-cache 49 | oslo-config 50 | oslo-context 51 | oslo-i18n 52 | oslo-log 53 | oslo-serialization 54 | oslo-utils 55 | pycadf 56 | pyjwt 57 | python-keystoneclient 58 | requests 59 | webob 60 | ]; 61 | 62 | nativeCheckInputs = [ 63 | stestr 64 | ]; 65 | 66 | checkInputs = [ 67 | hacking 68 | flake8-docstrings 69 | coverage 70 | cryptography 71 | fixtures 72 | oslotest 73 | stevedore 74 | requests-mock 75 | stestr 76 | testresources 77 | testtools 78 | python-memcached 79 | webtest 80 | oslo-messaging 81 | pyjwt 82 | bandit 83 | ]; 84 | 85 | checkPhase = '' 86 | stestr run 87 | ''; 88 | 89 | src = fetchPypi { 90 | inherit pname version; 91 | sha256 = "sha256-oV5Vxy2tYIRm96mtEMWLEYIWsMOX1AJRetJvPU4RsKQ="; 92 | }; 93 | } 94 | -------------------------------------------------------------------------------- /packages/microversion-parse.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | gabbi, 4 | pre-commit, 5 | python3Packages, 6 | }: 7 | let 8 | inherit (python3Packages) 9 | coverage 10 | hacking 11 | stestr 12 | testtools 13 | webob 14 | ; 15 | in 16 | python3Packages.buildPythonPackage rec { 17 | pname = "microversion_parse"; 18 | version = "2.0.0"; 19 | 20 | nativeBuildInputs = [ 21 | pre-commit 22 | ]; 23 | 24 | propagatedBuildInputs = [ 25 | webob 26 | ]; 27 | 28 | nativeCheckInputs = [ 29 | stestr 30 | ]; 31 | 32 | checkInputs = [ 33 | coverage 34 | hacking 35 | gabbi 36 | testtools 37 | ]; 38 | 39 | checkPhase = '' 40 | stestr run 41 | ''; 42 | 43 | src = fetchPypi { 44 | inherit pname version; 45 | sha256 = "sha256-OmUo7fc/O8tFB/Ta09vDEW6XBIFe373W/wbcX4macdw="; 46 | }; 47 | } 48 | -------------------------------------------------------------------------------- /packages/neutron-lib.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | keystoneauth1, 4 | os-ken, 5 | os-traits, 6 | oslo-concurrency, 7 | oslo-config, 8 | oslo-context, 9 | oslo-db, 10 | oslo-i18n, 11 | oslo-log, 12 | oslo-messaging, 13 | oslo-policy, 14 | oslo-serialization, 15 | oslo-service, 16 | oslo-utils, 17 | oslo-versionedobjects, 18 | oslotest, 19 | osprofiler, 20 | python3Packages, 21 | }: 22 | let 23 | inherit (python3Packages) 24 | coverage 25 | ddt 26 | fixtures 27 | flake8-import-order 28 | hacking 29 | isort 30 | netaddr 31 | pbr 32 | pecan 33 | pylint 34 | python-subunit 35 | setproctitle 36 | sqlalchemy 37 | stestr 38 | stevedore 39 | testresources 40 | testscenarios 41 | testtools 42 | webob 43 | ; 44 | in 45 | python3Packages.buildPythonPackage rec { 46 | pname = "neutron-lib"; 47 | version = "3.16.0"; 48 | 49 | nativeBuildInputs = [ 50 | pbr 51 | ]; 52 | 53 | propagatedBuildInputs = [ 54 | keystoneauth1 55 | netaddr 56 | os-ken 57 | os-traits 58 | oslo-concurrency 59 | oslo-config 60 | oslo-context 61 | oslo-db 62 | oslo-i18n 63 | oslo-log 64 | oslo-messaging 65 | oslo-policy 66 | oslo-serialization 67 | oslo-service 68 | oslo-utils 69 | oslo-versionedobjects 70 | osprofiler 71 | pecan 72 | setproctitle 73 | sqlalchemy 74 | stevedore 75 | webob 76 | ]; 77 | 78 | nativeCheckInputs = [ 79 | stestr 80 | ]; 81 | 82 | checkInputs = [ 83 | coverage 84 | ddt 85 | fixtures 86 | flake8-import-order 87 | hacking 88 | isort 89 | oslotest 90 | pylint 91 | python-subunit 92 | testresources 93 | testscenarios 94 | testtools 95 | ]; 96 | 97 | checkPhase = '' 98 | stestr run 99 | ''; 100 | 101 | src = fetchPypi { 102 | inherit pname version; 103 | sha256 = "sha256-dvqSqJfR/zwxOZRA1P4ASPpg+hXTRX0GA3dCIwDP/ZI="; 104 | }; 105 | } 106 | -------------------------------------------------------------------------------- /packages/neutron.nix: -------------------------------------------------------------------------------- 1 | { 2 | doc8, 3 | fetchPypi, 4 | futurist, 5 | iproute2, 6 | keystoneauth1, 7 | keystonemiddleware, 8 | lib, 9 | neutron-lib, 10 | openstacksdk, 11 | os-ken, 12 | os-resource-classes, 13 | os-vif, 14 | oslo-cache, 15 | oslo-concurrency, 16 | oslo-config, 17 | oslo-context, 18 | oslo-db, 19 | oslo-i18n, 20 | oslo-log, 21 | oslo-messaging, 22 | oslo-middleware, 23 | oslo-policy, 24 | oslo-privsep, 25 | oslo-reports, 26 | oslo-rootwrap, 27 | oslo-serialization, 28 | oslo-service, 29 | oslo-upgradecheck, 30 | oslo-utils, 31 | oslo-versionedobjects, 32 | oslotest, 33 | osprofiler, 34 | ovs, 35 | ovsdbapp, 36 | python-designateclient, 37 | python-neutronclient, 38 | python-novaclient, 39 | python3Packages, 40 | tooz, 41 | writeScript, 42 | }: 43 | let 44 | inherit (python3Packages) 45 | coverage 46 | ddt 47 | debtcollector 48 | decorator 49 | eventlet 50 | fixtures 51 | hacking 52 | httplib2 53 | jinja2 54 | netaddr 55 | paste 56 | pastedeploy 57 | pbr 58 | pecan 59 | psutil 60 | pymysql 61 | python-memcached 62 | pyopenssl 63 | pyroute2 64 | python-subunit 65 | requests 66 | routes 67 | sqlalchemy 68 | stestr 69 | tenacity 70 | testresources 71 | testscenarios 72 | testtools 73 | webob 74 | webtest 75 | ; 76 | 77 | excludeList = [ 78 | "test__dhcp_ready_ports_loop" 79 | "test_create_agent" 80 | "test_create_subnet_bad_pools" 81 | "test_dhcp_ready_ports_loop_with_limit_ports_per_call" 82 | "test_disable_check_process_id_env_var" 83 | "test_enable_check_process_id_env_var" 84 | "test_flavors" 85 | "test_network_create_end" 86 | "test_network_delete_end" 87 | "test_network_update_end_admin_state_down" 88 | "test_network_update_end_admin_state_up" 89 | "test_port_create_duplicate_ip_on_dhcp_agents_same_network" 90 | "test_port_create_end" 91 | "test_port_create_end_no_resync_if_same_port_already_in_cache" 92 | "test_port_delete_end" 93 | "test_port_delete_end_agents_port" 94 | "test_port_delete_end_no_network_id" 95 | "test_port_delete_end_unknown_port" 96 | "test_port_delete_network_already_deleted" 97 | "test_port_update_change_ip_on_dhcp_agents_port" 98 | "test_port_update_change_ip_on_dhcp_agents_port_cache_miss" 99 | "test_port_update_change_ip_on_port" 100 | "test_port_update_change_subnet_on_dhcp_agents_port" 101 | "test_port_update_end" 102 | "test_port_update_on_dhcp_agents_port_no_ip_change" 103 | "test_remote_sg_removed" 104 | "test_sg_removed" 105 | "test_subnet_create_end" 106 | "test_subnet_delete_end_no_network_id" 107 | "test_subnet_update_dhcp" 108 | "test_subnet_update_end" 109 | "test_subnet_update_end_delete_payload" 110 | "test_subnet_update_end_restart" 111 | "test_sync" 112 | "test_sync_state_disabled_net" 113 | "test_sync_state_for_all_networks_plugin_error" 114 | "test_sync_state_for_one_network_plugin_error" 115 | "test_sync_state_initial" 116 | "test_sync_state_same" 117 | "test_sync_state_waitall" 118 | "test_sync_teardown_namespace" 119 | "test_sync_teardown_namespace_does_not_crash_on_error" 120 | "test_update_subnet_allocation_pools_invalid_returns_400" 121 | ]; 122 | 123 | excludeListFile = writeScript "testExcludes" (lib.concatStringsSep "\n" excludeList); 124 | 125 | in 126 | python3Packages.buildPythonPackage rec { 127 | pname = "neutron"; 128 | version = "25.1.0"; 129 | 130 | nativeBuildInputs = [ 131 | pbr 132 | ]; 133 | 134 | propagatedBuildInputs = [ 135 | debtcollector 136 | decorator 137 | eventlet 138 | futurist 139 | httplib2 140 | jinja2 141 | keystoneauth1 142 | keystonemiddleware 143 | netaddr 144 | neutron-lib 145 | openstacksdk 146 | os-ken 147 | os-resource-classes 148 | os-vif 149 | oslo-cache 150 | oslo-concurrency 151 | oslo-config 152 | oslo-context 153 | oslo-db 154 | oslo-i18n 155 | oslo-log 156 | oslo-messaging 157 | oslo-middleware 158 | oslo-policy 159 | oslo-privsep 160 | oslo-reports 161 | oslo-rootwrap 162 | oslo-serialization 163 | oslo-service 164 | oslo-upgradecheck 165 | oslo-utils 166 | oslo-versionedobjects 167 | osprofiler 168 | ovs 169 | ovsdbapp 170 | paste 171 | pastedeploy 172 | pecan 173 | psutil 174 | pymysql 175 | pyopenssl 176 | pyroute2 177 | python-designateclient 178 | python-memcached 179 | python-neutronclient 180 | python-novaclient 181 | requests 182 | routes 183 | sqlalchemy 184 | tenacity 185 | tooz 186 | webob 187 | ]; 188 | 189 | nativeCheckInputs = [ 190 | iproute2 191 | stestr 192 | ]; 193 | 194 | checkInputs = [ 195 | coverage 196 | ddt 197 | doc8 198 | fixtures 199 | hacking 200 | oslotest 201 | pymysql 202 | python-subunit 203 | testresources 204 | testscenarios 205 | testtools 206 | webtest 207 | ]; 208 | 209 | checkPhase = '' 210 | stestr run --exclude-list ${excludeListFile} 211 | ''; 212 | 213 | src = fetchPypi { 214 | inherit pname version; 215 | sha256 = "sha256-dOqLLiSTqjldioKUzY4HgbCKNyyDX1bu2huoBs297zE="; 216 | }; 217 | } 218 | -------------------------------------------------------------------------------- /packages/nova.nix: -------------------------------------------------------------------------------- 1 | { 2 | castellan, 3 | cursive, 4 | fetchPypi, 5 | futurist, 6 | gabbi, 7 | keystoneauth1, 8 | keystonemiddleware, 9 | lib, 10 | microversion-parse, 11 | openssl, 12 | openstacksdk, 13 | os-brick, 14 | os-resource-classes, 15 | os-traits, 16 | os-vif, 17 | oslo-cache, 18 | oslo-concurrency, 19 | oslo-config, 20 | oslo-context, 21 | oslo-db, 22 | oslo-i18n, 23 | oslo-limit, 24 | oslo-log, 25 | oslo-messaging, 26 | oslo-middleware, 27 | oslo-policy, 28 | oslo-privsep, 29 | oslo-reports, 30 | oslo-rootwrap, 31 | oslo-serialization, 32 | oslo-service, 33 | oslo-upgradecheck, 34 | oslo-utils, 35 | oslo-versionedobjects, 36 | oslotest, 37 | osprofiler, 38 | python-barbicanclient, 39 | python-cinderclient, 40 | python-glanceclient, 41 | python-neutronclient, 42 | python3Packages, 43 | tooz, 44 | writeScript, 45 | }: 46 | let 47 | inherit (python3Packages) 48 | alembic 49 | bandit 50 | coverage 51 | cryptography 52 | ddt 53 | decorator 54 | eventlet 55 | fixtures 56 | greenlet 57 | hacking 58 | iso8601 59 | jinja2 60 | jsonschema 61 | libvirt 62 | lxml 63 | netaddr 64 | netifaces 65 | os-service-types 66 | paramiko 67 | paste 68 | pastedeploy 69 | pbr 70 | prettytable 71 | psutil 72 | psycopg2 73 | pymysql 74 | python-dateutil 75 | python-memcached 76 | pyyaml 77 | requests 78 | requests-mock 79 | retrying 80 | rfc3986 81 | routes 82 | sqlalchemy 83 | stestr 84 | stevedore 85 | testresources 86 | testscenarios 87 | testtools 88 | webob 89 | websockify 90 | wsgi-intercept 91 | ; 92 | 93 | testExcludes = [ 94 | "test_inject_admin_password" 95 | "test_server_pool_waitall" 96 | "test_validation_errors_19_traits_multiple_additional_traits_two_invalid" 97 | ]; 98 | 99 | excludeListFile = writeScript "test_excludes" (lib.concatStringsSep "\n" testExcludes); 100 | in 101 | python3Packages.buildPythonPackage (rec { 102 | pname = "nova"; 103 | version = "30.0.0"; 104 | pyproject = true; 105 | 106 | nativeBuildInputs = [ 107 | pbr 108 | ]; 109 | 110 | propagatedBuildInputs = [ 111 | alembic 112 | castellan 113 | cryptography 114 | cursive 115 | decorator 116 | eventlet 117 | futurist 118 | greenlet 119 | iso8601 120 | jinja2 121 | jsonschema 122 | keystoneauth1 123 | keystonemiddleware 124 | libvirt 125 | lxml 126 | microversion-parse 127 | netaddr 128 | netifaces 129 | openstacksdk 130 | os-brick 131 | os-resource-classes 132 | os-service-types 133 | os-traits 134 | os-vif 135 | oslo-cache 136 | oslo-concurrency 137 | oslo-config 138 | oslo-context 139 | oslo-db 140 | oslo-i18n 141 | oslo-limit 142 | oslo-log 143 | oslo-messaging 144 | oslo-middleware 145 | oslo-policy 146 | oslo-privsep 147 | oslo-reports 148 | oslo-rootwrap 149 | oslo-serialization 150 | oslo-service 151 | oslo-upgradecheck 152 | oslo-utils 153 | oslo-versionedobjects 154 | paramiko 155 | paste 156 | pastedeploy 157 | prettytable 158 | psutil 159 | pymysql 160 | python-barbicanclient 161 | python-cinderclient 162 | python-dateutil 163 | python-glanceclient 164 | python-memcached 165 | python-neutronclient 166 | pyyaml 167 | requests 168 | retrying 169 | rfc3986 170 | routes 171 | sqlalchemy 172 | stevedore 173 | tooz 174 | webob 175 | websockify 176 | ]; 177 | 178 | nativeCheckInputs = [ 179 | openssl 180 | stestr 181 | ]; 182 | 183 | checkInputs = [ 184 | bandit 185 | coverage 186 | ddt 187 | fixtures 188 | gabbi 189 | hacking 190 | oslotest 191 | osprofiler 192 | psycopg2 193 | requests-mock 194 | testresources 195 | testscenarios 196 | testtools 197 | wsgi-intercept 198 | ]; 199 | 200 | checkPhase = '' 201 | substituteInPlace nova/tests/unit/test_api_validation.py --replace-fail "''' is too short" "''' should be non-empty" 202 | substituteInPlace nova/tests/unit/api/openstack/compute/test_keypairs.py --replace-fail "is too short" "should be non-empty" 203 | substituteInPlace nova/tests/unit/api/openstack/compute/test_servers.py --replace-fail "is too short" "should be non-empty" 204 | substituteInPlace nova/tests/unit/compute/provider_config_data/v1/validation_error_test_data.yaml --replace-fail "''' is too short" "''' should be non-empty" 205 | stestr run --exclude-list ${excludeListFile} 206 | ''; 207 | 208 | src = fetchPypi { 209 | inherit pname version; 210 | sha256 = "sha256-CvxHrKGalX/9FMFVX14Bm47sjgqQNgfVX6Odf2IMgqQ="; 211 | }; 212 | }) 213 | -------------------------------------------------------------------------------- /packages/openstack-placement.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | keystonemiddleware, 4 | microversion-parse, 5 | os-resource-classes, 6 | os-traits, 7 | oslo-concurrency, 8 | oslo-config, 9 | oslo-context, 10 | oslo-db, 11 | oslo-log, 12 | oslo-middleware, 13 | oslo-serialization, 14 | oslo-upgradecheck, 15 | oslo-utils, 16 | oslotest, 17 | python3Packages, 18 | }: 19 | let 20 | inherit (python3Packages) 21 | jsonschema 22 | pbr 23 | pymysql 24 | routes 25 | sqlalchemy 26 | stestr 27 | ; 28 | in 29 | python3Packages.buildPythonPackage (rec { 30 | pname = "openstack-placement"; 31 | version = "12.0.0"; 32 | pyproject = true; 33 | 34 | nativeBuildInputs = [ 35 | pbr 36 | ]; 37 | 38 | propagatedBuildInputs = [ 39 | jsonschema 40 | keystonemiddleware 41 | microversion-parse 42 | os-resource-classes 43 | os-traits 44 | oslo-concurrency 45 | oslo-config 46 | oslo-context 47 | oslo-db 48 | oslo-log 49 | oslo-middleware 50 | oslo-serialization 51 | oslo-upgradecheck 52 | oslo-utils 53 | pymysql 54 | routes 55 | sqlalchemy 56 | ]; 57 | 58 | nativeCheckInputs = [ 59 | stestr 60 | ]; 61 | 62 | checkInputs = [ 63 | oslotest 64 | ]; 65 | 66 | checkPhase = '' 67 | substituteInPlace placement/tests/unit/cmd/test_manage.py --replace-fail "choose from 'db'" "choose from db" 68 | stestr run 69 | ''; 70 | 71 | src = fetchPypi { 72 | inherit pname version; 73 | sha256 = "sha256-DCA7PMCnVKKq6ckdx+6n11jZuNG5LY4BySRXWqWF7qo="; 74 | }; 75 | }) 76 | -------------------------------------------------------------------------------- /packages/os-brick.nix: -------------------------------------------------------------------------------- 1 | { 2 | castellan, 3 | doc8, 4 | fetchPypi, 5 | flake8-logging-format, 6 | os-win, 7 | oslo-concurrency, 8 | oslo-config, 9 | oslo-context, 10 | oslo-i18n, 11 | oslo-log, 12 | oslo-privsep, 13 | oslo-serialization, 14 | oslo-service, 15 | oslo-utils, 16 | oslo-vmware, 17 | oslotest, 18 | python3Packages, 19 | }: 20 | let 21 | inherit (python3Packages) 22 | bandit 23 | coverage 24 | ddt 25 | eventlet 26 | fixtures 27 | flake8-import-order 28 | hacking 29 | mypy 30 | pbr 31 | psutil 32 | requests 33 | stestr 34 | tenacity 35 | testscenarios 36 | testtools 37 | ; 38 | in 39 | python3Packages.buildPythonPackage rec { 40 | pname = "os-brick"; 41 | version = "6.9.0"; 42 | 43 | nativeBuildInputs = [ 44 | pbr 45 | ]; 46 | 47 | propagatedBuildInputs = [ 48 | os-win 49 | oslo-concurrency 50 | oslo-config 51 | oslo-context 52 | oslo-i18n 53 | oslo-log 54 | oslo-privsep 55 | oslo-serialization 56 | oslo-service 57 | oslo-utils 58 | psutil 59 | requests 60 | tenacity 61 | ]; 62 | 63 | nativeCheckInputs = [ 64 | stestr 65 | ]; 66 | 67 | checkInputs = [ 68 | bandit 69 | castellan 70 | coverage 71 | ddt 72 | doc8 73 | eventlet 74 | fixtures 75 | flake8-import-order 76 | flake8-logging-format 77 | hacking 78 | mypy 79 | oslo-vmware 80 | oslotest 81 | testscenarios 82 | testtools 83 | ]; 84 | 85 | checkPhase = '' 86 | stestr run 87 | ''; 88 | 89 | src = fetchPypi { 90 | inherit pname version; 91 | sha256 = "sha256-lk7Me3wkkmpbbwkjhqLuO97mg+KU17kZDMlR1xFfGV8="; 92 | }; 93 | } 94 | -------------------------------------------------------------------------------- /packages/os-client-config.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | openstacksdk, 4 | oslotest, 5 | python-glanceclient, 6 | python3Packages, 7 | }: 8 | let 9 | inherit (python3Packages) 10 | stestr 11 | hacking 12 | coverage 13 | fixtures 14 | jsonschema 15 | python-subunit 16 | testtools 17 | testscenarios 18 | ; 19 | in 20 | python3Packages.buildPythonPackage rec { 21 | pname = "os-client-config"; 22 | version = "2.1.0"; 23 | 24 | propagatedBuildInputs = [ 25 | openstacksdk 26 | ]; 27 | 28 | nativeCheckInputs = [ 29 | stestr 30 | ]; 31 | 32 | checkInputs = [ 33 | coverage 34 | fixtures 35 | hacking 36 | jsonschema 37 | oslotest 38 | python-glanceclient 39 | python-subunit 40 | testscenarios 41 | testtools 42 | ]; 43 | 44 | checkPhase = '' 45 | stestr run 46 | ''; 47 | 48 | src = fetchPypi { 49 | inherit pname version; 50 | sha256 = "sha256-q8OKNR+MAG009+5fP2SN5ePs9kVcxdds/YidKRzfP04="; 51 | }; 52 | } 53 | -------------------------------------------------------------------------------- /packages/os-ken.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-config, 4 | oslotest, 5 | ovs, 6 | python3Packages, 7 | }: 8 | let 9 | inherit (python3Packages) 10 | coverage 11 | eventlet 12 | hacking 13 | msgpack 14 | ncclient 15 | netaddr 16 | packaging 17 | pbr 18 | pycodestyle 19 | pylint 20 | python-subunit 21 | routes 22 | stestr 23 | testscenarios 24 | testtools 25 | webob 26 | ; 27 | in 28 | python3Packages.buildPythonPackage rec { 29 | pname = "os-ken"; 30 | version = "2.11.2"; 31 | 32 | nativeBuildInputs = [ 33 | pbr 34 | ]; 35 | 36 | propagatedBuildInputs = [ 37 | eventlet 38 | msgpack 39 | ncclient 40 | netaddr 41 | oslo-config 42 | ovs 43 | packaging 44 | routes 45 | webob 46 | ]; 47 | 48 | nativeCheckInputs = [ 49 | stestr 50 | ]; 51 | 52 | checkInputs = [ 53 | coverage 54 | hacking 55 | oslotest 56 | pycodestyle 57 | pylint 58 | python-subunit 59 | testscenarios 60 | testtools 61 | ]; 62 | 63 | checkPhase = '' 64 | stestr run 65 | ''; 66 | 67 | src = fetchPypi { 68 | inherit pname version; 69 | sha256 = "sha256-zGB2+83OVCbNBElOHgViZ4SCXl/exLp1eVroDeEkIyA="; 70 | }; 71 | } 72 | -------------------------------------------------------------------------------- /packages/os-resource-classes.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslotest, 4 | python3Packages, 5 | }: 6 | let 7 | inherit (python3Packages) 8 | coverage 9 | hacking 10 | pbr 11 | stestr 12 | testtools 13 | ; 14 | in 15 | python3Packages.buildPythonPackage rec { 16 | pname = "os-resource-classes"; 17 | version = "1.1.0"; 18 | 19 | nativeBuildInputs = [ 20 | pbr 21 | ]; 22 | 23 | nativeCheckInputs = [ 24 | stestr 25 | ]; 26 | 27 | checkInputs = [ 28 | coverage 29 | hacking 30 | oslotest 31 | testtools 32 | ]; 33 | 34 | checkPhase = '' 35 | stestr run 36 | ''; 37 | 38 | src = fetchPypi { 39 | inherit pname version; 40 | sha256 = "sha256-4Ly7iWGp/jO3ITc0xRwAGBKJDivmIQHJJ5yIty91+es="; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /packages/os-traits.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslotest, 4 | python3Packages, 5 | }: 6 | let 7 | inherit (python3Packages) 8 | coverage 9 | hacking 10 | pbr 11 | stestr 12 | testscenarios 13 | testtools 14 | ; 15 | in 16 | python3Packages.buildPythonPackage rec { 17 | pname = "os-traits"; 18 | version = "3.2.0"; 19 | 20 | nativeBuildInputs = [ 21 | pbr 22 | ]; 23 | 24 | nativeCheckInputs = [ 25 | stestr 26 | ]; 27 | 28 | checkInputs = [ 29 | coverage 30 | hacking 31 | oslotest 32 | testscenarios 33 | testtools 34 | ]; 35 | 36 | checkPhase = '' 37 | stestr run 38 | ''; 39 | 40 | src = fetchPypi { 41 | inherit pname version; 42 | sha256 = "sha256-NVr3coxNz8Ws4N2DVEX94r928pk7DGyxy7S/c4mDABU="; 43 | }; 44 | } 45 | -------------------------------------------------------------------------------- /packages/os-vif.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | lib, 4 | oslo-concurrency, 5 | oslo-config, 6 | oslo-i18n, 7 | oslo-log, 8 | oslo-privsep, 9 | oslo-serialization, 10 | oslo-utils, 11 | oslo-versionedobjects, 12 | oslotest, 13 | ovs, 14 | ovsdbapp, 15 | python3Packages, 16 | writeScript, 17 | }: 18 | let 19 | inherit (python3Packages) 20 | coverage 21 | debtcollector 22 | netifaces 23 | pbr 24 | pyroute2 25 | stevedore 26 | stestr 27 | testscenarios 28 | ; 29 | 30 | testExcludes = [ 31 | "TestIpCommand" 32 | "test__set_mtu_request" 33 | "test_create_ovs_vif_port" 34 | "test_create_ovs_vif_port_with_default_qos" 35 | "test_create_patch_port_pair" 36 | "test_delete_ovs_vif_port" 37 | "test_delete_qos_if_exists" 38 | "test_ensure_ovs_bridge" 39 | "test_get_qos" 40 | "test_plug_unplug_ovs_port_with_qos" 41 | "test_plug_unplug_ovs_vhostuser_trunk" 42 | "test_port_exists" 43 | "test_set_mtu" 44 | ]; 45 | excludeListFile = writeScript "test_excludes" (lib.concatStringsSep "\n" testExcludes); 46 | in 47 | python3Packages.buildPythonPackage rec { 48 | pname = "os_vif"; 49 | version = "3.5.0"; 50 | 51 | nativeBuildInputs = [ 52 | pbr 53 | ]; 54 | 55 | propagatedBuildInputs = [ 56 | debtcollector 57 | netifaces 58 | ovsdbapp 59 | oslo-concurrency 60 | oslo-config 61 | oslo-i18n 62 | oslo-log 63 | oslo-privsep 64 | oslo-serialization 65 | oslo-utils 66 | oslo-versionedobjects 67 | pyroute2 68 | stevedore 69 | ]; 70 | 71 | nativeCheckInputs = [ 72 | stestr 73 | ]; 74 | 75 | checkInputs = [ 76 | coverage 77 | oslotest 78 | ovs 79 | testscenarios 80 | ]; 81 | 82 | installCheckPhase = '' 83 | substituteInPlace os_vif/internal/__init__.py --replace-fail "raise exception.ExternalImport()" "pass" 84 | stestr run --exclude-list ${excludeListFile} 85 | ''; 86 | 87 | src = fetchPypi { 88 | inherit pname version; 89 | sha256 = "sha256-14o08f5grIc3IDWs3ySRFmKrEH/SyxWsNAjM4i9yUqo="; 90 | }; 91 | } 92 | -------------------------------------------------------------------------------- /packages/os-win.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-concurrency, 4 | oslo-config, 5 | oslo-log, 6 | oslo-utils, 7 | oslo-i18n, 8 | oslotest, 9 | python3Packages, 10 | }: 11 | let 12 | inherit (python3Packages) 13 | coverage 14 | ddt 15 | eventlet 16 | hacking 17 | pbr 18 | python-dateutil 19 | pythonRelaxDepsHook 20 | stestr 21 | testscenarios 22 | testtools 23 | ; 24 | in 25 | python3Packages.buildPythonPackage rec { 26 | pname = "os-win"; 27 | version = "5.9.0"; 28 | 29 | nativeBuildInputs = [ 30 | pbr 31 | pythonRelaxDepsHook 32 | ]; 33 | 34 | pythonRelaxDeps = [ "hacking" ]; 35 | 36 | propagatedBuildInputs = [ 37 | eventlet 38 | oslo-concurrency 39 | oslo-config 40 | oslo-i18n 41 | oslo-log 42 | oslo-utils 43 | python-dateutil 44 | ]; 45 | 46 | nativeCheckInputs = [ 47 | stestr 48 | ]; 49 | 50 | checkInputs = [ 51 | coverage 52 | ddt 53 | hacking 54 | oslotest 55 | testscenarios 56 | testtools 57 | ]; 58 | 59 | checkPhase = '' 60 | stestr run 61 | ''; 62 | 63 | src = fetchPypi { 64 | inherit pname version; 65 | sha256 = "sha256-TUrVEiBgzdExLWkJkhxygMcVn6aBGpZvoRaI/BQYCMA="; 66 | }; 67 | } 68 | -------------------------------------------------------------------------------- /packages/osc-placement.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | keystoneauth1, 4 | osc-lib, 5 | oslo-utils, 6 | oslo-serialization, 7 | oslotest, 8 | python3Packages, 9 | }: 10 | let 11 | inherit (python3Packages) 12 | pbr 13 | stestr 14 | ; 15 | in 16 | python3Packages.buildPythonPackage (rec { 17 | pname = "osc-placement"; 18 | version = "4.5.0"; 19 | pyproject = true; 20 | 21 | nativeBuildInputs = [ 22 | pbr 23 | ]; 24 | 25 | propagatedBuildInputs = [ 26 | keystoneauth1 27 | osc-lib 28 | oslo-serialization 29 | oslo-utils 30 | ]; 31 | 32 | nativeCheckInputs = [ 33 | stestr 34 | ]; 35 | 36 | checkInputs = [ 37 | oslotest 38 | ]; 39 | 40 | checkPhase = '' 41 | stestr run 42 | ''; 43 | 44 | src = fetchPypi { 45 | inherit pname version; 46 | sha256 = "sha256-gx1nQZ0e//um9XzSKKn9sWknVkfkqVN+snVmJla3zY8="; 47 | }; 48 | }) 49 | -------------------------------------------------------------------------------- /packages/oslo-cache.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | memcached, 4 | oslo-config, 5 | oslo-i18n, 6 | oslo-log, 7 | oslo-utils, 8 | oslotest, 9 | pifpaf, 10 | python-binary-memcached, 11 | python3Packages, 12 | }: 13 | let 14 | inherit (python3Packages) 15 | dogpile-cache 16 | etcd3 17 | pymemcache 18 | pymongo 19 | python-dateutil 20 | python-memcached 21 | redis 22 | stestr 23 | ; 24 | in 25 | python3Packages.buildPythonPackage rec { 26 | pname = "oslo.cache"; 27 | version = "3.9.0"; 28 | 29 | propagatedBuildInputs = [ 30 | dogpile-cache 31 | oslo-config 32 | oslo-i18n 33 | oslo-log 34 | oslo-utils 35 | python-dateutil 36 | ]; 37 | 38 | nativeCheckInputs = [ 39 | stestr 40 | ]; 41 | 42 | checkInputs = [ 43 | etcd3 44 | memcached 45 | oslotest 46 | pifpaf 47 | pymemcache 48 | pymongo 49 | python-binary-memcached 50 | python-memcached 51 | redis 52 | ]; 53 | 54 | checkPhase = '' 55 | stestr run 56 | ''; 57 | 58 | src = fetchPypi { 59 | inherit pname version; 60 | sha256 = "sha256-wvsufWTMFmIroWUoiw97J/eK8ClM8z6IPHzc7FFdQIs="; 61 | }; 62 | } 63 | -------------------------------------------------------------------------------- /packages/oslo-concurrency.nix: -------------------------------------------------------------------------------- 1 | { 2 | bash, 3 | coreutils, 4 | fetchPypi, 5 | oslo-config, 6 | oslo-i18n, 7 | oslo-utils, 8 | oslotest, 9 | python3Packages, 10 | }: 11 | let 12 | inherit (python3Packages) 13 | coverage 14 | eventlet 15 | fixtures 16 | pbr 17 | fasteners 18 | stestr 19 | ; 20 | in 21 | python3Packages.buildPythonPackage rec { 22 | pname = "oslo.concurrency"; 23 | version = "6.0.0"; 24 | 25 | postPatch = '' 26 | substituteInPlace oslo_concurrency/tests/unit/test_processutils.py --replace-fail "/usr/bin/env" "${coreutils}/bin/env" 27 | substituteInPlace oslo_concurrency/tests/unit/test_processutils.py --replace-fail "/bin/bash" "${bash}/bin/bash" 28 | substituteInPlace oslo_concurrency/tests/unit/test_processutils.py --replace-fail "/bin/true" "${coreutils}/bin/true" 29 | ''; 30 | 31 | nativeBuildInputs = [ 32 | coreutils 33 | pbr 34 | ]; 35 | 36 | propagatedBuildInputs = [ 37 | fasteners 38 | oslo-config 39 | oslo-i18n 40 | oslo-utils 41 | ]; 42 | 43 | nativeCheckInputs = [ 44 | stestr 45 | ]; 46 | 47 | checkInputs = [ 48 | coverage 49 | eventlet 50 | fixtures 51 | oslotest 52 | ]; 53 | 54 | checkPhase = '' 55 | stestr run --exclude-regex ".*lock_with.*" 56 | ''; 57 | 58 | src = fetchPypi { 59 | inherit pname version; 60 | sha256 = "sha256-tS8CtORvXydLkfuOG/xcv5pBjfzUqDvggDRUlePSboo="; 61 | }; 62 | } 63 | -------------------------------------------------------------------------------- /packages/oslo-config.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-i18n, 4 | python3Packages, 5 | }: 6 | let 7 | inherit (python3Packages) 8 | debtcollector 9 | netaddr 10 | pbr 11 | pyyaml 12 | requests 13 | rfc3986 14 | stevedore 15 | ; 16 | in 17 | python3Packages.buildPythonPackage rec { 18 | pname = "oslo.config"; 19 | version = "9.7.0"; 20 | 21 | nativeBuildInputs = [ 22 | pbr 23 | ]; 24 | 25 | propagatedBuildInputs = [ 26 | debtcollector 27 | netaddr 28 | oslo-i18n 29 | pyyaml 30 | requests 31 | rfc3986 32 | stevedore 33 | ]; 34 | 35 | # we cannot enable the check phase, because we get a circular dependency on oslo.log 36 | doCheck = false; 37 | 38 | src = fetchPypi { 39 | inherit pname version; 40 | sha256 = "sha256-s3Hr8/mmPpK4HVxyuE0vlvQFU1MmmcaOHFzYyp7KCIs="; 41 | }; 42 | } 43 | -------------------------------------------------------------------------------- /packages/oslo-context.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | python3Packages, 4 | oslotest, 5 | pre-commit, 6 | }: 7 | let 8 | inherit (python3Packages) 9 | bandit 10 | coverage 11 | debtcollector 12 | fixtures 13 | hacking 14 | mypy 15 | pbr 16 | stestr 17 | ; 18 | 19 | in 20 | python3Packages.buildPythonPackage rec { 21 | pname = "oslo.context"; 22 | version = "5.7.0"; 23 | 24 | nativeBuildInputs = [ 25 | pbr 26 | ]; 27 | 28 | propagatedBuildInputs = [ 29 | debtcollector 30 | ]; 31 | 32 | nativeCheckInputs = [ 33 | stestr 34 | ]; 35 | 36 | checkInputs = [ 37 | bandit 38 | coverage 39 | fixtures 40 | hacking 41 | mypy 42 | oslotest 43 | pre-commit 44 | ]; 45 | 46 | checkPhase = '' 47 | stestr run . 48 | ''; 49 | 50 | src = fetchPypi { 51 | inherit pname version; 52 | sha256 = "sha256-OYxGC5z3yzl+3nliIj5LiAePsvvFNmWkejThsoiQ9M4="; 53 | }; 54 | } 55 | -------------------------------------------------------------------------------- /packages/oslo-db.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-config, 4 | oslo-context, 5 | oslo-i18n, 6 | oslo-utils, 7 | oslotest, 8 | pifpaf, 9 | pre-commit, 10 | python3Packages, 11 | }: 12 | let 13 | inherit (python3Packages) 14 | alembic 15 | bandit 16 | coverage 17 | debtcollector 18 | eventlet 19 | fixtures 20 | hacking 21 | psycopg2 22 | pymysql 23 | python-subunit 24 | sqlalchemy 25 | stestr 26 | stevedore 27 | testresources 28 | testscenarios 29 | testtools 30 | ; 31 | in 32 | python3Packages.buildPythonPackage rec { 33 | pname = "oslo.db"; 34 | version = "17.0.0"; 35 | 36 | propagatedBuildInputs = [ 37 | alembic 38 | debtcollector 39 | oslo-config 40 | oslo-i18n 41 | oslo-utils 42 | sqlalchemy 43 | stevedore 44 | ]; 45 | 46 | nativeCheckInputs = [ 47 | stestr 48 | ]; 49 | 50 | checkInputs = [ 51 | bandit 52 | coverage 53 | eventlet 54 | fixtures 55 | hacking 56 | oslo-context 57 | oslotest 58 | pifpaf 59 | pre-commit 60 | psycopg2 61 | pymysql 62 | python-subunit 63 | testresources 64 | testscenarios 65 | testtools 66 | ]; 67 | 68 | checkPhase = '' 69 | stestr run 70 | ''; 71 | 72 | src = fetchPypi { 73 | inherit pname version; 74 | sha256 = "sha256-nPG6nkO0u73nmUZBr20GxF9xEqfhR28U3QsnuajrEH0="; 75 | }; 76 | } 77 | -------------------------------------------------------------------------------- /packages/oslo-i18n.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | let 3 | inherit (python3Packages) 4 | pbr 5 | setuptools 6 | ; 7 | 8 | in 9 | python3Packages.buildPythonPackage rec { 10 | pname = "oslo.i18n"; 11 | version = "6.5.0"; 12 | pyproject = true; 13 | nativeBuildInputs = [ 14 | pbr 15 | setuptools 16 | ]; 17 | 18 | # We explicitly disable testing to avoid circular dependencies with oslo-config 19 | doCheck = false; 20 | 21 | src = fetchPypi { 22 | inherit pname version; 23 | sha256 = "sha256-k5O8rpLq3F93ETLRxqsjmxmJb/bYheOvwhqfqk3pJNM="; 24 | }; 25 | } 26 | -------------------------------------------------------------------------------- /packages/oslo-limit.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | keystoneauth1, 4 | openstacksdk, 5 | oslo-config, 6 | oslo-i18n, 7 | oslo-log, 8 | oslotest, 9 | python3Packages, 10 | }: 11 | let 12 | inherit (python3Packages) 13 | coverage 14 | fixtures 15 | python-dateutil 16 | stestr 17 | ; 18 | in 19 | python3Packages.buildPythonPackage rec { 20 | pname = "oslo.limit"; 21 | version = "2.6.0"; 22 | 23 | propagatedBuildInputs = [ 24 | keystoneauth1 25 | openstacksdk 26 | oslo-config 27 | oslo-i18n 28 | oslo-log 29 | python-dateutil 30 | ]; 31 | 32 | nativeCheckInputs = [ 33 | stestr 34 | ]; 35 | 36 | checkInputs = [ 37 | coverage 38 | fixtures 39 | oslotest 40 | ]; 41 | 42 | checkPhase = '' 43 | stestr run 44 | ''; 45 | 46 | src = fetchPypi { 47 | inherit pname version; 48 | sha256 = "sha256-wSXJSLzUjIPi2unTLn0X4XotK0NI3Q6i1FCXc3hzoXo="; 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /packages/oslo-log.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-config, 4 | oslo-context, 5 | oslo-i18n, 6 | oslo-serialization, 7 | oslo-utils, 8 | oslotest, 9 | python3Packages, 10 | }: 11 | let 12 | inherit (python3Packages) 13 | coverage 14 | eventlet 15 | fixtures 16 | pbr 17 | python-dateutil 18 | stestr 19 | testtools 20 | ; 21 | in 22 | python3Packages.buildPythonPackage rec { 23 | pname = "oslo.log"; 24 | version = "6.2.0"; 25 | 26 | nativeBuildInputs = [ 27 | pbr 28 | python-dateutil 29 | ]; 30 | 31 | propagatedBuildInputs = [ 32 | oslo-config 33 | oslo-context 34 | oslo-i18n 35 | oslo-serialization 36 | oslo-utils 37 | ]; 38 | 39 | nativeCheckInputs = [ 40 | stestr 41 | ]; 42 | 43 | checkInputs = [ 44 | coverage 45 | eventlet 46 | fixtures 47 | oslotest 48 | testtools 49 | ]; 50 | 51 | checkPhase = '' 52 | stestr run 53 | ''; 54 | 55 | src = fetchPypi { 56 | inherit pname version; 57 | sha256 = "sha256-KxUdnD8rLswSwG0Pt9vy6QR6/a7DZEgn+h4Qs1Q2lWM="; 58 | }; 59 | } 60 | -------------------------------------------------------------------------------- /packages/oslo-messaging.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | futurist, 4 | oslo-config, 5 | oslo-context, 6 | oslo-log, 7 | oslo-metrics, 8 | oslo-middleware, 9 | oslo-serialization, 10 | oslo-service, 11 | oslo-utils, 12 | oslotest, 13 | pifpaf, 14 | python3Packages, 15 | }: 16 | let 17 | inherit (python3Packages) 18 | amqp 19 | cachetools 20 | confluent-kafka 21 | coverage 22 | debtcollector 23 | eventlet 24 | fixtures 25 | greenlet 26 | kombu 27 | packaging 28 | pbr 29 | pyyaml 30 | stestr 31 | stevedore 32 | testscenarios 33 | testtools 34 | webob 35 | ; 36 | in 37 | python3Packages.buildPythonPackage rec { 38 | pname = "oslo.messaging"; 39 | version = "15.0.0"; 40 | 41 | nativeBuildInputs = [ 42 | pbr 43 | ]; 44 | 45 | propagatedBuildInputs = [ 46 | amqp 47 | cachetools 48 | debtcollector 49 | futurist 50 | kombu 51 | oslo-config 52 | oslo-context 53 | oslo-log 54 | oslo-metrics 55 | oslo-middleware 56 | oslo-serialization 57 | oslo-service 58 | oslo-utils 59 | pyyaml 60 | stevedore 61 | webob 62 | ]; 63 | 64 | nativeCheckInputs = [ 65 | stestr 66 | ]; 67 | 68 | checkInputs = [ 69 | confluent-kafka 70 | coverage 71 | eventlet 72 | fixtures 73 | greenlet 74 | oslotest 75 | packaging 76 | pifpaf 77 | testscenarios 78 | testtools 79 | ]; 80 | 81 | checkPhase = '' 82 | stestr run 83 | ''; 84 | 85 | src = fetchPypi { 86 | inherit pname version; 87 | sha256 = "sha256-dgNbvVFtrYAcRg/63qd0OG2ur69TrsPc9kgjMiny0nE="; 88 | }; 89 | } 90 | -------------------------------------------------------------------------------- /packages/oslo-metrics.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-config, 4 | oslo-log, 5 | oslo-utils, 6 | oslotest, 7 | python3Packages, 8 | }: 9 | let 10 | inherit (python3Packages) 11 | bandit 12 | coverage 13 | hacking 14 | pbr 15 | prometheus-client 16 | python-dateutil 17 | stestr 18 | ; 19 | 20 | in 21 | python3Packages.buildPythonPackage rec { 22 | pname = "oslo.metrics"; 23 | version = "0.10.0"; 24 | 25 | nativeBuildInputs = [ 26 | pbr 27 | ]; 28 | 29 | propagatedBuildInputs = [ 30 | oslo-config 31 | oslo-log 32 | oslo-utils 33 | prometheus-client 34 | python-dateutil 35 | ]; 36 | 37 | nativeCheckInputs = [ 38 | stestr 39 | ]; 40 | 41 | checkInputs = [ 42 | bandit 43 | coverage 44 | hacking 45 | oslotest 46 | ]; 47 | 48 | checkPhase = '' 49 | stestr run 50 | ''; 51 | 52 | src = fetchPypi { 53 | inherit pname version; 54 | 55 | sha256 = "sha256-WoYQggznvmj1uFT1lqXERM/e+0hrhIEG5w46Q1jtoJE="; 56 | }; 57 | } 58 | -------------------------------------------------------------------------------- /packages/oslo-middleware.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-config, 4 | oslo-context, 5 | oslo-i18n, 6 | oslo-serialization, 7 | oslo-utils, 8 | oslotest, 9 | python3Packages, 10 | }: 11 | let 12 | inherit (python3Packages) 13 | bcrypt 14 | coverage 15 | debtcollector 16 | fixtures 17 | jinja2 18 | pbr 19 | statsd 20 | stestr 21 | stevedore 22 | testtools 23 | webob 24 | ; 25 | in 26 | python3Packages.buildPythonPackage rec { 27 | pname = "oslo.middleware"; 28 | version = "6.3.0"; 29 | 30 | nativeBuildInputs = [ 31 | pbr 32 | ]; 33 | 34 | propagatedBuildInputs = [ 35 | bcrypt 36 | debtcollector 37 | jinja2 38 | oslo-config 39 | oslo-context 40 | oslo-i18n 41 | oslo-utils 42 | statsd 43 | stevedore 44 | webob 45 | ]; 46 | 47 | nativeCheckInputs = [ 48 | stestr 49 | ]; 50 | 51 | checkInputs = [ 52 | coverage 53 | fixtures 54 | oslo-serialization 55 | oslotest 56 | testtools 57 | ]; 58 | 59 | checkPhase = '' 60 | stestr run 61 | ''; 62 | 63 | src = fetchPypi { 64 | inherit pname version; 65 | sha256 = "sha256-Z1kjqDhxVHIiy6HC48LPwzIF275uJVykdEht+7PCI3c="; 66 | }; 67 | } 68 | -------------------------------------------------------------------------------- /packages/oslo-policy.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-config, 4 | oslo-context, 5 | oslo-i18n, 6 | oslo-serialization, 7 | oslo-utils, 8 | oslotest, 9 | python3Packages, 10 | }: 11 | let 12 | inherit (python3Packages) 13 | coverage 14 | pyyaml 15 | requests 16 | requests-mock 17 | sphinx 18 | stestr 19 | stevedore 20 | ; 21 | in 22 | python3Packages.buildPythonPackage rec { 23 | pname = "oslo.policy"; 24 | version = "4.4.0"; 25 | 26 | propagatedBuildInputs = [ 27 | oslo-config 28 | oslo-context 29 | oslo-i18n 30 | oslo-serialization 31 | oslo-utils 32 | pyyaml 33 | requests 34 | stevedore 35 | ]; 36 | 37 | nativeCheckInputs = [ 38 | stestr 39 | ]; 40 | 41 | checkInputs = [ 42 | coverage 43 | oslotest 44 | requests-mock 45 | sphinx 46 | ]; 47 | 48 | checkPhase = '' 49 | stestr run 50 | ''; 51 | 52 | src = fetchPypi { 53 | inherit pname version; 54 | sha256 = "sha256-LV9QyLq8vLgOHuQLKv+3y0ZGUP37HZZUoU3fWxk2mcU="; 55 | }; 56 | } 57 | -------------------------------------------------------------------------------- /packages/oslo-privsep.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-log, 4 | oslo-i18n, 5 | oslo-concurrency, 6 | oslo-config, 7 | oslo-utils, 8 | oslotest, 9 | python3Packages, 10 | }: 11 | let 12 | inherit (python3Packages) 13 | cffi 14 | eventlet 15 | fixtures 16 | greenlet 17 | msgpack 18 | python-dateutil 19 | stestr 20 | ; 21 | in 22 | python3Packages.buildPythonPackage rec { 23 | pname = "oslo.privsep"; 24 | version = "3.5.0"; 25 | 26 | propagatedBuildInputs = [ 27 | cffi 28 | eventlet 29 | greenlet 30 | msgpack 31 | oslo-log 32 | oslo-i18n 33 | oslo-config 34 | oslo-concurrency 35 | oslo-utils 36 | python-dateutil 37 | ]; 38 | 39 | nativeCheckInputs = [ 40 | stestr 41 | ]; 42 | 43 | checkInputs = [ 44 | fixtures 45 | oslotest 46 | ]; 47 | 48 | checkPhase = '' 49 | stestr run 50 | ''; 51 | 52 | src = fetchPypi { 53 | inherit pname version; 54 | sha256 = "sha256-tC5Is/9guOpKrMTepEYVU1Lv5sGMuKXmUY81NksBflc="; 55 | }; 56 | } 57 | -------------------------------------------------------------------------------- /packages/oslo-reports.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-config, 4 | oslo-i18n, 5 | oslo-serialization, 6 | oslo-utils, 7 | oslotest, 8 | python3Packages, 9 | }: 10 | let 11 | inherit (python3Packages) 12 | coverage 13 | greenlet 14 | jinja2 15 | pbr 16 | psutil 17 | stestr 18 | ; 19 | in 20 | python3Packages.buildPythonPackage rec { 21 | pname = "oslo.reports"; 22 | version = "3.5.0"; 23 | 24 | nativeBuildInputs = [ 25 | pbr 26 | ]; 27 | 28 | propagatedBuildInputs = [ 29 | jinja2 30 | oslo-config 31 | oslo-i18n 32 | oslo-serialization 33 | oslo-utils 34 | psutil 35 | ]; 36 | 37 | nativeCheckInputs = [ 38 | stestr 39 | ]; 40 | 41 | checkInputs = [ 42 | coverage 43 | greenlet 44 | oslotest 45 | ]; 46 | 47 | checkPhase = '' 48 | stestr run 49 | ''; 50 | 51 | src = fetchPypi { 52 | inherit pname version; 53 | sha256 = "sha256-ypiItr4tfdX1f6oBsVsCiCJ0PWMooE51z6mzJ7JvpmY="; 54 | }; 55 | } 56 | -------------------------------------------------------------------------------- /packages/oslo-rootwrap.nix: -------------------------------------------------------------------------------- 1 | { 2 | bash, 3 | coreutils, 4 | dnsmasq, 5 | fetchPypi, 6 | lib, 7 | oslotest, 8 | python3Packages, 9 | writeScript, 10 | }: 11 | let 12 | inherit (python3Packages) 13 | eventlet 14 | fixtures 15 | stestr 16 | testtools 17 | ; 18 | 19 | testExcludes = [ 20 | "test_ChainingRegExpFilter_match" 21 | "test_ChainingRegExpFilter_multiple" 22 | "test_KillFilter" 23 | "test_ReadFileFilter" 24 | "test_exec_dirs_search" 25 | "test_match_filter_recurses_exec_command_filter_matches" 26 | "test_run_with_later_install_cmd" 27 | ]; 28 | 29 | testExcludeFile = writeScript "testExcludes" (lib.concatStringsSep "\n" testExcludes); 30 | in 31 | python3Packages.buildPythonPackage rec { 32 | pname = "oslo.rootwrap"; 33 | version = "7.4.0"; 34 | 35 | postPatch = '' 36 | substituteInPlace ./oslo_rootwrap/tests/test_functional.py --replace-fail "/bin/cat" "${coreutils}/bin/cat" 37 | substituteInPlace ./oslo_rootwrap/tests/test_functional.py --replace-fail "/bin/echo" "${coreutils}/bin/echo" 38 | substituteInPlace ./oslo_rootwrap/tests/test_functional.py --replace-fail "/bin/sh" "${bash}/bin/sh" 39 | substituteInPlace ./oslo_rootwrap/tests/test_rootwrap.py --replace-fail "/bin/cat" "${coreutils}/bin/cat" 40 | substituteInPlace ./oslo_rootwrap/tests/test_rootwrap.py --replace-fail "/bin/ls" "${coreutils}/bin/echo" 41 | substituteInPlace ./oslo_rootwrap/tests/test_rootwrap.py --replace-fail "/usr/bin/dnsmasq" "${dnsmasq}/bin/dnsmasq" 42 | ''; 43 | 44 | nativeCheckInputs = [ 45 | coreutils 46 | stestr 47 | ]; 48 | 49 | checkInputs = [ 50 | eventlet 51 | fixtures 52 | oslotest 53 | testtools 54 | ]; 55 | 56 | checkPhase = '' 57 | stestr run --exclude-list ${testExcludeFile} 58 | ''; 59 | 60 | src = fetchPypi { 61 | inherit pname version; 62 | sha256 = "sha256-RFD+eZykocXZ4daIddqJHQ5PjxTwiqJgrUMQSzOiv9g="; 63 | }; 64 | } 65 | -------------------------------------------------------------------------------- /packages/oslo-serialization.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-i18n, 4 | oslo-utils, 5 | oslotest, 6 | python3Packages, 7 | }: 8 | let 9 | inherit (python3Packages) 10 | coverage 11 | msgpack 12 | netaddr 13 | pbr 14 | stestr 15 | tzdata 16 | ; 17 | in 18 | python3Packages.buildPythonPackage rec { 19 | pname = "oslo.serialization"; 20 | version = "5.6.0"; 21 | 22 | nativeBuildInputs = [ 23 | pbr 24 | ]; 25 | 26 | propagatedBuildInputs = [ 27 | msgpack 28 | oslo-utils 29 | tzdata 30 | ]; 31 | 32 | nativeCheckInputs = [ 33 | stestr 34 | ]; 35 | 36 | checkInputs = [ 37 | coverage 38 | netaddr 39 | oslo-i18n 40 | oslotest 41 | ]; 42 | 43 | checkPhase = '' 44 | stestr run 45 | ''; 46 | 47 | src = fetchPypi { 48 | inherit pname version; 49 | sha256 = "sha256-TH1OEtqFPMTwS5EjBBE06Iboyf9Xq1fBli061Kh7f3w="; 50 | }; 51 | } 52 | -------------------------------------------------------------------------------- /packages/oslo-service.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-concurrency, 4 | oslo-config, 5 | oslo-i18n, 6 | oslo-log, 7 | oslo-utils, 8 | oslotest, 9 | procps, 10 | python3Packages, 11 | }: 12 | let 13 | inherit (python3Packages) 14 | coverage 15 | debtcollector 16 | eventlet 17 | fixtures 18 | greenlet 19 | paste 20 | pastedeploy 21 | pbr 22 | python-dateutil 23 | requests 24 | routes 25 | stestr 26 | webob 27 | yappi 28 | ; 29 | in 30 | python3Packages.buildPythonPackage rec { 31 | pname = "oslo.service"; 32 | version = "3.6.0"; 33 | 34 | nativeBuildInputs = [ 35 | pbr 36 | procps 37 | ]; 38 | 39 | propagatedBuildInputs = [ 40 | debtcollector 41 | eventlet 42 | greenlet 43 | oslo-concurrency 44 | oslo-config 45 | oslo-i18n 46 | oslo-log 47 | oslo-utils 48 | paste 49 | pastedeploy 50 | routes 51 | webob 52 | yappi 53 | ]; 54 | 55 | nativeCheckInputs = [ 56 | stestr 57 | ]; 58 | 59 | checkInputs = [ 60 | coverage 61 | fixtures 62 | oslotest 63 | python-dateutil 64 | requests 65 | ]; 66 | 67 | checkPhase = '' 68 | stestr run 69 | ''; 70 | 71 | src = fetchPypi { 72 | inherit pname version; 73 | sha256 = "sha256-MkhzZ7scUcBlRhgCHDdUpqCBFRooANluzPzkkSNWpjo="; 74 | }; 75 | } 76 | -------------------------------------------------------------------------------- /packages/oslo-upgradecheck.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-config, 4 | oslo-i18n, 5 | oslo-policy, 6 | oslo-serialization, 7 | oslo-utils, 8 | oslotest, 9 | pre-commit, 10 | python3Packages, 11 | }: 12 | let 13 | inherit (python3Packages) 14 | hacking 15 | prettytable 16 | stestr 17 | ; 18 | in 19 | python3Packages.buildPythonPackage rec { 20 | pname = "oslo.upgradecheck"; 21 | version = "2.4.0"; 22 | 23 | propagatedBuildInputs = [ 24 | oslo-config 25 | oslo-i18n 26 | oslo-policy 27 | oslo-utils 28 | prettytable 29 | ]; 30 | 31 | nativeCheckInputs = [ 32 | stestr 33 | ]; 34 | 35 | checkInputs = [ 36 | hacking 37 | oslo-serialization 38 | oslotest 39 | pre-commit 40 | ]; 41 | 42 | checkPhase = '' 43 | stestr run 44 | ''; 45 | 46 | src = fetchPypi { 47 | inherit pname version; 48 | sha256 = "sha256-q3kZHnSyrobDuKj0mrSfwOSYns3krU701NXiTpVreZM="; 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /packages/oslo-utils.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-config, 4 | oslo-i18n, 5 | oslotest, 6 | python3Packages, 7 | qemu, 8 | }: 9 | let 10 | inherit (python3Packages) 11 | coverage 12 | ddt 13 | debtcollector 14 | eventlet 15 | fixtures 16 | iso8601 17 | netaddr 18 | packaging 19 | pbr 20 | psutil 21 | pyparsing 22 | pyyaml 23 | stestr 24 | testscenarios 25 | testtools 26 | tzdata 27 | ; 28 | in 29 | python3Packages.buildPythonPackage rec { 30 | pname = "oslo.utils"; 31 | version = "7.4.0"; 32 | 33 | nativeBuildInputs = [ 34 | pbr 35 | qemu 36 | ]; 37 | 38 | propagatedBuildInputs = [ 39 | debtcollector 40 | iso8601 41 | netaddr 42 | oslo-i18n 43 | packaging 44 | psutil 45 | pyparsing 46 | pyyaml 47 | tzdata 48 | ]; 49 | 50 | nativeCheckInputs = [ 51 | stestr 52 | ]; 53 | 54 | checkInputs = [ 55 | coverage 56 | ddt 57 | eventlet 58 | fixtures 59 | oslo-config 60 | oslotest 61 | testscenarios 62 | testtools 63 | ]; 64 | 65 | checkPhase = '' 66 | stestr run . 67 | ''; 68 | 69 | src = fetchPypi { 70 | inherit pname version; 71 | sha256 = "sha256-ql3LXaoF3fS1NPLN7aVvfyFIXJb1y69qjAhx2AO3Ps4="; 72 | }; 73 | } 74 | -------------------------------------------------------------------------------- /packages/oslo-versionedobjects.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-concurrency, 4 | oslo-config, 5 | oslo-context, 6 | oslo-i18n, 7 | oslo-log, 8 | oslo-messaging, 9 | oslo-serialization, 10 | oslo-utils, 11 | oslotest, 12 | python3Packages, 13 | }: 14 | let 15 | inherit (python3Packages) 16 | coverage 17 | fixtures 18 | iso8601 19 | jsonschema 20 | netaddr 21 | stestr 22 | testtools 23 | webob 24 | ; 25 | in 26 | python3Packages.buildPythonPackage rec { 27 | pname = "oslo.versionedobjects"; 28 | version = "3.5.0"; 29 | 30 | propagatedBuildInputs = [ 31 | iso8601 32 | netaddr 33 | oslo-concurrency 34 | oslo-config 35 | oslo-context 36 | oslo-i18n 37 | oslo-log 38 | oslo-messaging 39 | oslo-serialization 40 | oslo-utils 41 | webob 42 | ]; 43 | 44 | nativeCheckInputs = [ 45 | stestr 46 | ]; 47 | 48 | checkInputs = [ 49 | coverage 50 | fixtures 51 | jsonschema 52 | oslotest 53 | testtools 54 | ]; 55 | 56 | checkPhase = '' 57 | stestr run 58 | ''; 59 | 60 | src = fetchPypi { 61 | inherit pname version; 62 | sha256 = "sha256-QuSsYcjDEx2GLjKD8rP9mKbMBDIKNCFLNKHRpBKKAbA="; 63 | }; 64 | } 65 | -------------------------------------------------------------------------------- /packages/oslo-vmware.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-concurrency, 4 | oslo-context, 5 | oslo-i18n, 6 | oslo-utils, 7 | pre-commit, 8 | python3Packages, 9 | suds-community, 10 | }: 11 | let 12 | inherit (python3Packages) 13 | coverage 14 | ddt 15 | defusedxml 16 | eventlet 17 | fixtures 18 | hacking 19 | lxml 20 | netaddr 21 | pbr 22 | pyyaml 23 | requests 24 | stevedore 25 | testtools 26 | urllib3 27 | ; 28 | in 29 | python3Packages.buildPythonPackage rec { 30 | pname = "oslo.vmware"; 31 | version = "4.5.0"; 32 | 33 | nativeBuildInputs = [ 34 | pbr 35 | ]; 36 | 37 | propagatedBuildInputs = [ 38 | defusedxml 39 | eventlet 40 | lxml 41 | netaddr 42 | oslo-concurrency 43 | oslo-context 44 | oslo-i18n 45 | oslo-utils 46 | pyyaml 47 | requests 48 | stevedore 49 | suds-community 50 | urllib3 51 | ]; 52 | 53 | checkInputs = [ 54 | coverage 55 | ddt 56 | fixtures 57 | hacking 58 | pre-commit 59 | testtools 60 | ]; 61 | 62 | src = fetchPypi { 63 | inherit pname version; 64 | sha256 = "sha256-z2y0tuNEargORr4C7gWjXmoAPu1EWsHZZng390HFUU8="; 65 | }; 66 | } 67 | -------------------------------------------------------------------------------- /packages/oslotest.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-config, 4 | pre-commit, 5 | python3Packages, 6 | }: 7 | let 8 | inherit (python3Packages) 9 | coverage 10 | fixtures 11 | hacking 12 | python-subunit 13 | stestr 14 | testtools 15 | ; 16 | 17 | in 18 | python3Packages.buildPythonPackage rec { 19 | pname = "oslotest"; 20 | version = "5.0.0"; 21 | 22 | nativeCheckInputs = [ 23 | stestr 24 | ]; 25 | 26 | propagatedBuildInputs = [ 27 | fixtures 28 | python-subunit 29 | testtools 30 | ]; 31 | 32 | checkInputs = [ 33 | coverage 34 | hacking 35 | oslo-config 36 | pre-commit 37 | ]; 38 | 39 | checkPhase = '' 40 | stestr run . 41 | ''; 42 | 43 | src = fetchPypi { 44 | inherit pname version; 45 | sha256 = "sha256-97skDGy+8voLq7lRP/PafQ8ozDja+Y70Oy6ISDZ/vSA="; 46 | }; 47 | } 48 | -------------------------------------------------------------------------------- /packages/osprofiler.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-concurrency, 4 | oslo-config, 5 | oslo-serialization, 6 | oslo-utils, 7 | pre-commit, 8 | python3Packages, 9 | }: 10 | let 11 | inherit (python3Packages) 12 | bandit 13 | coverage 14 | ddt 15 | docutils 16 | flake8-import-order 17 | hacking 18 | netaddr 19 | opentelemetry-exporter-otlp 20 | opentelemetry-sdk 21 | prettytable 22 | pymongo 23 | redis 24 | requests 25 | stestr 26 | testtools 27 | webob 28 | ; 29 | 30 | in 31 | python3Packages.buildPythonPackage rec { 32 | pname = "osprofiler"; 33 | version = "4.2.0"; 34 | 35 | propagatedBuildInputs = [ 36 | netaddr 37 | oslo-concurrency 38 | oslo-config 39 | oslo-serialization 40 | oslo-utils 41 | prettytable 42 | requests 43 | webob 44 | ]; 45 | 46 | nativeCheckInputs = [ 47 | stestr 48 | ]; 49 | 50 | pythonRelaxDeps = [ 51 | "opentracing-2.4.0" 52 | ]; 53 | 54 | checkInputs = [ 55 | bandit 56 | coverage 57 | ddt 58 | docutils 59 | flake8-import-order 60 | hacking 61 | #jaeger-client 62 | opentelemetry-exporter-otlp 63 | opentelemetry-sdk 64 | pre-commit 65 | pymongo 66 | redis 67 | testtools 68 | ]; 69 | 70 | checkPhase = '' 71 | # we can not execute the jaeger test, because they can not run under python >=3.7 72 | rm osprofiler/tests/unit/drivers/test_jaeger.py 73 | # elasticsearch is not present in nixos 74 | rm osprofiler/tests/unit/drivers/test_elasticsearch.py 75 | stestr run 76 | ''; 77 | 78 | src = fetchPypi { 79 | inherit pname version; 80 | sha256 = "sha256-bdHEviZFqPJBIQVdpbtGFojcr8fmtNS6vA7xumaQJ4E="; 81 | }; 82 | } 83 | -------------------------------------------------------------------------------- /packages/ovs.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | openvswitch, 4 | python3Packages, 5 | }: 6 | let 7 | inherit (python3Packages) 8 | netaddr 9 | packaging 10 | pyftpdlib 11 | pyparsing 12 | pytest 13 | scapy 14 | setuptools 15 | sortedcontainers 16 | tftpy 17 | ; 18 | 19 | in 20 | python3Packages.buildPythonPackage rec { 21 | pname = "ovs"; 22 | version = "3.4.1"; 23 | 24 | nativeBuildInputs = [ 25 | openvswitch 26 | setuptools 27 | ]; 28 | 29 | # There are Windows based tests that cannot be executed in a Linux 30 | # environment. We skip those. 31 | postPatch = '' 32 | rm ovs/winutils.py 33 | rm ovs/fcntl_win.py 34 | ''; 35 | 36 | propagatedBuildInputs = [ 37 | sortedcontainers 38 | ]; 39 | 40 | checkInputs = [ 41 | netaddr 42 | packaging 43 | pyftpdlib 44 | pyparsing 45 | pytest 46 | scapy 47 | tftpy 48 | ]; 49 | 50 | src = fetchPypi { 51 | inherit pname version; 52 | sha256 = "sha256-bBdrG9Cc8LqI815ua5c6Tfyp2k02/bAmY/AzSaTa3b4="; 53 | }; 54 | } 55 | -------------------------------------------------------------------------------- /packages/ovsdbapp.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslotest, 4 | ovs, 5 | python3Packages, 6 | }: 7 | let 8 | inherit (python3Packages) 9 | coverage 10 | fixtures 11 | isort 12 | netaddr 13 | pbr 14 | pythonRelaxDepsHook 15 | python-subunit 16 | stestr 17 | testscenarios 18 | testtools 19 | ; 20 | in 21 | python3Packages.buildPythonPackage rec { 22 | pname = "ovsdbapp"; 23 | version = "2.9.0"; 24 | 25 | nativeBuildInputs = [ 26 | pbr 27 | pythonRelaxDepsHook 28 | ]; 29 | 30 | pythonRelaxDeps = [ "isort" ]; 31 | 32 | propagatedBuildInputs = [ 33 | fixtures 34 | netaddr 35 | ovs 36 | ]; 37 | 38 | nativeCheckInputs = [ 39 | stestr 40 | ]; 41 | 42 | checkInputs = [ 43 | coverage 44 | isort 45 | oslotest 46 | python-subunit 47 | testscenarios 48 | testtools 49 | ]; 50 | 51 | checkPhase = '' 52 | stestr run 53 | ''; 54 | 55 | src = fetchPypi { 56 | inherit pname version; 57 | sha256 = "sha256-gEXFbAFe+ukmu5uejyLCQ1xI6heCCVaouHlAgYqoYH8="; 58 | }; 59 | } 60 | -------------------------------------------------------------------------------- /packages/pre-commit.nix: -------------------------------------------------------------------------------- 1 | { 2 | R, 3 | dotnet-sdk, 4 | fetchFromGitHub, 5 | git, 6 | nodejs, 7 | perl, 8 | python3Packages, 9 | ruby, 10 | swift, 11 | }: 12 | let 13 | inherit (python3Packages) 14 | cfgv 15 | coverage 16 | distlib 17 | identify 18 | mccabe 19 | nodeenv 20 | pytest 21 | pytest-env 22 | pyyaml 23 | re-assert 24 | virtualenv 25 | ; 26 | in 27 | python3Packages.buildPythonPackage rec { 28 | pname = "pre_commit"; 29 | version = "4.0.1"; 30 | 31 | nativeBuildInputs = [ 32 | R 33 | dotnet-sdk 34 | git 35 | nodejs 36 | perl 37 | pytest 38 | pytest-env 39 | ruby 40 | swift 41 | ]; 42 | 43 | propagatedBuildInputs = [ 44 | cfgv 45 | coverage 46 | distlib 47 | identify 48 | nodeenv 49 | pyyaml 50 | re-assert 51 | virtualenv 52 | ]; 53 | 54 | checkInputs = [ 55 | mccabe 56 | ]; 57 | 58 | postPatch = '' 59 | mkdir -p .git/hooks 60 | ''; 61 | 62 | disabledTests = [ 63 | "conda" 64 | "coursier" 65 | "dart" 66 | "docker" 67 | "docker_image" 68 | "dotnet" 69 | "golang" 70 | "haskell" 71 | "init_templatedir" 72 | "install_uninstall" 73 | "lua" 74 | "main" 75 | "node" 76 | "perl" 77 | "repository" 78 | "ruby" 79 | "rust" 80 | "swift" 81 | "test_health_check_after_downgrade" 82 | "test_health_check_healthy" 83 | "test_health_check_without_version" 84 | "test_lots_of_files" 85 | "test_r_hook" 86 | "test_r_inline" 87 | ]; 88 | 89 | # We need to fetch the sources directly from GitHub here, because the 90 | # packaging and testing requires the .git folder to determine the correct tool 91 | # version. 92 | src = fetchFromGitHub { 93 | owner = "pre-commit"; 94 | repo = "pre-commit"; 95 | rev = "v4.0.1"; 96 | sha256 = "sha256-qMNnzAxJOS7mabHmGYZ/VkDrpaZbqTJyETSCxq/OrGQ="; 97 | leaveDotGit = true; 98 | }; 99 | } 100 | -------------------------------------------------------------------------------- /packages/pycadf.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | oslo-config, 4 | oslo-serialization, 5 | python3Packages, 6 | }: 7 | let 8 | inherit (python3Packages) 9 | coverage 10 | fixtures 11 | flake8-import-order 12 | hacking 13 | pbr 14 | python-subunit 15 | pytz 16 | stestr 17 | testtools 18 | ; 19 | in 20 | python3Packages.buildPythonPackage rec { 21 | pname = "pycadf"; 22 | version = "4.0.0"; 23 | 24 | nativeBuildInputs = [ 25 | pbr 26 | stestr 27 | ]; 28 | 29 | propagatedBuildInputs = [ 30 | pytz 31 | oslo-config 32 | oslo-serialization 33 | ]; 34 | 35 | checkInputs = [ 36 | coverage 37 | fixtures 38 | flake8-import-order 39 | hacking 40 | python-subunit 41 | testtools 42 | ]; 43 | 44 | checkPhase = '' 45 | stestr run 46 | ''; 47 | 48 | src = fetchPypi { 49 | inherit pname version; 50 | sha256 = "sha256-KM/Lek9gDGVnKdXA9F0OGksv7CcTLhsDAKlQaeEe/3k="; 51 | }; 52 | } 53 | -------------------------------------------------------------------------------- /packages/python-barbicanclient.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | keystoneauth1, 4 | oslo-config, 5 | oslo-i18n, 6 | oslo-serialization, 7 | oslo-utils, 8 | oslotest, 9 | python3Packages, 10 | sphinxcontrib-svg2pdfconverter, 11 | }: 12 | let 13 | inherit (python3Packages) 14 | cliff 15 | coverage 16 | fixtures 17 | hacking 18 | pbr 19 | python-openstackclient 20 | requests 21 | requests-mock 22 | stestr 23 | ; 24 | in 25 | python3Packages.buildPythonPackage rec { 26 | pname = "python-barbicanclient"; 27 | version = "7.0.0"; 28 | 29 | nativeBuildInputs = [ 30 | pbr 31 | stestr 32 | ]; 33 | 34 | propagatedBuildInputs = [ 35 | cliff 36 | keystoneauth1 37 | oslo-i18n 38 | oslo-serialization 39 | oslo-utils 40 | requests 41 | ]; 42 | 43 | nativeCheckInputs = [ 44 | stestr 45 | ]; 46 | 47 | checkInputs = [ 48 | coverage 49 | fixtures 50 | hacking 51 | oslo-config 52 | oslotest 53 | python-openstackclient 54 | requests-mock 55 | sphinxcontrib-svg2pdfconverter 56 | ]; 57 | 58 | checkPhase = '' 59 | stestr run 60 | ''; 61 | 62 | src = fetchPypi { 63 | inherit pname version; 64 | sha256 = "sha256-MWrzinbWWkr5E1xwCn86RuKlqwSF6TlpaH9rYjFylcc="; 65 | }; 66 | } 67 | -------------------------------------------------------------------------------- /packages/python-binary-memcached.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | python3Packages, 4 | uhashring, 5 | }: 6 | let 7 | inherit (python3Packages) 8 | flake8 9 | mock 10 | pytest 11 | pytest-cov 12 | six 13 | trustme 14 | ; 15 | in 16 | python3Packages.buildPythonPackage rec { 17 | pname = "python_binary_memcached"; 18 | version = "0.31.3"; 19 | 20 | propagatedBuildInputs = [ 21 | six 22 | uhashring 23 | ]; 24 | 25 | checkInputs = [ 26 | flake8 27 | mock 28 | pytest 29 | pytest-cov 30 | trustme 31 | ]; 32 | 33 | src = fetchPypi { 34 | inherit pname version; 35 | sha256 = "sha256-qnx+Go7yej6J9fGCPgTFjYke+CTOjKJrpoO+VGDxfAo="; 36 | }; 37 | } 38 | -------------------------------------------------------------------------------- /packages/python-designateclient.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | keystoneauth1, 4 | osc-lib, 5 | oslo-config, 6 | oslo-serialization, 7 | oslo-utils, 8 | oslotest, 9 | python3Packages, 10 | reno, 11 | }: 12 | let 13 | inherit (python3Packages) 14 | cliff 15 | coverage 16 | debtcollector 17 | hacking 18 | jsonschema 19 | python-subunit 20 | requests 21 | requests-mock 22 | stestr 23 | stevedore 24 | tempest 25 | ; 26 | in 27 | python3Packages.buildPythonPackage rec { 28 | pname = "python-designateclient"; 29 | version = "6.1.0"; 30 | 31 | propagatedBuildInputs = [ 32 | cliff 33 | debtcollector 34 | jsonschema 35 | keystoneauth1 36 | osc-lib 37 | oslo-serialization 38 | oslo-utils 39 | requests 40 | stevedore 41 | ]; 42 | 43 | nativeCheckInputs = [ 44 | stestr 45 | ]; 46 | 47 | checkInputs = [ 48 | coverage 49 | hacking 50 | oslo-config 51 | oslotest 52 | python-subunit 53 | reno 54 | requests-mock 55 | tempest 56 | ]; 57 | 58 | checkPhase = '' 59 | stestr run 60 | ''; 61 | 62 | src = fetchPypi { 63 | inherit pname version; 64 | sha256 = "sha256-GtwqB0sw2ELPl4f1MxDDeUkZW/TjTaOYTlY1t7ikaJw="; 65 | }; 66 | } 67 | -------------------------------------------------------------------------------- /packages/python-keystoneclient.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | keystoneauth1, 4 | openssl, 5 | oslo-config, 6 | oslo-i18n, 7 | oslo-serialization, 8 | oslo-utils, 9 | oslotest, 10 | python3Packages, 11 | }: 12 | let 13 | inherit (python3Packages) 14 | bandit 15 | coverage 16 | debtcollector 17 | fixtures 18 | flake8-docstrings 19 | hacking 20 | keyring 21 | lxml 22 | oauthlib 23 | packaging 24 | pbr 25 | requests 26 | requests-mock 27 | stevedore 28 | stestr 29 | tempest 30 | testresources 31 | testscenarios 32 | testtools 33 | ; 34 | in 35 | python3Packages.buildPythonPackage rec { 36 | pname = "python-keystoneclient"; 37 | version = "5.5.0"; 38 | 39 | nativeBuildInputs = [ 40 | openssl 41 | pbr 42 | ]; 43 | 44 | propagatedBuildInputs = [ 45 | debtcollector 46 | keystoneauth1 47 | oslo-config 48 | oslo-i18n 49 | oslo-serialization 50 | oslo-utils 51 | packaging 52 | requests 53 | stevedore 54 | ]; 55 | 56 | nativeCheckInputs = [ 57 | stestr 58 | ]; 59 | 60 | checkInputs = [ 61 | #os-client-config 62 | bandit 63 | coverage 64 | fixtures 65 | flake8-docstrings 66 | hacking 67 | keyring 68 | lxml 69 | oauthlib 70 | oslotest 71 | requests-mock 72 | tempest 73 | testresources 74 | testscenarios 75 | testtools 76 | ]; 77 | 78 | checkPhase = '' 79 | stestr run 80 | ''; 81 | 82 | src = fetchPypi { 83 | inherit pname version; 84 | sha256 = "sha256-wvWTT5VXaTbJjkW/WZrUi8sKxFFZPl+DROv1LLD0EfU="; 85 | }; 86 | } 87 | -------------------------------------------------------------------------------- /packages/python-neutronclient.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | keystoneauth1, 4 | openstacksdk, 5 | os-client-config, 6 | osc-lib, 7 | oslo-i18n, 8 | oslo-log, 9 | oslo-serialization, 10 | oslo-utils, 11 | oslotest, 12 | osprofiler, 13 | python-keystoneclient, 14 | python3Packages, 15 | }: 16 | let 17 | inherit (python3Packages) 18 | bandit 19 | cliff 20 | coverage 21 | debtcollector 22 | fixtures 23 | flake8-import-order 24 | hacking 25 | iso8601 26 | netaddr 27 | pbr 28 | python-dateutil 29 | python-openstackclient 30 | python-subunit 31 | requests 32 | requests-mock 33 | stestr 34 | testtools 35 | ; 36 | in 37 | python3Packages.buildPythonPackage rec { 38 | pname = "python-neutronclient"; 39 | version = "11.3.1"; 40 | 41 | nativeBuildInputs = [ 42 | pbr 43 | ]; 44 | 45 | propagatedBuildInputs = [ 46 | cliff 47 | debtcollector 48 | iso8601 49 | keystoneauth1 50 | netaddr 51 | openstacksdk 52 | os-client-config 53 | osc-lib 54 | oslo-i18n 55 | oslo-log 56 | oslo-serialization 57 | oslo-utils 58 | python-dateutil 59 | python-keystoneclient 60 | requests 61 | ]; 62 | 63 | nativeCheckInputs = [ 64 | stestr 65 | ]; 66 | 67 | checkInputs = [ 68 | bandit 69 | coverage 70 | fixtures 71 | flake8-import-order 72 | hacking 73 | oslotest 74 | osprofiler 75 | python-openstackclient 76 | python-subunit 77 | requests-mock 78 | testtools 79 | ]; 80 | 81 | checkPhase = '' 82 | stestr run 83 | ''; 84 | 85 | src = fetchPypi { 86 | inherit pname version; 87 | sha256 = "sha256-U82ZI/Q6OwdypA41YfdGVa3IA4+QJhqz3gW2IR0S7cs="; 88 | }; 89 | } 90 | -------------------------------------------------------------------------------- /packages/python-swiftclient.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | python-keystoneclient, 4 | keystoneauth1, 5 | openstacksdk, 6 | python3Packages, 7 | }: 8 | let 9 | inherit (python3Packages) 10 | coverage 11 | hacking 12 | pbr 13 | requests 14 | setuptools 15 | stestr 16 | ; 17 | in 18 | python3Packages.buildPythonPackage rec { 19 | pname = "python-swiftclient"; 20 | version = "4.6.0"; 21 | pyproject = true; 22 | 23 | nativeBuildInputs = [ 24 | pbr 25 | setuptools 26 | requests 27 | ]; 28 | 29 | propagagedBuildInputs = [ 30 | requests 31 | ]; 32 | 33 | nativeCheckInputs = [ 34 | stestr 35 | ]; 36 | 37 | checkInputs = [ 38 | coverage 39 | hacking 40 | keystoneauth1 41 | openstacksdk 42 | python-keystoneclient 43 | ]; 44 | 45 | checkPhase = '' 46 | stestr run 47 | ''; 48 | 49 | src = fetchPypi { 50 | inherit pname version; 51 | sha256 = "sha256-1NGFQEE4k/wWrYd5HXQPgj92NDXoIS5o61PWDaJjgjM="; 52 | }; 53 | } 54 | -------------------------------------------------------------------------------- /packages/reno.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchFromGitHub, 3 | git, 4 | gnupg, 5 | python3Packages, 6 | }: 7 | let 8 | inherit (python3Packages) 9 | coverage 10 | dulwich 11 | openstackdocstheme 12 | packaging 13 | pbr 14 | python-subunit 15 | pyyaml 16 | stestr 17 | testscenarios 18 | testtools 19 | ; 20 | in 21 | python3Packages.buildPythonPackage rec { 22 | pname = "reno"; 23 | version = "4.1.0"; 24 | 25 | nativeBuildInputs = [ 26 | git 27 | gnupg 28 | pbr 29 | ]; 30 | 31 | propagatedBuildInputs = [ 32 | dulwich 33 | packaging 34 | pyyaml 35 | ]; 36 | 37 | nativeCheckInputs = [ 38 | stestr 39 | ]; 40 | 41 | checkInputs = [ 42 | coverage 43 | openstackdocstheme 44 | python-subunit 45 | testscenarios 46 | testtools 47 | ]; 48 | 49 | checkPhase = '' 50 | stestr run 51 | ''; 52 | 53 | # The tests use the .git directory and git itself, thus we need to check out the repo. 54 | src = fetchFromGitHub { 55 | owner = "openstack"; 56 | repo = "reno"; 57 | rev = "${version}"; 58 | sha256 = "sha256-SPepaOvq4LKV6EBmgXrlAku1Ug5Y1Zq7pjxkNPdrqVg="; 59 | leaveDotGit = true; 60 | }; 61 | } 62 | -------------------------------------------------------------------------------- /packages/sphinxcontrib-svg2pdfconverter.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | let 3 | inherit (python3Packages) 4 | cairosvg 5 | sphinx 6 | ; 7 | in 8 | python3Packages.buildPythonPackage rec { 9 | pname = "sphinxcontrib_svg2pdfconverter"; 10 | version = "1.2.3"; 11 | 12 | nativeBuildInputs = [ 13 | sphinx 14 | ]; 15 | 16 | propagatedBuildInputs = [ 17 | cairosvg 18 | ]; 19 | 20 | src = fetchPypi { 21 | inherit pname version; 22 | sha256 = "sha256-+11Re2NMVilSIATFntzk2QUNiYIkCMq0UsfVL+WumCQ="; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /packages/suds-community.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | python3Packages, 4 | }: 5 | let 6 | inherit (python3Packages) 7 | pytest 8 | ; 9 | in 10 | python3Packages.buildPythonPackage rec { 11 | pname = "suds_community"; 12 | version = "1.2.0"; 13 | 14 | checkInputs = [ 15 | pytest 16 | ]; 17 | 18 | src = fetchPypi { 19 | inherit pname version; 20 | sha256 = "sha256-qzsk3Juga15lmOKl000qfQbHnmE9gc7cAoR1v707uQw="; 21 | }; 22 | } 23 | -------------------------------------------------------------------------------- /packages/taskflow.nix: -------------------------------------------------------------------------------- 1 | { 2 | automaton, 3 | etcd3gw, 4 | fetchPypi, 5 | futurist, 6 | oslo-serialization, 7 | oslo-utils, 8 | oslotest, 9 | pifpaf, 10 | pre-commit, 11 | python3Packages, 12 | zake, 13 | }: 14 | let 15 | inherit (python3Packages) 16 | alembic 17 | cachetools 18 | eventlet 19 | fasteners 20 | hacking 21 | jsonschema 22 | kazoo 23 | kombu 24 | networkx 25 | pbr 26 | psycopg2 27 | pydot 28 | pymysql 29 | redis 30 | sqlalchemy 31 | sqlalchemy-utils 32 | stestr 33 | tenacity 34 | testscenarios 35 | testtools 36 | ; 37 | in 38 | python3Packages.buildPythonPackage rec { 39 | pname = "taskflow"; 40 | version = "5.10.0"; 41 | pyproject = true; 42 | 43 | nativeBuildInputs = [ 44 | pbr 45 | ]; 46 | 47 | propagatedBuildInputs = [ 48 | automaton 49 | cachetools 50 | fasteners 51 | futurist 52 | jsonschema 53 | networkx 54 | oslo-serialization 55 | oslo-utils 56 | pydot 57 | tenacity 58 | ]; 59 | 60 | nativeCheckInputs = [ 61 | stestr 62 | ]; 63 | 64 | checkInputs = [ 65 | alembic 66 | etcd3gw 67 | eventlet 68 | hacking 69 | kazoo 70 | kombu 71 | oslotest 72 | pifpaf 73 | pre-commit 74 | psycopg2 75 | pymysql 76 | redis 77 | sqlalchemy 78 | sqlalchemy-utils 79 | testscenarios 80 | testtools 81 | zake 82 | ]; 83 | 84 | checkPhase = '' 85 | stestr run 86 | ''; 87 | 88 | src = fetchPypi { 89 | inherit pname version; 90 | sha256 = "sha256-9C/DMOusiBTNjD8bJDrg9GpZnHg/NyR9ojazWUfo37g="; 91 | }; 92 | } 93 | -------------------------------------------------------------------------------- /packages/tooz.nix: -------------------------------------------------------------------------------- 1 | { 2 | etcd3gw, 3 | fetchPypi, 4 | futurist, 5 | lib, 6 | oslo-serialization, 7 | oslo-utils, 8 | pifpaf, 9 | python3Packages, 10 | writeScript, 11 | zake, 12 | }: 13 | let 14 | inherit (python3Packages) 15 | coverage 16 | ddt 17 | fasteners 18 | fixtures 19 | msgpack 20 | pymemcache 21 | pymysql 22 | stestr 23 | stevedore 24 | sysv_ipc 25 | tenacity 26 | testtools 27 | voluptuous 28 | ; 29 | 30 | testExcludes = [ 31 | "test_lock_context_manager_acquire_argument" 32 | "test_lock_context_manager_acquire_no_argument" 33 | "test_parsing_blocking_settings" 34 | "test_parsing_timeout_settings" 35 | ]; 36 | 37 | testExcludeFile = writeScript "testExcludes" (lib.concatStringsSep "\n" testExcludes); 38 | in 39 | python3Packages.buildPythonPackage rec { 40 | pname = "tooz"; 41 | version = "6.3.0"; 42 | 43 | propagatedBuildInputs = [ 44 | fasteners 45 | futurist 46 | msgpack 47 | oslo-serialization 48 | oslo-utils 49 | stevedore 50 | tenacity 51 | voluptuous 52 | ]; 53 | 54 | checkInputs = [ 55 | coverage 56 | ddt 57 | etcd3gw 58 | fixtures 59 | pifpaf 60 | pymemcache 61 | pymysql 62 | sysv_ipc 63 | testtools 64 | zake 65 | ]; 66 | 67 | nativeCheckInputs = [ 68 | stestr 69 | ]; 70 | 71 | checkPhase = '' 72 | TOOZ_TEST_URL=file:///tmp stestr run --exclude-list ${testExcludeFile} 73 | ''; 74 | 75 | src = fetchPypi { 76 | inherit pname version; 77 | sha256 = "sha256-lTA/XW+5bWTEq0uANo6MkZgER4S0/wkDAdpDVa3SWck="; 78 | }; 79 | } 80 | -------------------------------------------------------------------------------- /packages/uhashring.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | let 3 | inherit (python3Packages) 4 | black 5 | flake8 6 | hatchling 7 | isort 8 | ; 9 | 10 | in 11 | python3Packages.buildPythonPackage rec { 12 | pname = "uhashring"; 13 | version = "2.3"; 14 | pyproject = true; 15 | 16 | nativeBuildInputs = [ 17 | black 18 | flake8 19 | hatchling 20 | isort 21 | ]; 22 | 23 | checkPhase = '' 24 | isort --check-only --diff uhashring 25 | black -q --check --diff uhashring 26 | ''; 27 | 28 | src = fetchPypi { 29 | inherit pname version; 30 | sha256 = "sha256-n3YYfo2OgvblUZyZXu8fG/RNSl4PxP3RIZoESxAEBhI="; 31 | }; 32 | } 33 | -------------------------------------------------------------------------------- /packages/xstatic-angular-bootstrap.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | python3Packages, 4 | }: 5 | python3Packages.buildPythonPackage rec { 6 | pname = "XStatic-Angular-Bootstrap"; 7 | version = "2.5.0.0"; 8 | 9 | src = fetchPypi { 10 | inherit pname version; 11 | sha256 = "sha256-vmBobJopx0zurdeHlpwry8458Vsw2qSUlXSuymAvnzU="; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /packages/xstatic-angular-fileupload.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-Angular-FileUpload"; 4 | version = "12.2.13.0"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-+PQxrH+zewGgEIEfuK6X8ODLEcu9BOScWGfqf3T62lY="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-angular-gettext.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-Angular-Gettext"; 4 | version = "2.4.1.0"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-iDGSySc7LRuNxp5gWEXw06JnaYlV5V3N4OOk3v6uOFs="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-angular-lrdragndrop.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-Angular-lrdragndrop"; 4 | version = "1.0.2.6"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-j2cJXpbA1K2Vz2k4xltAnODmEDbPpEo80HRHlLs7BQE="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-angular-schema-form.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-Angular-Schema-Form"; 4 | version = "0.8.13.0"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-fAhjSQF1Emf+JtJm/AJ89u0uX0Imlphc7HUFlLP04wA="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-angular.nix: -------------------------------------------------------------------------------- 1 | { 2 | fetchPypi, 3 | python3Packages, 4 | }: 5 | python3Packages.buildPythonPackage rec { 6 | pname = "XStatic-Angular"; 7 | version = "1.8.2.2"; 8 | 9 | src = fetchPypi { 10 | inherit pname version; 11 | sha256 = "sha256-TIFq1aH5krHWPNKXXjwSYvyghnL1mG4YOKu2TtdcgyM="; 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /packages/xstatic-bootstrap-datepicker.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-Bootstrap-Datepicker"; 4 | version = "1.4.0.0"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-3zOt2fXnhfqISsSxgmAa9qrJ4e7vfP5i27ywZU0PLW4="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-bootstrap-scss.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-Bootstrap-SCSS"; 4 | version = "3.4.1.0"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-XLVvAJDLZInWQ3MN5Xxo2KZxTyuf5Sasibto9dd9/hA="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-bootswatch.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-bootswatch"; 4 | version = "3.3.7.0"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-k+5YY8HsByEv4SrhN6EHCLQQJyA5HUYPBh3T9EG6O24="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-d3.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-D3"; 4 | version = "3.5.17.0"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-F26T7ucZLgf8VDNN2xprZPz8jN5quyP2VyeFa7ndGCk="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-font-awesome.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-Font-Awesome"; 4 | version = "4.7.0.0"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-4B+0gMqqfHlj3LMyikcA5jG+9gcNsOi2hYFtIg5oX2w="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-hogan.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-Hogan"; 4 | version = "2.0.0.3"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-J6khlj5HCrutoVsthdGYgzeVqurV/XMzm8KIPP3bVhk="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-jasmine.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-Jasmine"; 4 | version = "2.4.1.2"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-v5Ib5CPCVKXOvCFWp/1m2CEM79JR/C+lH3kqFTv56Cs="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-jquery-migrate.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-JQuery-Migrate"; 4 | version = "3.3.2.1"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-mG+Xmg4toKRTQaAzaRgRFH/fbqqXpwa3qz2edxHOrW4="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-jquery-quicksearch.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-JQuery.quicksearch"; 4 | version = "2.0.3.2"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-84dg/pO1BPKFXvJem/kd9lyKZgFnQWXkaF+yF7thb9E="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-jquery-tablesorter.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-JQuery.TableSorter"; 4 | version = "2.14.5.2"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-vdhHygzeQBT9IRNPmeWame9IgYXHRegmRpEdL53j12I="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-jsencrypt.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-JSEncrypt"; 4 | version = "2.3.1.1"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-oneRKk9w0dL1jI2UuZLSROafz4UaLL7V2Dy0/EIqcvI="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-mdi.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-mdi"; 4 | version = "1.6.50.2"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-vhAFr3pZOws6NJqtsF5BYOpliUJIpHskbGZYNF4vEME="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-objectpath.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-objectpath"; 4 | version = "1.2.1.0"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | 9 | sha256 = "sha256-zR6fUCSCr83QKIIRSIQ7B7QGXI3OqOXMM6u5rhzyCyA="; 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /packages/xstatic-rickshaw.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-Rickshaw"; 4 | version = "1.5.1.0"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-zyeNS9TpdN3PcXDSC7twbMNPk89hZY8vaPMTg3QXhWQ="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-roboto-fontface.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-roboto-fontface"; 4 | version = "0.5.0.0"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-bSct9Y4g7sOhW8onkWPzhhTHB04v7LU3pYsp0QnoP2I="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-smart-table.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-smart-table"; 4 | version = "1.4.13.2"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-8vpe03wpUyU955xhw0b6bDxPOHMSldIkBVLBQpjbawo="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-spin.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-Spin"; 4 | version = "1.2.5.3"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-BuiJzzMY8IznTviItF2fHgkBe7jm1RmimcEKnmtUJkI="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-term-js.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-term.js"; 4 | version = "0.0.7.0"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-tfOractjg5HwQlSROhGyqrCOLVHFuBu2pWTFptRCvTE="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/xstatic-tv4.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | python3Packages.buildPythonPackage rec { 3 | pname = "XStatic-tv4"; 4 | version = "1.2.7.0"; 5 | 6 | src = fetchPypi { 7 | inherit pname version; 8 | sha256 = "sha256-m0xXJE6RQSbN2l2LwkaYGJ1zgAIDyFsfyUWgjiXHxxM="; 9 | }; 10 | } 11 | -------------------------------------------------------------------------------- /packages/zake.nix: -------------------------------------------------------------------------------- 1 | { fetchPypi, python3Packages }: 2 | let 3 | inherit (python3Packages) 4 | kazoo 5 | six 6 | ; 7 | 8 | in 9 | python3Packages.buildPythonPackage rec { 10 | pname = "zake"; 11 | version = "0.2.2"; 12 | format = "wheel"; 13 | 14 | propagatedBuildInputs = [ 15 | kazoo 16 | six 17 | ]; 18 | 19 | src = fetchPypi { 20 | inherit pname version format; 21 | python = "py2.py3"; 22 | sha256 = "sha256-h7pXMtSVxKyGNzPc8UkmyGxgQR3Zw2qIb+EVmvv0/0g="; 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /tests/default.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | nixosModules, 4 | generateRootwrapConf, 5 | }: 6 | let 7 | tests = { 8 | openstack-default-setup = pkgs.callPackage ./openstack-default-setup.nix { inherit nixosModules; }; 9 | openstack-live-migration = pkgs.callPackage ./openstack-live-migration.nix { 10 | inherit nixosModules generateRootwrapConf; 11 | }; 12 | }; 13 | in 14 | pkgs.lib.mapAttrs (_: v: pkgs.lib.recursiveUpdate v { meta.tag = "nix-integration-test"; }) tests 15 | -------------------------------------------------------------------------------- /tests/openstack-default-setup.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | nixosModules, 4 | }: 5 | pkgs.nixosTest { 6 | name = "OpenStack default setup test"; 7 | 8 | nodes.controllerVM = 9 | { ... }: 10 | { 11 | imports = [ 12 | nixosModules.controllerModule 13 | nixosModules.testModules.testController 14 | ]; 15 | }; 16 | 17 | nodes.computeVM = 18 | { ... }: 19 | { 20 | imports = [ 21 | nixosModules.computeModule 22 | nixosModules.testModules.testCompute 23 | ]; 24 | }; 25 | 26 | testScript = 27 | { ... }: 28 | '' 29 | import json 30 | import time 31 | 32 | def retry_until_succeed(machine, cmd, retries = 10): 33 | for i in range(retries): 34 | print(f"Retrying command until success '{cmd}'. {i + 1}/{retries} retries") 35 | time.sleep(1) 36 | status, _ = machine.execute(cmd) 37 | if status == 0: 38 | return True 39 | return False 40 | 41 | def print_logfile(machine, filepath): 42 | _, out = controllerVM.execute(f"cat {filepath}") 43 | print(f"Printing log of: {filepath}") 44 | print(out) 45 | 46 | def wait_for_openstack(): 47 | for i in range(120): 48 | print(f"Waiting for openstack network agents and compute nodes to be present ... {i + 1}/120 sec") 49 | time.sleep(1) 50 | status, out = controllerVM.execute("openstack network agent list -f json") 51 | if status != 0: 52 | continue 53 | net_agents = json.loads(out) 54 | status, out = controllerVM.execute("openstack compute service list --service nova-compute -f json") 55 | if status != 0: 56 | continue 57 | compute_nodes = json.loads(out) 58 | if len(net_agents) == 4 and len(compute_nodes) == 1 and compute_nodes[0].get("Host","None") == "computeVM": 59 | return True 60 | return False 61 | 62 | def wait_for_openstack_vm(): 63 | for i in range(30): 64 | print(f"Waiting for openstack server to be active ... {i + 1}/30 sec") 65 | time.sleep(1) 66 | status, out = controllerVM.execute("openstack server list -f json") 67 | if status != 0: 68 | continue 69 | vms = json.loads(out) 70 | if len(vms) == 1 and vms[0]["Status"] == "ACTIVE": 71 | return True 72 | elif len(vms) == 1 and vms[0]["Status"] == "ERROR": 73 | print(out) 74 | print_logfile(controllerVM, "/var/log/nova/.nova-manage-wrapped.log") 75 | print_logfile(controllerVM, "/var/log/nova/.nova-scheduler-wrapped.log") 76 | print_logfile(controllerVM, "/var/log/nova/.nova-api-wrapped.log") 77 | print_logfile(controllerVM, "/var/log/nova/.nova-conductor-wrapped.log") 78 | print_logfile(controllerVM, "/var/log/neutron/.neutron-server-wrapped.log") 79 | print_logfile(controllerVM, "/var/log/neutron/.neutron-openvswitch-agent-wrapped.log") 80 | print_logfile(controllerVM, "/var/log/neutron/.neutron-dhcp-agent-wrapped.log") 81 | return False 82 | return False 83 | 84 | def wait_for_network_namespace(): 85 | for i in range(30): 86 | print(f"Waiting for network namespace to appear ... {i +1}/30 sec") 87 | time.sleep(1) 88 | net_ns = controllerVM.succeed("ip netns list | awk '{ print $1 }'").strip() 89 | if net_ns != "": 90 | return net_ns 91 | return "" 92 | 93 | 94 | start_all() 95 | controllerVM.wait_for_unit("glance-api.service") 96 | controllerVM.wait_for_unit("placement-api.service") 97 | controllerVM.wait_for_unit("neutron-server.service") 98 | controllerVM.wait_for_unit("nova-scheduler.service") 99 | controllerVM.wait_for_unit("nova-conductor.service") 100 | 101 | assert wait_for_openstack() 102 | 103 | controllerVM.succeed("systemctl start nova-host-discovery.service") 104 | controllerVM.wait_for_unit("nova-host-discovery.service") 105 | controllerVM.succeed("systemctl start openstack-create-vm.service") 106 | controllerVM.wait_for_unit("openstack-create-vm.service") 107 | assert wait_for_openstack_vm() 108 | 109 | vm_state = json.loads(controllerVM.succeed("openstack server show test_vm -f json")) 110 | 111 | vm_ip = vm_state["addresses"]["provider"][0] 112 | assert vm_ip.startswith("192.168.44") 113 | 114 | net_ns = wait_for_network_namespace() 115 | assert net_ns != "" 116 | 117 | # Ping the OpenStack VM from the controller host. We use the network 118 | # namespace dedicated for the VM to ping it. 119 | assert retry_until_succeed(controllerVM, f"ip netns exec {net_ns} ping -c 1 {vm_ip}", 30) 120 | ''; 121 | } 122 | -------------------------------------------------------------------------------- /tests/openstack-live-migration.nix: -------------------------------------------------------------------------------- 1 | { 2 | pkgs, 3 | nixosModules, 4 | generateRootwrapConf, 5 | }: 6 | let 7 | novaConfigForIp = 8 | ip: 9 | { config, pkgs, ... }: 10 | { 11 | nova.config = 12 | let 13 | nova_env = pkgs.python3.buildEnv.override { 14 | extraLibs = [ config.nova.novaPackage ]; 15 | }; 16 | execDirs = pkgs.buildEnv { 17 | name = "utils"; 18 | paths = [ nova_env ]; 19 | }; 20 | rootwrapConf = generateRootwrapConf { 21 | package = nova_env; 22 | filterPath = "/etc/nova/rootwrap.d"; 23 | execDirs = execDirs; 24 | }; 25 | in 26 | pkgs.writeText "nova.conf" '' 27 | [DEFAULT] 28 | log_dir = /var/log/nova 29 | lock_path = /var/lock/nova 30 | state_path = /var/lib/nova 31 | rootwrap_config = ${rootwrapConf} 32 | compute_driver = libvirt.LibvirtDriver 33 | my_ip = ${ip} 34 | transport_url = rabbit://openstack:openstack@controller 35 | 36 | [api] 37 | auth_strategy = keystone 38 | 39 | [api_database] 40 | connection = sqlite:////var/lib/nova/nova_api.sqlite 41 | 42 | [database] 43 | connection = sqlite:////var/lib/nova/nova.sqlite 44 | 45 | [glance] 46 | api_servers = http://controller:9292 47 | 48 | [keystone_authtoken] 49 | www_authenticate_uri = http://controller:5000/ 50 | auth_url = http://controller:5000/ 51 | memcached_servers = controller:11211 52 | auth_type = password 53 | project_domain_name = Default 54 | user_domain_name = Default 55 | project_name = service 56 | username = nova 57 | password = nova 58 | 59 | [libvirt] 60 | virt_type = kvm 61 | cpu_mode = custom 62 | cpu_model = qemu64 63 | 64 | [neutron] 65 | auth_url = http://controller:5000 66 | auth_type = password 67 | project_domain_name = Default 68 | user_domain_name = Default 69 | region_name = RegionOne 70 | project_name = service 71 | username = neutron 72 | password = neutron 73 | 74 | [os_vif_ovs] 75 | ovsdb_connection = unix:/run/openvswitch/db.sock 76 | 77 | [oslo_concurrency] 78 | lock_path = /var/lib/nova/tmp 79 | 80 | [placement] 81 | region_name = RegionOne 82 | project_domain_name = Default 83 | project_name = service 84 | auth_type = password 85 | user_domain_name = Default 86 | auth_url = http://controller:5000/v3 87 | username = placement 88 | password = placement 89 | 90 | [service_user] 91 | send_service_user_token = true 92 | auth_url = http://controller:5000/ 93 | auth_strategy = keystone 94 | auth_type = password 95 | project_domain_name = Default 96 | project_name = service 97 | user_domain_name = Default 98 | username = nova 99 | password = nova 100 | 101 | [vnc] 102 | enabled = true 103 | server_listen = 0.0.0.0 104 | server_proxyclient_address = $my_ip 105 | novncproxy_base_url = http://controller:6080/vnc_lite.html 106 | 107 | [cells] 108 | enable = False 109 | 110 | [os_region_name] 111 | openstack = 112 | ''; 113 | }; 114 | in 115 | pkgs.nixosTest { 116 | name = "OpenStack live migration test"; 117 | 118 | nodes.controllerVM = 119 | { ... }: 120 | { 121 | imports = [ 122 | nixosModules.controllerModule 123 | nixosModules.testModules.testController 124 | ]; 125 | }; 126 | 127 | nodes.computeVM = 128 | { ... }: 129 | { 130 | imports = [ 131 | nixosModules.computeModule 132 | nixosModules.testModules.testCompute 133 | (novaConfigForIp "10.0.0.39") 134 | ]; 135 | 136 | networking.extraHosts = '' 137 | 10.0.0.40 computeVM2 computeVM2.local 138 | ''; 139 | virtualisation.libvirtd.extraConfig = '' 140 | listen_tls = 0 141 | listen_tcp = 1 142 | auth_tcp = "none" 143 | ''; 144 | systemd.sockets.libvirtd-tcp = { 145 | enable = true; 146 | wantedBy = [ "sockets.target" ]; 147 | }; 148 | }; 149 | 150 | nodes.computeVM2 = 151 | { ... }: 152 | { 153 | imports = [ 154 | nixosModules.computeModule 155 | nixosModules.testModules.testCompute 156 | (novaConfigForIp "10.0.0.40") 157 | ]; 158 | 159 | networking.extraHosts = '' 160 | 10.0.0.39 computeVM computeVM.local 161 | ''; 162 | 163 | virtualisation.libvirtd.extraConfig = '' 164 | listen_tls = 0 165 | listen_tcp = 1 166 | auth_tcp = "none" 167 | ''; 168 | 169 | systemd.sockets.libvirtd-tcp = { 170 | enable = true; 171 | wantedBy = [ "sockets.target" ]; 172 | }; 173 | 174 | systemd.network.networks.eth1.networkConfig.Address = pkgs.lib.mkForce "10.0.0.40/24"; 175 | }; 176 | 177 | testScript = 178 | { ... }: 179 | '' 180 | import json 181 | import time 182 | 183 | def retry_until_succeed(machine, cmd, retries = 10): 184 | for i in range(retries): 185 | print(f"Retrying command until success '{cmd}'. {i + 1}/{retries} retries") 186 | time.sleep(1) 187 | status, _ = machine.execute(cmd) 188 | if status == 0: 189 | return True 190 | return False 191 | 192 | def print_logfile(machine, filepath): 193 | _, out = controllerVM.execute(f"cat {filepath}") 194 | print(f"Printing log of: {filepath}") 195 | print(out) 196 | 197 | def wait_for_openstack(): 198 | for i in range(120): 199 | print(f"Waiting for openstack network agents and compute nodes to be present ... {i + 1}/120 sec") 200 | time.sleep(1) 201 | status, out = controllerVM.execute("openstack network agent list -f json") 202 | if status != 0: 203 | continue 204 | net_agents = json.loads(out) 205 | status, out = controllerVM.execute("openstack compute service list --service nova-compute -f json") 206 | if status != 0: 207 | continue 208 | compute_nodes = json.loads(out) 209 | if len(net_agents) == 5 and len(compute_nodes) == 2: 210 | return True 211 | return False 212 | 213 | def wait_for_openstack_vm(): 214 | for i in range(30): 215 | print(f"Waiting for openstack server to be active ... {i + 1}/30 sec") 216 | time.sleep(1) 217 | status, out = controllerVM.execute("openstack server list -f json") 218 | if status != 0: 219 | continue 220 | vms = json.loads(out) 221 | if len(vms) == 1 and vms[0]["Status"] == "ACTIVE": 222 | return True 223 | elif len(vms) == 1 and vms[0]["Status"] == "ERROR": 224 | print(out) 225 | print_logfile(controllerVM, "/var/log/nova/.nova-manage-wrapped.log") 226 | print_logfile(controllerVM, "/var/log/nova/.nova-scheduler-wrapped.log") 227 | print_logfile(controllerVM, "/var/log/nova/.nova-api-wrapped.log") 228 | print_logfile(controllerVM, "/var/log/nova/.nova-conductor-wrapped.log") 229 | print_logfile(controllerVM, "/var/log/neutron/.neutron-server-wrapped.log") 230 | print_logfile(controllerVM, "/var/log/neutron/.neutron-openvswitch-agent-wrapped.log") 231 | print_logfile(controllerVM, "/var/log/neutron/.neutron-dhcp-agent-wrapped.log") 232 | return False 233 | return False 234 | 235 | def wait_for_network_namespace(): 236 | for i in range(30): 237 | print(f"Waiting for network namespace to appear ... {i +1}/30 sec") 238 | time.sleep(1) 239 | net_ns = controllerVM.succeed("ip netns list | awk '{ print $1 }'").strip() 240 | if net_ns != "": 241 | return net_ns 242 | return "" 243 | 244 | 245 | start_all() 246 | controllerVM.wait_for_unit("glance-api.service") 247 | controllerVM.wait_for_unit("placement-api.service") 248 | controllerVM.wait_for_unit("neutron-server.service") 249 | controllerVM.wait_for_unit("nova-scheduler.service") 250 | controllerVM.wait_for_unit("nova-conductor.service") 251 | 252 | assert wait_for_openstack() 253 | 254 | controllerVM.succeed("systemctl start nova-host-discovery.service") 255 | controllerVM.wait_for_unit("nova-host-discovery.service") 256 | controllerVM.succeed("systemctl start openstack-create-vm.service") 257 | controllerVM.wait_for_unit("openstack-create-vm.service") 258 | assert wait_for_openstack_vm() 259 | 260 | vm_state = json.loads(controllerVM.succeed("openstack server show test_vm -f json")) 261 | 262 | host = vm_state["OS-EXT-SRV-ATTR:host"] 263 | dst_host = "computeVM2" if host == "computeVM" else "computeVM" 264 | 265 | vm_ip = vm_state["addresses"]["provider"][0] 266 | assert vm_ip.startswith("192.168.44") 267 | 268 | net_ns = wait_for_network_namespace() 269 | assert net_ns != "" 270 | 271 | assert retry_until_succeed(controllerVM, f"ip netns exec {net_ns} ping -c 1 {vm_ip}", 30) 272 | 273 | print(f"Start migration from src: {host} to destination {dst_host}") 274 | controllerVM.succeed(f"openstack server migrate --live-migration --host {dst_host} test_vm") 275 | 276 | assert wait_for_openstack_vm() 277 | 278 | vm_state = json.loads(controllerVM.succeed("openstack server show test_vm -f json")) 279 | assert vm_state["OS-EXT-SRV-ATTR:host"] == dst_host 280 | 281 | assert retry_until_succeed(controllerVM, f"ip netns exec {net_ns} ping -c 1 {vm_ip}", 30) 282 | ''; 283 | } 284 | --------------------------------------------------------------------------------