Comments (9)
Ok I will dive deeper. I will also get a fix to support a trailing / on the base url as well. I'll link the PR to this issue so we can test.
from clean_up_snapshots.
@tmonck hey, np.
Tested, works ok now with and without back slash.
from clean_up_snapshots.
I'll take a look at this tomorrow. I am away from a computer at the moment. I'll also work on providing the example requested.
from clean_up_snapshots.
So I quickly double checked but line you referenced says that if it's not an ip address then to compare the scheme of the parsed url. Can you please provide the config for that you are using? Using the url you provided in the issue of 'http://hassio:8123' would result in a false value for ssl. I will look at getting an example up in the next day or so.
from clean_up_snapshots.
Hey, thanks for looking at this so quickly.
The code right now is:
# Check if the url is an ip address
result = not isgoodipv4(urlPieces.netloc)
# If url is not an ip address then check
return result or urlPieces.scheme == "https"
so if url == 'http://hassio:8123'
then result = true
so return will not even evaluate the scheme. Maybe you meant to use 'and' instead of 'or' or not use a 'not' with isgoodipv4.
Original intention is not clear.
from clean_up_snapshots.
@ayavilevich I have opened a PR. If you want to take a peek. It will now have support for a trailing /
as well I believe I have resolved the bug with the ssl issue. You were correct that It was force SSL when not using an IP Address which was a mistake great catch!
For a note the reason I have support of not always using the scheme of the URL is because there is times where someone may what to use the ip address with a scheme of https
yet the cert is not valid for the IP Address and is actually for their public URL. To support this I added a new configuration value which can allow you to let an IP Address to validate the cert. I have default it to off.
from clean_up_snapshots.
@tmonck I tried the branch.
Hostname works now. But I had to use "hassio.lan" as the host part in the url. You might want to add an example for that specifically. I supposed this is due to the way docker containers work.
Terminating '/' doesn't work. I also don't see any changes in the code to address that. Currently code will try to access: "http://hassio.lan:8123//api/hassio/snapshots" which will be invalid.
You might want to modify around hassio_url = '{}/api/hassio/'.format(conf.get(CONF_HOST))
.
from clean_up_snapshots.
Apparently I blew away the change I had for the trailing / I'll push up that fix now. I'll also add the example using lan and mention this issue as a reference. Not sure why it would require the .lan
portion.
from clean_up_snapshots.
PR is updated @ayavilevich if you wouldn't mind trying once more. If the trailing slash is working I'll get a release and some release notes together.
from clean_up_snapshots.
Related Issues (20)
- Error while executing automation automation.daily_snapshot_clean_up. Unknown error for call_service at pos 1: HOT 15
- Thanks HOT 1
- Typo in module call 'dateutil'?
- Unable to remove snapshots after 0.4 HOT 6
- Error with deleting snapshots HOT 3
- No 'version' key in the manifest file HOT 9
- Error on new HA 2021.6 HOT 7
- Align to HA Code Dev HOT 1
- Errors in logs HOT 4
- Update needed to address /backups change HOT 3
- 404 finding remove path HOT 4
- Backups location has changed HOT 2
- Not working since 2023.3.3? HOT 7
- Dependency Dashboard
- Rename service to not include the word snapshots
- Migrate to ConfigFlow HOT 1
- Import is not bringing current configuration
- The 'clean_up_snapshots_service' option near /config/configuration.yaml:1 is deprecated HOT 5
- Missing Icon HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clean_up_snapshots.