Skip to content

Commit a13097d

Browse files
authored
Merge pull request #137 from QualiSystems/dev
Release 7.0.0
2 parents c7c71b9 + d48fa7d commit a13097d

File tree

90 files changed

+89627
-14295
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+89627
-14295
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: check version
2+
on:
3+
pull_request:
4+
paths-ignore:
5+
- README.md
6+
branches:
7+
- master
8+
jobs:
9+
check-version:
10+
uses: QualiSystems/.github/.github/workflows/package-check-version.yml@master
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: deploy package
2+
on:
3+
release:
4+
types: [ published ]
5+
jobs:
6+
tox-ci:
7+
uses: QualiSystems/.github/.github/workflows/package-tox-py-37-39.yml@master
8+
pypi-deploy:
9+
needs: tox-ci
10+
uses: QualiSystems/.github/.github/workflows/package-deploy-pypi.yml@master
11+
secrets: inherit
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: github release
2+
on:
3+
push:
4+
paths-ignore:
5+
- README.md
6+
branches:
7+
- master
8+
jobs:
9+
tox-ci:
10+
uses: QualiSystems/.github/.github/workflows/package-tox-py-37-39.yml@master
11+
pypi-deploy:
12+
needs: tox-ci
13+
uses: QualiSystems/.github/.github/workflows/package-github-release.yml@master

.github/workflows/package.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: package CI
2+
on:
3+
push:
4+
paths-ignore:
5+
- README.md
6+
branches-ignore:
7+
- master
8+
jobs:
9+
tox-ci:
10+
uses: QualiSystems/.github/.github/workflows/package-tox-py-37-39.yml@master

.github/workflows/py2-py3-packages-ci.yml

Lines changed: 0 additions & 190 deletions
This file was deleted.

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,6 @@ tests/networking/cisco/autoload/autoload_structure.py
7070

7171
.idea/
7272
/tests/integration
73+
74+
/integration_tests
75+
/bkp-mib

.pre-commit-config.yaml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
repos:
2-
- repo: https://github.com/pre-commit/mirrors-isort
3-
rev: v4.3.21
2+
- repo: https://github.com/asottile/pyupgrade
3+
rev: v3.3.1
4+
hooks:
5+
- id: pyupgrade
6+
args:
7+
- "--py37-plus"
8+
- repo: https://github.com/timothycrosley/isort
9+
rev: 5.12.0
410
hooks:
511
- id: isort
6-
language_version: python3.7
7-
exclude: '/mibs'
812
- repo: https://github.com/python/black
9-
rev: 19.3b0
13+
rev: 23.3.0
1014
hooks:
1115
- id: black
12-
language_version: python3.7
1316
exclude: '/mibs'
14-
- repo: https://gitlab.com/pycqa/flake8
15-
rev: 3.7.8
17+
- repo: https://github.com/pycqa/flake8
18+
rev: 5.0.4
1619
hooks:
1720
- id: flake8
1821
additional_dependencies: [
@@ -22,5 +25,4 @@ repos:
2225
flake8-print,
2326
flake8-eradicate,
2427
]
25-
language_version: python3.7
2628
exclude: '/mibs'

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
include *.txt
22
global-include *.csv
33
global-include *.ini
4+
global-include *.json
45
prune .tox
Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,38 @@
1-
#!/usr/bin/python
2-
# -*- coding: utf-8 -*-
1+
from functools import lru_cache
2+
33
from cloudshell.snmp.autoload.generic_snmp_autoload import GenericSNMPAutoload
44

5-
from cloudshell.networking.cisco.autoload.cisco_if_table import CiscoIfTable
5+
from cloudshell.networking.cisco.autoload.snmp_tables.cisco_snmp_port_table import (
6+
CiscoSnmpPortsTable,
7+
)
8+
from cloudshell.networking.cisco.autoload.table_services.cisco_ports_table import (
9+
CiscoPortsTable,
10+
)
11+
from cloudshell.networking.cisco.autoload.table_services.cisco_sys_info_table import (
12+
CiscoSnmpSystemInfo,
13+
)
614

715

816
class CiscoGenericSNMPAutoload(GenericSNMPAutoload):
917
@property
10-
def if_table_service(self):
11-
if not self._if_table:
12-
self._if_table = CiscoIfTable(
13-
snmp_handler=self.snmp_handler, logger=self.logger
14-
)
18+
@lru_cache()
19+
def system_info_service(self) -> CiscoSnmpSystemInfo:
20+
"""Get system info service."""
21+
return CiscoSnmpSystemInfo(self.snmp_handler, self.logger)
22+
23+
@property
24+
@lru_cache()
25+
def port_snmp_table(self) -> CiscoSnmpPortsTable:
26+
"""Get port snmp table."""
27+
return CiscoSnmpPortsTable(snmp_handler=self.snmp_handler, logger=self.logger)
1528

16-
return self._if_table
29+
@property
30+
def port_table_service(self) -> CiscoPortsTable:
31+
"""Get port table service."""
32+
if not self._port_table_service:
33+
self._port_table_service = CiscoPortsTable(
34+
resource_model=self._resource_model,
35+
ports_snmp_table=self.port_snmp_table,
36+
logger=self.logger,
37+
)
38+
return self._port_table_service

cloudshell/networking/cisco/autoload/cisco_if_table.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)