Parses the URL and returns enough arguments that can allow us to re- instantiate this object.
(url)
| 299 | |
| 300 | @staticmethod |
| 301 | def parse_url(url): |
| 302 | """Parses the URL and returns enough arguments that can allow us to re- |
| 303 | instantiate this object.""" |
| 304 | |
| 305 | results = NotifyBase.parse_url(url, verify_host=False) |
| 306 | if not results: |
| 307 | # We're done early as we couldn't load the results |
| 308 | return results |
| 309 | |
| 310 | # Get our entries; split_path() looks after unquoting content for us |
| 311 | # by default |
| 312 | results["targets"] = NotifyPopcornNotify.split_path( |
| 313 | results["fullpath"] |
| 314 | ) |
| 315 | |
| 316 | # The hostname is our authentication key |
| 317 | results["apikey"] = NotifyPopcornNotify.unquote(results["host"]) |
| 318 | |
| 319 | # Support the 'to' variable so that we can support targets this way too |
| 320 | # The 'to' makes it easier to use yaml configuration |
| 321 | if "to" in results["qsd"] and len(results["qsd"]["to"]): |
| 322 | results["targets"] += NotifyPopcornNotify.parse_list( |
| 323 | results["qsd"]["to"] |
| 324 | ) |
| 325 | |
| 326 | # Get Batch Mode Flag |
| 327 | results["batch"] = parse_bool(results["qsd"].get("batch", False)) |
| 328 | |
| 329 | return results |
nothing calls this directly
no test coverage detected