Skip to content
This repository has been archived by the owner on Aug 20, 2022. It is now read-only.

How to get cdn_url - Not getting cdn_url None #42

Open
ashokrkm opened this issue Jun 10, 2015 · 1 comment
Open

How to get cdn_url - Not getting cdn_url None #42

ashokrkm opened this issue Jun 10, 2015 · 1 comment

Comments

@ashokrkm
Copy link

what is the right way to get cdn_url from object_storage?
after doing prime_cd and get_info, cdn_url is None

  >>> sl_storage = object_storage.get_client('###', '###',datacenter='sjc01')
  >>> f=c['YUk1-27-Apr-15-10-33-04.xml']
  >>> f.prime_cdn()
  f<object_storage.transport.Response object at 0x7f65480ac5d0>
  >>> f.get_info()
  {'cdn_url': None, 'hash': '74be24b6ddb41357275dd3ad2a2f4cc9', 'name': 'YUk1-27-Apr-15-10-33-04.xml', 'url': u'https://sjc01.objectstorage.softlayer.net/v1/AUTH_e3f9614e-c713-4151-a633-45d4a4d1381b/foo/YUk1-27-Apr-15-10-33-04.xml', 'cdn_ssl_url': None, 'manifest': None, 'last_modified': 'Wed, 10 Jun 2015 17:47:26 GMT', 'meta': {}, 'content_encoding': None, 'content_type': 'text/xml', 'path': 'foo/YUk1-27-Apr-15-10-33-04.xml', 'container': 'foo', 'cache_control': None, 'size': 2536}
  >>> f=c['YUk1-27-Apr-15-10-33-04.xml']
  >>> f.get_info()
  {'cdn_url': None, 'hash': '74be24b6ddb41357275dd3ad2a2f4cc9', 'name': 'YUk1-27-Apr-15-10-33-04.xml', 'url': u'https://sjc01.objectstorage.softlayer.net/v1/AUTH_e3f9614e-c713-4151-a633-45d4a4d1381b/foo/YUk1-27-Apr-15-10-33-04.xml', 'cdn_ssl_url': None, 'manifest': None, 'last_modified': 'Wed, 10 Jun 2015 17:47:26 GMT', 'meta': {}, 'content_encoding': None, 'content_type': 'text/xml', 'path': 'foo/YUk1-27-Apr-15-10-33-04.xml', 'container': 'foo', 'cache_control': None, 'size': 2536}
  >>> 
@gtnx
Copy link

gtnx commented Mar 29, 2016

@KCastiglione Use StorageObject.load() instead of .get_info(). There's a cdn flag.

f.load(cdn=True)
f.get_info()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants