Method
get_url
(
self,
auto_connect: bool = True,
view_only: bool = False,
resize: str = "scale",
auth_key: Optional[str] = None,
)
Source from the content-addressed store, hash-verified
| 115 | return "".join(secrets.choice(characters) for _ in range(length)) |
| 116 | |
| 117 | def get_url( |
| 118 | self, |
| 119 | auto_connect: bool = True, |
| 120 | view_only: bool = False, |
| 121 | resize: str = "scale", |
| 122 | auth_key: Optional[str] = None, |
| 123 | ) -> str: |
| 124 | params = [] |
| 125 | if auto_connect: |
| 126 | params.append("autoconnect=true") |
| 127 | if view_only: |
| 128 | params.append("view_only=true") |
| 129 | if resize: |
| 130 | params.append(f"resize={resize}") |
| 131 | if auth_key: |
| 132 | params.append(f"password={auth_key}") |
| 133 | if params: |
| 134 | return f"{self._url}?{'&'.join(params)}" |
| 135 | return self._url |
| 136 | |
| 137 | def get_auth_key(self) -> str: |
| 138 | if not self._novnc_password: |
Tested by
no test coverage detected