Skip to content

Commit

Permalink
pythonPackages: Add OpenStack Octavia client and Neutron bindings (#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Sep 1, 2024
2 parents 1f138b8 + 21d76a4 commit d719f51
Show file tree
Hide file tree
Showing 8 changed files with 313 additions and 0 deletions.
1 change: 1 addition & 0 deletions maintainers/team-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,7 @@ with lib.maintainers;
members = [
SuperSandro2000
anthonyroussel
vinetos
];
scope = "Maintain the ecosystem around OpenStack";
shortName = "OpenStack";
Expand Down
2 changes: 2 additions & 0 deletions pkgs/development/python-modules/doc8/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ buildPythonPackage rec {

nativeCheckInputs = [ pytestCheckHook ];

pythonRelaxDeps = [ "docutils" ];

pythonImportsCheck = [ "doc8" ];

meta = with lib; {
Expand Down
62 changes: 62 additions & 0 deletions pkgs/development/python-modules/os-client-config/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
lib,
buildPythonPackage,
fetchPypi,
fixtures,
hacking,
jsonschema,
openstacksdk,
oslotest,
python-glanceclient,
setuptools,
stestr,
subunit,
testscenarios,
testtools,
}:

buildPythonPackage rec {
pname = "os-client-config";
version = "2.1.0";
pyproject = true;

src = fetchPypi {
inherit pname version;
hash = "sha256-q8OKNR+MAG009+5fP2SN5ePs9kVcxdds/YidKRzfP04=";
};

build-system = [ setuptools ];

dependencies = [
openstacksdk
python-glanceclient
];

nativeCheckInputs = [
hacking
fixtures
jsonschema
subunit
oslotest
stestr
testscenarios
testtools
];

checkPhase = ''
runHook preCheck
stestr run
runHook postCheck
'';

pythonImportsCheck = [ "os_client_config" ];

meta = with lib; {
homepage = "https://opendev.org/openstack/os-client-config";
description = "Collect client configuration for using OpenStack in consistent and comprehensive manner";
license = licenses.asl20;
maintainers = teams.openstack.members;
};
}
51 changes: 51 additions & 0 deletions pkgs/development/python-modules/osprofiler/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
lib,
buildPythonPackage,
fetchPypi,
netaddr,
oslo-concurrency,
oslo-serialization,
oslo-utils,
prettytable,
requests,
setuptools,
webob,
}:

buildPythonPackage rec {
pname = "osprofiler";
version = "4.1.0";
pyproject = true;

src = fetchPypi {
inherit pname version;
hash = "sha256-V4N7YgWBsTREouIFZHddT8c+/2fHiIr5mUftWC/lFLA=";
};

build-system = [ setuptools ];

dependencies = [
netaddr
oslo-concurrency
oslo-serialization
oslo-utils
prettytable
requests
webob
];

# NOTE(vinetos): OSProfiler depends on jeager-client which use opentracing
# Opentracing and jeager-client are archived since 2022.
# As this package is made only to support old OpenStack clients and bindings,
# We do not really care
doCheck = false;

pythonImportsCheck = [ "osprofiler" ];

meta = with lib; {
description = "OpenStack Library to profile request between all involved services";
homepage = "https://opendev.org/openstack/osprofiler/";
license = licenses.asl20;
maintainers = teams.openstack.members;
};
}
98 changes: 98 additions & 0 deletions pkgs/development/python-modules/python-neutronclient/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
# Build and Runtime
pbr,
cliff,
debtcollector,
iso8601,
netaddr,
openstacksdk,
osc-lib,
oslo-i18n,
oslo-log,
oslo-serialization,
oslo-utils,
os-client-config,
keystoneauth1,
python-keystoneclient,
requests,
hacking,
# Tests
fixtures,
oslotest,
osprofiler,
python-openstackclient,
subunit,
requests-mock,
stestr,
testtools,
testscenarios,
tempest,
}:

