code stringlengths 3 6.57k |
|---|
os.path.join(data_dir, "ga", sample_agent_zip) |
os.path.join(UpdateTestCase._agent_zip_dir, test_agent_zip) |
shutil.copyfile(source, target) |
tearDownClass(cls) |
AgentTestCase.tearDownClass() |
shutil.rmtree(UpdateTestCase._test_suite_tmp_dir) |
_get_agent_pkgs(in_dir=None) |
os.path.join(in_dir, AGENT_PKG_GLOB) |
glob.glob(path) |
_get_agents(in_dir=None) |
os.path.join(in_dir, AGENT_DIR_GLOB) |
glob.glob(path) |
os.path.isdir(a) |
_get_agent_file_path() |
UpdateTestCase._get_agent_pkgs() |
_get_agent_file_name() |
os.path.basename(UpdateTestCase._get_agent_file_path() |
_get_agent_path() |
fileutil.trim_ext(UpdateTestCase._get_agent_file_path() |
_get_agent_name() |
os.path.basename(UpdateTestCase._get_agent_path() |
_get_agent_version() |
FlexibleVersion(UpdateTestCase._get_agent_name() |
split("-") |
_add_write_permission_to_goal_state_files() |
UpdateHandler.run() |
UpdateHandler.run() |
glob.iglob(os.path.join(conf.get_lib_dir() |
fileutil.chmod(path, stat.S_IRUSR | stat.S_IWUSR) |
agent_bin(self, version, suffix) |
format(AGENT_NAME, version, suffix) |
rename_agent_bin(self, path, dst_v) |
glob.glob(os.path.join(path, self.agent_bin("*.*.*.*", '*') |
os.path.join(path, self.agent_bin(dst_v, '') |
shutil.move(src_bin, dst_bin) |
agents(self) |
GuestAgent(path=path) |
self.agent_dirs() |
agent_count(self) |
len(self.agent_dirs() |
agent_dirs(self) |
self._get_agents(in_dir=self.tmp_dir) |
agent_dir(self, version) |
os.path.join(self.tmp_dir, "{0}-{1}".format(AGENT_NAME, version) |
agent_paths(self) |
glob.glob(os.path.join(self.tmp_dir, "*") |
paths.sort() |
agent_pkgs(self) |
self._get_agent_pkgs(in_dir=self.tmp_dir) |
agent_versions(self) |
FlexibleVersion(AGENT_DIR_PATTERN.match(a) |
group(1) |
self.agent_dirs() |
v.sort(reverse=True) |
get_error_file(self, error_data=None) |
tempfile.NamedTemporaryFile(mode="w") |
json.dump(error_data if error_data is not None else NO_ERROR, fp) |
fp.seek(0) |
create_error(self, error_data=None) |
self.get_error_file(error_data) |
GuestAgentError(path.name) |
err.load() |
copy_agents(self, *agents) |
len(agents) |
self._get_agent_pkgs() |
shutil.copy(agent, self.tmp_dir) |
expand_agents(self) |
self.agent_pkgs() |
os.path.join(self.tmp_dir, fileutil.trim_ext(agent, "zip") |
zipfile.ZipFile(agent) |
extractall(path) |
prepare_agent(self, version) |
self.copy_agents(self._get_agent_pkgs() |
self.expand_agents() |
self.agent_versions() |
FlexibleVersion(str(versions[0]) |
self.agent_dir(src_v) |
FlexibleVersion(str(version) |
self.agent_dir(dst_v) |
shutil.move(from_path + ".zip", to_path + ".zip") |
shutil.move(from_path, to_path) |
self.rename_agent_bin(to_path, dst_v) |
self.agent_count() |
self.copy_agents(self._get_agent_pkgs() |
self.expand_agents() |
self.agent_versions() |
FlexibleVersion(str(versions[0]) |
remove_agents(self) |
self.agent_paths() |
os.path.isfile(agent) |
os.remove(agent) |
shutil.rmtree(agent) |
self.agent_dir(src_v) |
FlexibleVersion(str(src_v) |
range(0, count) |
self.agent_dir(dst_v) |
shutil.copyfile(from_path + ".zip", to_path + ".zip") |
shutil.copytree(from_path, to_path) |
self.rename_agent_bin(to_path, dst_v) |
GuestAgent(to_path) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.