1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 jinja2,
6 lxml,
7 mock,
8 ncclient,
9 netaddr,
10 nose2,
11 ntc-templates,
12 paramiko,
13 pyparsing,
14 pyserial,
15 pythonOlder,
16 pyyaml,
17 scp,
18 setuptools,
19 pytestCheckHook,
20 six,
21 transitions,
22 yamlordereddictloader,
23}:
24
25buildPythonPackage rec {
26 pname = "junos-eznc";
27 version = "2.7.1";
28 pyproject = true;
29
30 disabled = pythonOlder "3.8";
31
32 src = fetchFromGitHub {
33 owner = "Juniper";
34 repo = "py-junos-eznc";
35 rev = "refs/tags/${version}";
36 hash = "sha256-aoi+in5A8qSdQNY3V4S4wBBfPchR1an7G6GQHDhgxpQ=";
37 };
38
39 build-system = [ setuptools ];
40
41 dependencies = [
42 jinja2
43 lxml
44 ncclient
45 netaddr
46 ntc-templates
47 paramiko
48 pyparsing
49 pyserial
50 pyyaml
51 scp
52 six
53 transitions
54 yamlordereddictloader
55 ];
56
57 nativeCheckInputs = [
58 mock
59 nose2
60 pytestCheckHook
61 ];
62
63 pytestFlagsArray = [ "tests/unit" ];
64
65 disabledTests = [
66 # jnpr.junos.exception.FactLoopError: A loop was detected while gathering the...
67 "TestPersonality"
68 "TestGetSoftwareInformation"
69 "TestIfdStyle"
70 # KeyError: 'mac'
71 "test_textfsm_table_mutli_key"
72 # AssertionError: None != 'juniper.net'
73 "test_domain_fact_from_config"
74 ];
75
76 pythonImportsCheck = [ "jnpr.junos" ];
77
78 meta = with lib; {
79 description = "Junos 'EZ' automation for non-programmers";
80 homepage = "https://github.com/Juniper/py-junos-eznc";
81 changelog = "https://github.com/Juniper/py-junos-eznc/releases/tag/${version}";
82 license = licenses.asl20;
83 maintainers = with maintainers; [ xnaveira ];
84 };
85}