Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-938

bulk-delete parameters do not start with "/"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: jclouds-blobstore
    • Labels:

      Description

      Swift bulk delete specifies that the arguments to the bulk-delete call should start with "/":

      The objects specified in the POST request body must be URL encoded and in the form:

      /container_name/obj_name

      or for a container (which must be empty at time of delete)

      /container_name

      http://docs.openstack.org/developer/swift/middleware.html

      jclouds currently does the following:

      RegionScopedSwiftBlobStore.java
      349    @Override
      350    public void removeBlobs(String container, Iterable<String> names) {
      351       BulkApi bulkApi = api.getBulkApi(regionId);
      352       for (List<String> partition : Iterables.partition(names, 1000)) {
      353          ImmutableList.Builder<String> builder = ImmutableList.builder();
      354          for (String name : partition) {
      355             builder.add(container + "/" + name);
      356          }
      357          bulkApi.bulkDelete(builder.build());
      358       }
      359    }
      

      Is there any objection to prepending "/"?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              timuralp Timur Alperovich
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: