Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new device tracker supporting Fortinet FortiGate #23078

Merged
merged 51 commits into from Jul 23, 2019

Conversation

@kimfrellsen
Copy link
Contributor

commented Apr 13, 2019

Description:

New device tracker supporting Fortinet FortiOS. This small component is using the device_tracker platform. This code is very similar to other device_tracker components.

Docs PR:

home-assistant/home-assistant.io#9044

Example entry for configuration.yaml (if applicable):

device_tracker:
  - platform: fortios
    host: 192.168.1.1
    token: YOUR_FORTGATE_API_TOKEN

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly (example).
  • New dependencies have been added to requirements in the manifest (example).
  • New dependencies are only imported inside functions that use them (example).
  • New or updated dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

kimfrellsen added some commits Mar 23, 2019

Create device_tracker.py
initial version
Update device_tracker.py
set verify SSL to false as default. Normally users do not have a verified certificate at home
Update device_tracker.py
pep8 compliant
Update device_tracker.py
upgraded fortiosapi requirements

kimfrellsen added some commits Apr 13, 2019

Update .coveragerc
added fortios
Update device_tracker.py
circle ci, blank line required
Update manifest.json
removed code owners
Update manifest.json
removed dependencies
Update manifest.json
removed codeowners
Update requirements_all.txt
added fortios
Update device_tracker.py
pylint corrections
Update device_tracker.py
pylint exceptions
Update device_tracker.py
disable pylint broad exceptions
Update device_tracker.py
removed pointless string statements

kimfrellsen added some commits Apr 25, 2019

Update CODEOWNERS
added kimfrellsen as codeowner
fortiosapi 0.10.8
Updated to use latest version of fortiosapi 0.10.8
Update requirements_all.txt
updated fortiosapi to 0.10.8
@kimfrellsen

This comment has been minimized.

Copy link
Contributor Author

commented Jun 11, 2019

Hi!

What is the process for having a pull-request accepted?
The component is ready for passed all checks and is ready for prime time.

BR
/Kim

homeassistant/components/fortios/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/fortios/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/fortios/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/fortios/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/fortios/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/fortios/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/fortios/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/fortios/device_tracker.py Outdated Show resolved Hide resolved
homeassistant/components/fortios/device_tracker.py Outdated Show resolved Hide resolved

@MartinHjelmare MartinHjelmare changed the title new device tracker supporting Fortinet FortiGate Add new device tracker supporting Fortinet FortiGate Jun 26, 2019

Update device_tracker.py
fixed some requests.
@codecov

This comment was marked as off-topic.

Copy link

commented Jul 22, 2019

Codecov Report

Merging #23078 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev   #23078   +/-   ##
=======================================
  Coverage   94.09%   94.09%           
=======================================
  Files         452      452           
  Lines       36795    36795           
=======================================
  Hits        34623    34623           
  Misses       2172     2172

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2f89f88...ca59b93. Read the comment docs.

@codecov

This comment was marked as off-topic.

Copy link

commented Jul 22, 2019

Codecov Report

Merging #23078 into dev will increase coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #23078      +/-   ##
==========================================
+ Coverage   94.02%   94.09%   +0.07%     
==========================================
  Files         538      452      -86     
  Lines       41288    36795    -4493     
==========================================
- Hits        38820    34623    -4197     
+ Misses       2468     2172     -296
Impacted Files Coverage Δ
homeassistant/components/owntracks/config_flow.py 44.82% <0%> (-41.66%) ⬇️
homeassistant/components/mqtt/fan.py 74.19% <0%> (-23.78%) ⬇️
homeassistant/bootstrap.py 59.25% <0%> (-21.49%) ⬇️
...omeassistant/components/locative/device_tracker.py 86.66% <0%> (-11.01%) ⬇️
homeassistant/components/hassio/ingress.py 67.76% <0%> (-10.29%) ⬇️
...omeassistant/components/geofency/device_tracker.py 85.71% <0%> (-10.07%) ⬇️
homeassistant/components/config/script.py 90% <0%> (-10%) ⬇️
homeassistant/components/axis/device.py 93.02% <0%> (-6.98%) ⬇️
...meassistant/components/owntracks/device_tracker.py 91% <0%> (-6.19%) ⬇️
homeassistant/components/alexa/smart_home.py 93.96% <0%> (-6.04%) ⬇️
... and 258 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7cf0684...19d31e1. Read the comment docs.

@MartinHjelmare

This comment has been minimized.

Copy link
Member

commented Jul 22, 2019

Please rebase on latest dev branch to solve the merge conflicts.

kimfrellsen added some commits Jul 23, 2019

Update device_tracker.py
better exception handling.
Update device_tracker.py
exception handling
Update device_tracker.py
corrected exception handling
Update device_tracker.py
exception handling.
Update device_tracker.py
lint corrections
Update device_tracker.py
removed broad exception.
Update device_tracker.py
fix lint errors
@MartinHjelmare
Copy link
Member

left a comment

Just some small comments remaining.

Update device_tracker.py
minor changes, mostly cosmetic
@MartinHjelmare
Copy link
Member

left a comment

Great!

@MartinHjelmare

This comment has been minimized.

Copy link
Member

commented Jul 23, 2019

Can be merged when build passes.

@kimfrellsen

This comment has been minimized.

Copy link
Contributor Author

commented Jul 23, 2019

Can be merged when build passes.

Thank you so much for great and responsive feedback. I have learned a lot. If time permits it in the future I will add VDOM (virtual domain) support. Looking forward to see what happens when it is deployed and generally available.

@MartinHjelmare MartinHjelmare added this to Reviewer approved in Dev Jul 23, 2019

@MartinHjelmare MartinHjelmare merged commit f5d0f36 into home-assistant:dev Jul 23, 2019

9 checks passed

CI Build #20190723.69 succeeded
Details
CI (FullCheck Mypy) FullCheck Mypy succeeded
Details
CI (FullCheck Pylint) FullCheck Pylint succeeded
Details
CI (Overview Lint) Overview Lint succeeded
Details
CI (Overview Validate) Overview Validate succeeded
Details
CI (Tests PyTest Python35) Tests PyTest Python35 succeeded
Details
CI (Tests PyTest Python36) Tests PyTest Python36 succeeded
Details
CI (Tests PyTest Python37) Tests PyTest Python37 succeeded
Details
cla-bot Everyone involved has signed the CLA

Dev automation moved this from Reviewer approved to Done Jul 23, 2019

@balloob balloob referenced this pull request Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
4 participants
You can’t perform that action at this time.