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.4";
28 pyproject = true;
29
30 disabled = pythonOlder "3.8";
31
32 src = fetchFromGitHub {
33 owner = "Juniper";
34 repo = "py-junos-eznc";
35 tag = version;
36 hash = "sha256-iuCVfzS8k/TZ58v/OPJfSpIMYwwKRj1zyd4FF/KLjjI=";
37 };
38
39 build-system = [ setuptools ];
40
41 pythonRelaxDeps = [ "ncclient" ];
42
43 dependencies = [
44 jinja2
45 lxml
46 ncclient
47 netaddr
48 ntc-templates
49 paramiko
50 pyparsing
51 pyserial
52 pyyaml
53 scp
54 six
55 transitions
56 yamlordereddictloader
57 ];
58
59 nativeCheckInputs = [
60 mock
61 nose2
62 pytestCheckHook
63 ];
64
65 enabledTestPaths = [ "tests/unit" ];
66
67 disabledTests = [
68 # jnpr.junos.exception.FactLoopError: A loop was detected while gathering the...
69 "TestPersonality"
70 "TestGetSoftwareInformation"
71 "TestIfdStyle"
72 # KeyError: 'mac'
73 "test_textfsm_table_mutli_key"
74 # AssertionError: None != 'juniper.net'
75 "test_domain_fact_from_config"
76 ];
77
78 pythonImportsCheck = [ "jnpr.junos" ];
79
80 meta = with lib; {
81 description = "Junos 'EZ' automation for non-programmers";
82 homepage = "https://github.com/Juniper/py-junos-eznc";
83 changelog = "https://github.com/Juniper/py-junos-eznc/releases/tag/${src.tag}";
84 license = licenses.asl20;
85 maintainers = with maintainers; [ xnaveira ];
86 };
87}