{"action":"created","issue":{"url":"https://api.github.com/repos/fog/fog-azure-rm/issues/108","repository_url":"https://api.github.com/repos/fog/fog-azure-rm","labels_url":"https://api.github.com/repos/fog/fog-azure-rm/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/fog/fog-azure-rm/issues/108/comments","events_url":"https://api.github.com/repos/fog/fog-azure-rm/issues/108/events","html_url":"https://github.com/fog/fog-azure-rm/issues/108","id":172564097,"number":108,"title":"The API to Storage doesn't match other providers","user":{"login":"dsboulder","id":15046,"avatar_url":"https://avatars.githubusercontent.com/u/15046?v=3","gravatar_id":"","url":"https://api.github.com/users/dsboulder","html_url":"https://github.com/dsboulder","followers_url":"https://api.github.com/users/dsboulder/followers","following_url":"https://api.github.com/users/dsboulder/following{/other_user}","gists_url":"https://api.github.com/users/dsboulder/gists{/gist_id}","starred_url":"https://api.github.com/users/dsboulder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsboulder/subscriptions","organizations_url":"https://api.github.com/users/dsboulder/orgs","repos_url":"https://api.github.com/users/dsboulder/repos","events_url":"https://api.github.com/users/dsboulder/events{/privacy}","received_events_url":"https://api.github.com/users/dsboulder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-22T21:52:07Z","updated_at":"2016-08-29T17:42:21Z","closed_at":null,"body":"We're trying to make it possible to use azure storage the same way we use AWS or GCP, which is documented at http://fog.io/storage/.  Unfortunately the methods and objects in the azure storage models don't match the other Fog providers.  Would it be possible to implement the standard `directories` and `files` concept?  A proposed set of API calls would be like so:\r\n\r\n```\r\nazure_storage_service = Fog::Storage.new(\r\n  :provider => 'AzureRM',\r\n  :azure_storage_account_name => '<StorageAccountName>'           # Name of an Azure Storage Account\r\n  :azure_storage_access_key => '<StorageAccountKey>'              # Key of an Azure Storage Account\r\n)\r\n\r\nazure_storage_service.directories  # should list a bunch of blob \"containers\"\r\nazure_storage_service.directories.create('newcontainer') # should make a container\r\nazure_storage_service.directories.get('mycontainer').files  # should list blobs\r\nazure_storage_service.directories.get('mycontainer').files.create(\r\n  key: 'some/path/file.txt',\r\n  body: File.open('localfile.txt'),\r\n  public: true|false\r\n)  # should upload a blob\r\nazure_storage_service.directories.get('mycontainer').files.all # returns all blobs\r\nazure_storage_service.directories.get('mycontainer', prefix: 'some/path').files  # returns all blobs under some/path\r\nazure_storage_service.directories.get('mycontainer').files.head('some/path/file.txt') # returns a File object but doesn't download it\r\nazure_storage_service.directories.get('mycontainer').files.get('some/path/file.txt') # returns a File object and downloads its body\r\nazure_storage_service.directories.get('mycontainer').files.head('some/path/file.txt').public_url(Time.now + 3600) # returns a signed URL good for anonymous download for the next hour\r\nazure_storage_service.directories.get('mycontainer').files.get('some/path/file.txt').destroy # delete a blob\r\n```\r\n\r\nI know it's a lot of work to change the API, but this would allow you to be used with codebases that are used to using Rackspace, Openstack, GCP, AWS, etc.  What you all think?\r\n"},"comment":{"url":"https://api.github.com/repos/fog/fog-azure-rm/issues/comments/243197185","html_url":"https://github.com/fog/fog-azure-rm/issues/108#issuecomment-243197185","issue_url":"https://api.github.com/repos/fog/fog-azure-rm/issues/108","id":243197185,"user":{"login":"dsboulder","id":15046,"avatar_url":"https://avatars.githubusercontent.com/u/15046?v=3","gravatar_id":"","url":"https://api.github.com/users/dsboulder","html_url":"https://github.com/dsboulder","followers_url":"https://api.github.com/users/dsboulder/followers","following_url":"https://api.github.com/users/dsboulder/following{/other_user}","gists_url":"https://api.github.com/users/dsboulder/gists{/gist_id}","starred_url":"https://api.github.com/users/dsboulder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsboulder/subscriptions","organizations_url":"https://api.github.com/users/dsboulder/orgs","repos_url":"https://api.github.com/users/dsboulder/repos","events_url":"https://api.github.com/users/dsboulder/events{/privacy}","received_events_url":"https://api.github.com/users/dsboulder/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T17:42:21Z","updated_at":"2016-08-29T17:42:21Z","body":"@abbas-sheikh-confiz I'm going to try to bring this up to @abelhu and Ning and Gil, the people we're working with at Microsoft to support Cloud Foundry.  Maybe they can help get y'all resources, I'm sure you've got a big backlog of work on fog azure.  "}}
{"actor":{"display_login":"dsboulder"}}