def make_mapping(self, replicas=3, digits=None): mapping = Meta0PrefixMapping(self.m0_client, conscience_client=self.cs_client, replicas=replicas, digits=digits, logger=self.logger) return mapping
def setUp(self): super(TestMeta0PrefixMapping, self).setUp() self.account = "test_prefixmapping" self.reference = "prefixmapping-" + random_str(4) self.meta0_client = Meta0Client(self.conf) self.mapping = Meta0PrefixMapping(self.meta0_client, logger=self.logger)
def get_prefix_mapping(self, parsed_args): """ Create a meta0 prefix mapping with the parsed parameters. """ from oio.directory.meta0 import Meta0PrefixMapping meta0_client = self.app.client_manager.directory.meta0 conscience_client = self.app.client_manager.directory.cluster digits = self.app.client_manager.meta1_digits return Meta0PrefixMapping(meta0_client, conscience_client=conscience_client, replicas=parsed_args.replicas, digits=digits, min_dist=parsed_args.min_dist, logger=self.log)