def attach_storage(self, server, storage, storage_type, address):
body = {'<STR_LIT>': {}}<EOL>if storage:<EOL><INDENT>body['<STR_LIT>']['<STR_LIT>'] = str(storage)<EOL><DEDENT>if storage_type:<EOL><INDENT>body['<STR_LIT>']['<STR_LIT:type>'] = storage_type<EOL><DEDENT>if address:<EOL><INDENT>body['<STR_LIT>']['<STR_LIT:address>'] = address<EOL><DEDENT>url = '<STR_LIT>'.format(server)<EOL>res = self.post_request(url, body)<EOL>return Storage._create_storage_objs(res['<STR_LIT>']['<STR_LIT>'], cloud_manager=self)<EOL>
Attach a Storage object to a Server. Return a list of the server's storages.