buildPythonPackage rec {
pname = "python-neutronclient";
version = "11.3.1";
pyproject = true;

src = fetchPypi {
inherit pname version;
hash = "sha256-U82ZI/Q6OwdypA41YfdGVa3IA4+QJhqz3gW2IR0S7cs=";
};

build-system = [
setuptools
pbr
];

dependencies = [
cliff
debtcollector
iso8601
netaddr
openstacksdk
osc-lib
oslo-i18n
oslo-log
oslo-serialization
oslo-utils
os-client-config
keystoneauth1
python-keystoneclient
requests
];

nativeCheckInputs = [
hacking
fixtures
oslotest
osprofiler
python-openstackclient
subunit
requests-mock
stestr
testtools
testscenarios
tempest
];

checkPhase = ''
runHook preCheck
stestr run
runHook postCheck
'';

pythonImportsCheck = [ "neutronclient" ];

meta = with lib; {
description = "Python bindings for the OpenStack Networking API";
homepage = "https://opendev.org/openstack/python-neutronclient/";
license = licenses.asl20;
maintainers = teams.openstack.members;
};
}
89 changes: 89 additions & 0 deletions pkgs/development/python-modules/python-octaviaclient/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
lib,
buildPythonPackage,
cliff,
doc8,
docutils,
fetchPypi,
hacking,
keystoneauth1,
openstackclient,
openstackdocstheme,
osc-lib,
oslotest,
oslo-serialization,
oslo-utils,
pbr,
pygments,
python-neutronclient,
requests,
requests-mock,
setuptools,
sphinx,
sphinxcontrib-apidoc,
stestr,
subunit,
testscenarios,
}:

buildPythonPackage rec {
pname = "python-octaviaclient";
version = "3.7.0";
pyproject = true;

src = fetchPypi {
inherit pname version;
hash = "sha256-wAGxByeRBOwdWZg2DwVpt1yGi5er3KQ/qhyRVAwaKe4=";
};

build-system = [
setuptools
pbr
];

nativeBuildInputs = [
openstackdocstheme
sphinx
sphinxcontrib-apidoc
];

dependencies = [
cliff
keystoneauth1
python-neutronclient
openstackclient
osc-lib
oslo-serialization
oslo-utils
requests
];

nativeCheckInputs = [
hacking
requests-mock
doc8
docutils
pygments
subunit
oslotest
stestr
testscenarios
];

checkPhase = ''
runHook preCheck
stestr run
runHook postCheck
'';

pythonImportsCheck = [ "octaviaclient" ];

meta = with lib; {
description = "OpenStack Octavia Command-line Client";
homepage = "https://opendev.org/openstack/python-octaviaclient/";
license = licenses.asl20;
maintainers = teams.openstack.members;
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
python-ironicclient,
python-keystoneclient,
python-manilaclient,
python-neutronclient,
python-openstackclient,
requests-mock,
requests,
Expand Down Expand Up @@ -73,6 +74,7 @@ buildPythonPackage rec {
python-heatclient
python-ironicclient
python-manilaclient
python-neutronclient
];
};
tests.version = testers.testVersion {
Expand Down
8 changes: 8 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9709,6 +9709,8 @@ self: super: with self; {

orvibo = callPackage ../development/python-modules/orvibo { };

os-client-config = callPackage ../development/python-modules/os-client-config { };

os-service-types = callPackage ../development/python-modules/os-service-types { };

osc = callPackage ../development/python-modules/osc { };
Expand Down Expand Up @@ -9755,6 +9757,8 @@ self: super: with self; {

ospd = callPackage ../development/python-modules/ospd { };

osprofiler = callPackage ../development/python-modules/osprofiler { };

osqp = callPackage ../development/python-modules/osqp { };

oss2 = callPackage ../development/python-modules/oss2 { };
Expand Down Expand Up @@ -10581,6 +10585,8 @@ self: super: with self; {

python-motionmount = callPackage ../development/python-modules/python-motionmount { };

python-octaviaclient = callPackage ../development/python-modules/python-octaviaclient { };

python-otbr-api = callPackage ../development/python-modules/python-otbr-api { };

python-openems = callPackage ../development/python-modules/python-openems { };
Expand Down Expand Up @@ -13009,6 +13015,8 @@ self: super: with self; {

python-mystrom = callPackage ../development/python-modules/python-mystrom { };

python-neutronclient = callPackage ../development/python-modules/python-neutronclient { };

python-nest = callPackage ../development/python-modules/python-nest { };

pythonnet = callPackage ../development/python-modules/pythonnet { };
Expand Down

0 comments on commit d719f51

Please sign in to comment.