Example #1
0
 def setUp(self):
     """setUp."""
     super(PyU4VUtilsTest, self).setUp()
     self.data = pcd.CommonData()
     self.conf = config_handler
     self.console = console
     self.file = file_handler
     self.conf_file, self.conf_dir = (
         pf.FakeConfigFile.create_fake_config_file(
             'smc', 'smc', '10.0.0.75', '8443', self.data.array,
             False, True, True))
Example #2
0
 def setUp(self):
     """Setup."""
     super(PyU4VUnivmaxWLPTest, self).setUp()
     self.data = pcd.CommonData()
     self.conf_file, self.conf_dir = (
         pf.FakeConfigFile.create_fake_config_file())
     univmax_conn.file_path = self.conf_file
     with mock.patch.object(rest_requests.RestRequests,
                            'establish_rest_session',
                            return_value=pf.FakeRequestsSession()):
         self.conn = univmax_conn.U4VConn(array_id=self.data.array)
         self.wlp = self.conn.wlp
Example #3
0
 def setUp(self):
     """Set up the test class."""
     super(TestMigrate, self).setUp()
     self.data = pcd.CommonData()
     self.conf_file, self.conf_dir = (
         pf.FakeConfigFile.create_fake_config_file())
     univmax_conn.file_path = self.conf_file
     with mock.patch.object(rest_requests.RestRequests,
                            'establish_rest_session',
                            return_value=pf.FakeRequestsSession()):
         conn = univmax_conn.U4VConn()
     self.utils = migrate_utils.MigrateUtils(conn)
Example #4
0
 def setUp(self):
     """Setup."""
     super(PyU4VUnivmaxConnTest, self).setUp()
     self.data = pcd.CommonData()
     with mock.patch.object(
             rest_requests.RestRequests, 'establish_rest_session',
             return_value=pf.FakeRequestsSession()):
         self.conn = univmax_conn.U4VConn(
             username='******', password='******', server_ip='10.0.0.75',
             port='8443', verify=False, interval=5, retries=200,
             array_id=self.data.array, application_type='pyu4v')
         self.common = self.conn.common
         self.common.interval = 1
         self.common.retries = 1
Example #5
0
 def setUp(self):
     """setUp."""
     super(PyU4VCommonTest, self).setUp()
     self.data = pcd.CommonData()
     self.conf_file, self.conf_dir = (
         pf.FakeConfigFile.create_fake_config_file())
     univmax_conn.file_path = self.conf_file
     with mock.patch.object(rest_requests.RestRequests,
                            'establish_rest_session',
                            return_value=pf.FakeRequestsSession()):
         self.conn = univmax_conn.U4VConn()
         self.common = self.conn.common
         self.common.interval = 1
         self.common.retries = 1
Example #6
0
 def setUp(self):
     """Setup."""
     super(PyU4VMetroDRTest, self).setUp()
     self.data = pcd.CommonData()
     self.conf_file, self.conf_dir = (
         pf.FakeConfigFile.create_fake_config_file())
     univmax_conn.file_path = self.conf_file
     with mock.patch.object(
             rest_requests.RestRequests, 'establish_rest_session',
             return_value=pf.FakeRequestsSession()):
         self.conn = univmax_conn.U4VConn(array_id=self.data.array)
         self.provisioning = self.conn.provisioning
         self.replication = self.conn.replication
         self.metro_dr = self.conn.metro_dr
Example #7
0
 def setUp(self):
     """Setup."""
     super(PyU4VRestRequestsTest, self).setUp()
     self.data = pcd.CommonData()
     pyu4v_version = constants.PYU4V_VERSION
     python_version = platform.python_version()
     sys_platform = platform.system()
     sys_platform_release = platform.release()
     self.ua_details = (
         'PyU4V/{pv} ({plat}; version {rel}) Python {python}'.format(
             pv=pyu4v_version,
             plat=sys_platform,
             rel=sys_platform_release,
             python=python_version))
     self.rest = rest_requests.RestRequests(
         username='******',
         password='******',
         verify=False,
         base_url='http://10.10.10.10:8443/univmax/restapi',
         interval=1,
         retries=3,
         application_type='pyu4v')