I believe you are talking about the behavior of swift command ( python-swiftclient) rather than the swift server process itself.
1. Swift proxy server process ( in turn container process) handles PUT and POST verbs separately i.e if you use apis directly,e.g. via curl or python libraries, there will be no logic of doing a POST first and PUT next. 2. swift command line ( python-swiftclient) provides an abstracted way to do things.. in fact it has a single command to post any kind of resource (container/object) and to further ease the effort on user to create container separately and update it, its providing an unified interface. its just usability choice the devs had chosen i believe. May be one of authors can comment more on it. -- Keshava On Fri, Aug 1, 2014 at 11:04 AM, Ashish Chandra < [email protected]> wrote: > Hi All, > > While creating a new container in Swift, it first tries to do a POST > operation thinking it is for updating the metadata, once it get 404 > response(container doesnot exists) then it goes for creation of container > (PUT request). > > I feel like its a two way process, making two different HTTP calls one > after the another. Instead what could have been done, we could have simply > used PUT verb after checking the parameters(header dict will be empty if a > user wants to create a container). > > I want to know is there is a specific design decision behind this. > > -- > > .- <O> -. .-====-. ,-------. .-=<>=-. > /_-\'''/-_\ / / '' \ \ |,-----.| /__----__\ > |/ o) (o \| | | ')(' | | /,'-----'.\ |/ (')(') \| > \ ._. / \ \ / / {_/(') (')\_} \ __ / > ,>-_,,,_-<. >'=jf='< `. _ .' ,'--__--'. > / . \ / \ /'-___-'\ / :| \ > (_) . (_) / \ / \ (_) :| (_) > \_-----'____--/ (_) (_) (_)_______(_) |___:|____| > \___________/ |________| \_______/ |_________| > > > Thanks and Regards > > Ashish Chandra > > Openstack Developer, Cloud Engineering > > Reliance Jio > > > _______________________________________________ > Mailing list: > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > Post to : [email protected] > Unsubscribe : > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack > >
_______________________________________________ Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack Post to : [email protected] Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
