| Total Complexity | 2 |
| Total Lines | 13 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | from lib.base import DockerBasePythonAction |
||
| 9 | class DockerPullImageAction(DockerBasePythonAction): |
||
| 10 | def run(self, repo, tag=None, insecure_registry=False, |
||
| 11 | auth_username_override=None, auth_password_override=None): |
||
| 12 | auth_override = (auth_username_override and auth_password_override) |
||
| 13 | |||
| 14 | if auth_override: |
||
| 15 | auth_config = {} |
||
| 16 | auth_config['username'] = auth_username_override |
||
| 17 | auth_config['password'] = auth_password_override |
||
| 18 | return self.wrapper.pull(repo=repo, tag=tag, insecure_registry=insecure_registry, |
||
| 19 | auth_config=auth_config) |
||
| 20 | else: |
||
| 21 | return self.wrapper.pull(repo=repo, tag=tag, insecure_registry=insecure_registry) |
||
| 22 |