2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, six
|
|
|
|
, scp
|
|
|
|
, pyserial
|
|
|
|
, paramiko
|
|
|
|
, netaddr
|
|
|
|
, ncclient
|
2020-09-25 04:45:31 +00:00
|
|
|
, ntc-templates
|
2020-04-24 23:36:52 +00:00
|
|
|
, lxml
|
|
|
|
, jinja2
|
|
|
|
, pyyaml
|
2020-09-25 04:45:31 +00:00
|
|
|
, transitions
|
|
|
|
, yamlordereddictloader
|
2020-04-24 23:36:52 +00:00
|
|
|
, nose
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "junos-eznc";
|
2021-10-06 13:57:05 +00:00
|
|
|
version = "2.6.3";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-10-06 13:57:05 +00:00
|
|
|
sha256 = "4eee93d0af203af7cee54a8f0c7bd28af683e829edf1fd68feba85d0ad737395";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-06-28 23:13:55 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
|
|
|
--replace "ncclient==0.6.9" "ncclient"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
checkInputs = [ nose ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2020-09-25 04:45:31 +00:00
|
|
|
scp six pyserial paramiko netaddr ncclient ntc-templates lxml jinja2 pyyaml transitions yamlordereddictloader
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
nosetests -v --with-coverage --cover-package=jnpr.junos --cover-inclusive -a unit
|
|
|
|
'';
|
|
|
|
|
2021-08-27 14:25:00 +00:00
|
|
|
pythonImportsCheck = [ "jnpr.junos" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://www.github.com/Juniper/py-junos-eznc";
|
|
|
|
description = "Junos 'EZ' automation for non-programmers";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ xnaveira ];
|
|
|
|
};
|
|
|
|
}
|