| Total Complexity | 1 |
| Total Lines | 12 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | from lib.actions import BaseAction |
||
| 8 | class GetObjectCDNURL(BaseAction): |
||
| 9 | api_type = 'storage' |
||
| 10 | |||
| 11 | def run(self, credentials, container_name, object_name): |
||
| 12 | driver = self._get_driver_for_credentials(credentials=credentials) |
||
| 13 | |||
| 14 | obj = driver.get_object(container_name=container_name, |
||
| 15 | object_name=object_name) |
||
| 16 | object_cdn_url = driver.get_object_cdn_url(obj=obj) |
||
| 17 | |||
| 18 | result = {'url': object_cdn_url} |
||
| 19 | return result |
||
| 20 |