Example #1
0
 def get_resources(self):
     resources = [
         extensions.ResourceExtension('os-hosts',
                                      HostController(),
                                      collection_actions={'update': 'PUT'},
                                      member_actions={
                                          'startup': 'GET',
                                          'shutdown': 'GET',
                                          'reboot': 'GET'
                                      })
     ]
     return resources
Example #2
0
    def _bounce_id(self, test_id):

        class BounceController(object):
            def show(self, req, id):
                return id
        res_ext = extensions.ResourceExtension('bounce',
                                               BounceController())
        manager = StubExtensionManager(res_ext)
        app = router.APIRouter(manager)
        request = webob.Request.blank("/fake/bounce/%s" % test_id)
        response = request.get_response(app)
        return response.body
Example #3
0
    def get_resources(self):
        resources = []
        res = extensions.ResourceExtension(
            Qos_specs_manage.alias,
            QoSSpecsController(),
            member_actions={"associations": "GET",
                            "associate": "GET",
                            "disassociate": "GET",
                            "disassociate_all": "GET"})

        resources.append(res)

        return resources
Example #4
0
 def get_resources(self):
     resources = []
     res = extensions.ResourceExtension(Consistencygroups.alias,
                                        ConsistencyGroupsController(),
                                        collection_actions={
                                            'detail': 'GET',
                                            'create_from_src': 'POST'
                                        },
                                        member_actions={
                                            'delete': 'POST',
                                            'update': 'PUT'
                                        })
     resources.append(res)
     return resources
Example #5
0
 def get_resources(self):
     resources = []
     res = extensions.ResourceExtension(Backups.alias,
                                        BackupsController(),
                                        collection_actions={
                                            'detail': 'GET',
                                            'import_record': 'POST'
                                        },
                                        member_actions={
                                            'restore': 'POST',
                                            'export_record': 'GET'
                                        })
     resources.append(res)
     return resources
Example #6
0
 def get_resources(self):
     controller = VolumeManageController()
     res = extensions.ResourceExtension(Volume_manage.alias, controller)
     return [res]
Example #7
0
 def get_resources(self):
     resources = []
     resource = extensions.ResourceExtension('foxnsocks',
                                             FoxInSocksController())
     resources.append(resource)
     return resources
Example #8
0
 def get_resources(self):
     resources = []
     controller = ServiceController(self.ext_mgr)
     resource = extensions.ResourceExtension('os-services', controller)
     resources.append(resource)
     return resources
Example #9
0
 def get_resources(self):
     controller = SnapshotManageController()
     return [extensions.ResourceExtension(Snapshot_manage.alias,
                                          controller,
                                          collection_actions=
                                          {'detail': 'GET'})]
Example #10
0
 def get_resources(self):
     resources = []
     resource = extensions.ResourceExtension('os-services',
                                             ServiceController())
     resources.append(resource)
     return resources
 def get_resources(self):
     extension = extensions.ResourceExtension(
         "rax-admin",
         RaxAdminController(),
         collection_actions={'action': 'POST'})
     return [extension]
Example #12
0
 def get_resources(self):
     controller = Controller()
     res = extensions.ResourceExtension(Availability_zones.alias,
                                        controller)
     return [res]
Example #13
0
 def get_resources(self):
     resources = []
     res = extensions.ResourceExtension(Snapshot_clonechain.alias,
                                        SnapshotClonechainController())
     resources.append(res)
     return resources
Example #14
0
 def get_resources(self):
     controller = SnapshotManageController()
     return [
         extensions.ResourceExtension(Snapshot_manage.alias, controller)
     ]
 def get_resources(self):
     resources = []
     res = extensions.ResourceExtension(Volume_clonechain.alias,
                                        VolumeClonechainController())
     resources.append(res)
     return resources