当前位置: 首页>>代码示例>>Python>>正文


Python common.reset_environment函数代码示例

本文整理汇总了Python中test.probe.common.reset_environment函数的典型用法代码示例。如果您正苦于以下问题:Python reset_environment函数的具体用法?Python reset_environment怎么用?Python reset_environment使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了reset_environment函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setUp

    def setUp(self):
        """
        Reset all environment and start all servers.
        """
        (self.pids, self.port2server, self.account_ring, self.container_ring,
         self.object_ring, self.policy, self.url, self.token,
         self.account, self.configs) = reset_environment()
        self.container_name = 'container-%s' % uuid.uuid4()
        self.object_name = 'object-%s' % uuid.uuid4()
        self.brain = BrainSplitter(self.url, self.token, self.container_name,
                                   self.object_name, 'object')
        self.tempdir = mkdtemp()
        conf_path = os.path.join(self.tempdir, 'internal_client.conf')
        conf_body = """
        [DEFAULT]
        swift_dir = /etc/swift

        [pipeline:main]
        pipeline = catch_errors cache proxy-server

        [app:proxy-server]
        use = egg:swift#proxy
        object_post_as_copy = false

        [filter:cache]
        use = egg:swift#memcache

        [filter:catch_errors]
        use = egg:swift#catch_errors
        """
        with open(conf_path, 'w') as f:
            f.write(dedent(conf_body))
        self.int_client = internal_client.InternalClient(conf_path, 'test', 1)
开发者ID:AsherBond,项目名称:swift,代码行数:33,代码来源:test_object_metadata_replication.py

示例2: setUp

    def setUp(self):
	try:
        	self.pids, self.port2server, self.account_ring, self.container_ring, \
           		self.object_ring, self.url, self.token, self.account = \
                		reset_environment()
	except:
		raise SkipTest
开发者ID:lixmgl,项目名称:Intern_OpenStack_Swift,代码行数:7,代码来源:test_running_with_each_type_down.py

示例3: setUp

 def setUp(self):
     """
     Reset all environment and start all servers.
     """
     (self.pids, self.port2server, self.account_ring, self.container_ring,
      self.object_ring, self.url, self.token,
      self.account, self.configs) = reset_environment()
开发者ID:Dieterbe,项目名称:swift,代码行数:7,代码来源:test_replication_servers_working.py

示例4: setUp

 def setUp(self):
     if len(POLICIES) < 2:
         raise SkipTest()
     (self.pids, self.port2server, self.account_ring, self.container_ring,
      self.object_ring, self.policy, self.url, self.token,
      self.account, self.configs) = reset_environment()
     self.container_name = 'container-%s' % uuid.uuid4()
     self.object_name = 'object-%s' % uuid.uuid4()
     self.brain = BrainSplitter(self.url, self.token, self.container_name,
                                self.object_name, 'container')
开发者ID:AsherBond,项目名称:swift,代码行数:10,代码来源:test_container_merge_policy_index.py

示例5: setUp

 def setUp(self):
     (
         self.pids,
         self.port2server,
         self.account_ring,
         self.container_ring,
         self.object_ring,
         self.url,
         self.token,
         self.account,
         self.configs,
     ) = reset_environment()
开发者ID:portante,项目名称:swift,代码行数:12,代码来源:test_empty_device_handoff.py

示例6: setUp

    def setUp(self):
        if len(POLICIES) < 2:
            raise SkipTest('Need more than one policy')

        self.expirer = Manager(['object-expirer'])
        self.expirer.start()
        err = self.expirer.stop()
        if err:
            raise SkipTest('Unable to verify object-expirer service')

        conf_files = []
        for server in self.expirer.servers:
            conf_files.extend(server.conf_files())
        conf_file = conf_files[0]
        self.client = InternalClient(conf_file, 'probe-test', 3)

        (self.pids, self.port2server, self.account_ring, self.container_ring,
         self.object_ring, self.policy, self.url, self.token,
         self.account, self.configs) = reset_environment()
        self.container_name = 'container-%s' % uuid.uuid4()
        self.object_name = 'object-%s' % uuid.uuid4()
        self.brain = BrainSplitter(self.url, self.token, self.container_name,
                                   self.object_name)
开发者ID:701,项目名称:swift,代码行数:23,代码来源:test_object_expirer.py

示例7: setUp

 def setUp(self):
     (self.pids, self.port2server, self.account_ring, self.container_ring,
      self.object_ring, self.url, self.token,
      self.account, self.configs) = reset_environment()
     self.url, self.token = get_auth(
         'http://127.0.0.1:8080/auth/v1.0', 'admin:admin', 'admin')
开发者ID:ArikaChen,项目名称:swift,代码行数:6,代码来源:test_account_get_fake_responses_match.py

示例8: setUp

 def setUp(self):
     (self.pids, self.port2server, self.account_ring, self.container_ring,
      self.object_ring, self.policy, self.url, self.token,
      self.account, self.configs) = reset_environment()
     self.realm, self.cluster = get_current_realm_cluster(self.url)
开发者ID:701,项目名称:swift,代码行数:5,代码来源:test_container_sync.py


注:本文中的test.probe.common.reset_environment函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。