def get_resources(self): resources = [] # NOTE(justinsb): No way to provide singular name ('volume') # Does this matter? res = extensions.ResourceExtension('os-volumes', VolumeController(), collection_actions={'detail': 'GET'}) resources.append(res) attachment_controller = VolumeAttachmentController(self.ext_mgr) res = extensions.ResourceExtension('os-volume_attachments', attachment_controller, parent=dict( member_name='server', collection_name='servers')) resources.append(res) res = extensions.ResourceExtension('os-volumes_boot', inherits='servers') resources.append(res) res = extensions.ResourceExtension('os-snapshots', SnapshotController(), collection_actions={'detail': 'GET'}) resources.append(res) return resources
def get_resources(self): secgrp_ext = extensions.ResourceExtension(ALIAS, SecurityGroupController()) server_secgrp_ext = extensions.ResourceExtension( ALIAS, controller=ServerSecurityGroupController(), parent=dict(member_name='server', collection_name='servers')) secgrp_rules_ext = extensions.ResourceExtension( 'os-security-group-rules', controller=SecurityGroupRulesController()) return [secgrp_ext, server_secgrp_ext, secgrp_rules_ext]
def get_resources(self): res1 = extensions.ResourceExtension('microversions', MicroversionsController()) res2 = extensions.ResourceExtension('microversions2', MicroversionsController2()) res3 = extensions.ResourceExtension('microversions3', MicroversionsController3(), member_actions={"action": "POST"}) res4 = extensions.ResourceExtension('microversions4', MicroversionsController4()) res5 = extensions.ResourceExtension( 'microversions5', MicroversionsExtendsBaseController()) return [res1, res2, res3, res4, res5]
def get_resources(self): resources = [] res = extensions.ResourceExtension('os-floating-ip-dns', FloatingIPDNSDomainController()) resources.append(res) res = extensions.ResourceExtension('entries', FloatingIPDNSEntryController(), parent={'member_name': 'domain', 'collection_name': 'os-floating-ip-dns'}) resources.append(res) return resources
def get_resources(self): ext = extensions.ResourceExtension(ALIAS, InstanceActionsController(), parent=dict( member_name='server', collection_name='servers')) return [ext]
def get_resources(self): resources = [ extensions.ResourceExtension(ALIAS, AggregateController(), member_actions={'action': 'POST'}) ] return resources
def get_resources(self): res = extensions.ResourceExtension( ALIAS, controller=FlavorAccessController(), parent=dict(member_name='flavor', collection_name='flavors')) return [res]
def get_resources(self): resources = [ extensions.ResourceExtension(ALIAS, SecurityGroupDefaultRulesController()) ] return resources
def get_resources(self): extra_specs = extensions.ResourceExtension( 'os-extra_specs', FlavorExtraSpecsController(), parent=dict(member_name='flavor', collection_name='flavors')) return [extra_specs]
def get_resources(self): resource = [ extensions.ResourceExtension(ALIAS, BareMetalNodeController(), member_actions={"action": "POST"}) ] return resource
def get_resources(self): resources = [] resource = extensions.ResourceExtension( 'os-services', ServiceController(self.ext_mgr)) resources.append(resource) return resources
def get_resources(self): parent_def = {'member_name': 'server', 'collection_name': 'servers'} # NOTE(bcwaldon): This should be prefixed with 'os-' ext = extensions.ResourceExtension('diagnostics', ServerDiagnosticsController(), parent=parent_def) return [ext]
def get_resources(self): resources = [] res = extensions.ResourceExtension( ALIAS, QuotaClassSetsController(extension_info=self.extension_info)) resources.append(res) return resources
def get_resources(self): resources = [] res = extensions.ResourceExtension('os-simple-tenant-usage', SimpleTenantUsageController()) resources.append(res) return resources
def get_resources(self): resources = [] res = extensions.ResourceExtension( 'os-quota-class-sets', QuotaClassSetsController(self.ext_mgr)) resources.append(res) return resources
def get_resources(self): resources = [ extensions.ResourceExtension(ALIAS, ExtensionInfoController( self.extension_info), member_name='extension') ] return resources
def get_resources(self): member_actions = {'action': 'POST'} resources = [] resource = extensions.ResourceExtension('os-fixed-ips', FixedIPController(), member_actions=member_actions) resources.append(resource) return resources
def get_resources(self): resources = [] res = extensions.ResourceExtension(ALIAS, SimpleTenantUsageController()) resources.append(res) return resources
def get_resources(self): resources = [] res = extensions.ResourceExtension('os-floating-ip-pools', FloatingIPPoolsController(), member_actions={}) resources.append(res) return resources
def get_resources(self): resources = [] res = extensions.ResourceExtension('os-certificates', CertificatesController(), member_actions={}) resources.append(res) return resources
def get_resources(self): resources = [ extensions.ResourceExtension( ALIAS, ServerPasswordController(), collection_actions={'clear': 'DELETE'}, parent=dict(member_name='server', collection_name='servers')) ] return resources
def get_resources(self): resources = [] res = extensions.ResourceExtension('os-aggregates', AggregateController(), member_actions={ "action": "POST", }) resources.append(res) return resources
def get_resources(self): member_actions = {'action': 'POST'} collection_actions = {'add': 'POST'} res = extensions.ResourceExtension( 'os-networks', NetworkController(ext_mgr=self.ext_mgr), member_actions=member_actions, collection_actions=collection_actions) return [res]
def get_resources(self): member_actions = {'action': 'POST'} collection_actions = {'add': 'POST'} res = extensions.ResourceExtension( ALIAS, NetworkController(), member_actions=member_actions, collection_actions=collection_actions) return [res]
def get_resources(self): resources = [] res = extensions.ResourceExtension('os-quota-sets', QuotaSetsController(self.ext_mgr), member_actions={'defaults': 'GET'}) resources.append(res) return resources
def test_get_resources_with_controller(self): res_ext = base_extensions.ResourceExtension( 'tweedles', StubController(response_body)) manager = StubExtensionManager(res_ext) app = compute.APIRouter(manager) request = webob.Request.blank("/fake/tweedles") response = request.get_response(app) self.assertEqual(200, response.status_int) self.assertEqual(response_body, response.body)
def get_resources(self): parent = {'member_name': 'server', 'collection_name': 'servers'} resources = [ extensions.ResourceExtension('consoles', ConsolesController(), parent=parent, member_name='console') ] return resources
def get_resources(self): resources = [] res = extensions.ResourceExtension( 'os-availability-zone', AvailabilityZoneController(), collection_actions={'detail': 'GET'}) resources.append(res) return resources
def get_resources(self): resources = [] res = extensions.ResourceExtension('os-baremetal-nodes', BareMetalNodeController( self.ext_mgr), member_actions={ "action": "POST", }) resources.append(res) return resources
def get_resources(self): resources = [] res = extensions.ResourceExtension( ALIAS, controller=ServerVirtualInterfaceController(), parent=dict(member_name='server', collection_name='servers')) resources.append(res) return resources