def catalog_entries(self, tenant_id): """ List catalog entries for the Cinder API. """ return [ Entry(tenant_id, "volume", "cinder", [ Endpoint(tenant_id, region, text_type(uuid4()), prefix="v2") for region in self._regions ]), Entry(tenant_id, "volumev2", "cinderv2", [ Endpoint(tenant_id, region, text_type(uuid4()), prefix="v2") for region in self._regions ]) ]
def test_unversioned_entry(self): """ An L{Endpoint} created without a 'prefix' returns a URI without a version. """ self.assertEqual( get_endpoints(tenant_id="1234", entry_generator=lambda t_id: [ Entry(tenant_id=t_id, type="compute", name="compute_name", endpoints=[ Endpoint(tenant_id=t_id, region="None", endpoint_id="eid") ]) ], prefix_for_endpoint=lambda ep: "http://prefix/"), { "endpoints": [{ "id": "eid", "name": "compute_name", "type": "compute", "region": "None", "tenantId": "1234", "publicURL": "http://prefix/1234" }] })
def catalog_entries(self, tenant_id): """ List catalog entries for the Nova API. """ return [ Entry(tenant_id, "serviceType", "serviceName", [Endpoint(tenant_id, "ORD", 'uuid')]) ]
def catalog_entries(self, tenant_id): """ List catalog entries for the Nova API. """ endpoints = [ Endpoint(tenant_id, each[0], 'uuid', each[1]) for each in self.regions_and_versions ] return [Entry(tenant_id, "serviceType", "serviceName", endpoints)]
def catalog_entries(self, tenant_id): """ List catalog entries for the Nova API. """ return [ Entry( tenant_id, "compute", "cloudServersOpenStack", [Endpoint(tenant_id, "ORD", text_type(uuid4()), prefix="v2")]) ]
def catalog_entries(self, tenant_id): """ Catalog entry for RackConnect V3 endpoints. """ return [ Entry(tenant_id, "rax:rackconnect", "rackconnect", [ Endpoint(tenant_id, region, text_type(uuid4()), prefix="v3") for region in self.regions ]) ]
def catalog_entries(self, tenant_id): """ List catalog entries for the DNS API. """ return [ Entry(tenant_id, "rax:dns", "cloudDNS", [ Endpoint(tenant_id, region, text_type(uuid4()), prefix="v1.0") for region in self._regions ]) ]
def catalog_entries(self, tenant_id): """ List catalog entries for the Nova API. """ return [ Entry(tenant_id, "rax: monitor", "cloudMonitoring", [ Endpoint(tenant_id, region, text_type(uuid4()), "v1.0") for region in self._regions ]) ]
def catalog_entries(self, tenant_id): """ Cloud feeds controller endpoints. """ return [ Entry(tenant_id, "rax:feeds", "cloudFeedsControl", [ Endpoint(tenant_id, region, text_type(uuid4())) for region in self.cf_api._regions ]) ]
def catalog_entries(self, tenant_id): """ Cloud load balancer controller endpoints. """ return [ Entry(tenant_id, "rax:load-balancer", "cloudLoadBalancerControl", [ Endpoint(tenant_id, region, text_type(uuid4()), prefix="v2") for region in self.lb_api._regions ]) ]
def catalog_entries(self, tenant_id): """ Catalog entry for Swift endpoints. """ modified = self.translate_tenant(tenant_id) return [ Entry(modified, "object-store", "cloudFiles", [ Endpoint(modified, "ORD", text_type(uuid4()), prefix="v1"), ]) ]
def catalog_entries(self, tenant_id): """ List catalog entries for the Neutron API. """ return [ Entry(tenant_id, "network", "cloudNetworks", [ Endpoint(tenant_id, region, text_type(uuid4()), prefix="v2") for region in self._regions ]) ]
def catalog_entries(self, tenant_id): """ List catalog entries for the Nova API. """ return [ Entry(tenant_id, "compute", "cloudServersBehavior", [ Endpoint(tenant_id, region, text_type(uuid4()), prefix="v2") for region in self.nova_api._regions ]) ]
def catalog_entries(self, tenant_id): """ List catalog entries for the Glance API. """ return [ Entry(tenant_id, "image", "cloudImages", [ Endpoint(tenant_id, region, text_type(uuid4()), prefix="v2") for region in self._regions ]) ]
def catalog_entries(self, tenant_id): """ Cloud load balancer entries. """ # TODO: actually add some entries so load balancers show up in the # service catalog. return [ Entry( tenant_id, "rax:load-balancer", "cloudLoadBalancers", [Endpoint(tenant_id, "ORD", text_type(uuid4()), prefix="v2")]) ]
def catalog_entries(self, tenant_id): """ Catalog entry for Heat endpoints. """ return [ Entry(tenant_id, "orchestration", "cloudOrchestration", [ Endpoint(tenant_id, region, text_type(uuid4()), prefix="v1") for region in self._regions ]) ]
def catalog_entries(self, tenant_id): """ Returns a list of cloud feeds entries. Note that these are not cloud feeds product endpoints; this is one step removed from those. You'll need to GET from one of these URLs to see the catalog of product endpoints. """ return [ Entry(tenant_id, "rax:feeds", "cloudFeeds", [ Endpoint(tenant_id, region, text_type(uuid4())) for region in self._regions ]) ]
def catalog_entries(self, tenant_id): """ Return an Entry object with a couple of sample Endpoints. """ if tenant_id is not None: modified = "dummy_" + tenant_id else: modified = None return [ Entry(modified, "dummy", "Not Real", [ Endpoint(modified, "Luna", "4321", "v3k"), Endpoint(modified, "Mars", "5432", "v3k"), ]) ]
def catalog_entries(self, tenant_id): """ List catalog entries for the Example API. :param six.text_type tenant_id: the semi-internal tenant ID generated by Mimic. :returns: list of Service Catalog Entry objects :rtype: list """ return [ Entry( tenant_id, self.type_key, self.name_key, self.list_tenant_endpoints(tenant_id)) ]