Azure / azure-storage-python

Microsoft Azure Storage Library for Python
https://azure-storage.readthedocs.io
MIT License
339 stars 241 forks source link

azure.storage.StorageServiceProperties.Cors &(.CorsProperties) is missing #13

Closed crwilcox closed 8 years ago

crwilcox commented 9 years ago

Description:

Original Issue: https://github.com/Azure/azure-sdk-for-python/issues/191

Comments (3):

@huguesv commented on 2014-08-18 16:54:32:

http://msdn.microsoft.com/en-us/library/azure/dn535601.aspx

@ahmetalpbalkan commented on 2014-08-18 16:57:51:

I know the request but I couldn't create Cors or CorsProperties instances because there are no such classes, therefore I don't know what to pass to set_blob_service_properties() , could you provide an example please?

@huguesv commented on 2014-08-18 18:00:14:

Sorry, that link was just for reference, for when someone gets to implementing this feature.

Adding support for CORS requires changing the target x-ms-version to '2013-08-15', which turns this in a much bigger task than if the version stayed the same. In every revision, there are potential breaking changes in the XML format sent/received to/from Azure.

From what I can see, the way metrics are represented in 2013-08-15 has changed: http://msdn.microsoft.com/en-us/library/azure/hh452235.aspx.

There are potentially more, we'll need to review the docs and run all the tests to find out.

To adapt StorageServiceProperties to return the new CORS properties, you'll need to make the data classes match the XML returned by Azure. When there are lists involved, like in this case, it's a little more complex. You can see an example of object models with lists in azure.servicemanagement.AffinityGroup, which contains StorageServices and HostedServices.

ahmetb commented 9 years ago

eh I guess the issue migrator didn't handle the multi-paragraph quoting well :)

crwilcox commented 9 years ago

It would appear not. It was after all done by a script I whipped together in a few minutes. A manual fix will have to do ;)

jehine-MSFT commented 8 years ago

Hello @ahmetalpbalkan,

We have added support for CORS and it will be included in our next major release. Thanks for the feedback and we hope you enjoy all the new features for that release!

timfpark commented 8 years ago

Is this released? If so, is this documented anywhere?

emgerner-msft commented 8 years ago

Nope, planned release is by end of month, but it will likely happen a bit sooner (maybe next week, but don't bet on it yet). You can see all of the work in the dev branch.

jehine-MSFT commented 8 years ago

Hello @ahmetalpbalkan , @timfpark , & @crwilcox ,

We have released the 0.30 version (#132) which addressed this feature request. If you have issues with the new version in regards to this issue, please reopen it and continue the discussion.

Thanks!