def test_15_retrieve_ssvm_default_files(self): list_ssvm_response = list_ssvms( self.apiclient, systemvmtype='secondarystoragevm', state='Running', ) self.assertEqual( isinstance(list_ssvm_response, list), True, 'Check list response returns a valid list' ) ssvm = list_ssvm_response[0] self.debug('Setting up SSVM with ID %s' % ssvm.id) cmd = getDiagnosticsData.getDiagnosticsDataCmd() cmd.targetid = ssvm.id response = self.apiclient.getDiagnosticsData(cmd) is_valid_url = self.check_url(response.url) self.assertEqual( True, is_valid_url, msg="Failed to create valid download url response" )
def test_18_retrieve_cpvm_single_file(self): list_cpvm_response = list_ssvms( self.apiclient, systemvmtype='consoleproxy', state='Running', ) self.assertEqual( isinstance(list_cpvm_response, list), True, 'Check list response returns a valid list' ) cpvm = list_cpvm_response[0] self.debug('Setting up CPVM with ID %s' % cpvm.id) cmd = getDiagnosticsData.getDiagnosticsDataCmd() cmd.targetid = cpvm.id cmd.type = "/var/log/cloud.log" response = self.apiclient.getDiagnosticsData(cmd) is_valid_url = self.check_url(response.url) self.assertEqual( True, is_valid_url, msg="Failed to create valid download url response" )
def test_14_retrieve_vr_one_file(self): list_router_response = list_routers( self.apiclient, account=self.account.name, domainid=self.account.domainid ) self.assertEqual( isinstance(list_router_response, list), True, "Check list response returns a valid list" ) router = list_router_response[0] self.debug('Setting up VR with ID %s' % router.id) cmd = getDiagnosticsData.getDiagnosticsDataCmd() cmd.targetid = router.id cmd.type = "/var/log/cloud.log" response = self.apiclient.getDiagnosticsData(cmd) is_valid_url = self.check_url(response.url) self.assertEqual( True, is_valid_url, msg="Failed to create valid download url response" )