<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-1x.git/python/vyos/util.py, branch 1.4.0-epa1</title>
<subtitle>VyOS command definitions, scripts, and utilities (mirror of https://github.com/marekm72/vyos-1x.git)
</subtitle>
<id>https://git.amelek.net/marekm72/vyos-1x.git/atom?h=1.4.0-epa1</id>
<link rel='self' href='https://git.amelek.net/marekm72/vyos-1x.git/atom?h=1.4.0-epa1'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-1x.git/'/>
<updated>2023-07-16T03:09:59+00:00</updated>
<entry>
<title>T5195: remove empty vyos.util</title>
<updated>2023-07-16T03:09:59+00:00</updated>
<author>
<name>John Estabrook</name>
<email>jestabro@vyos.io</email>
</author>
<published>2023-07-15T19:27:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-1x.git/commit/?id=4056974666cd1368c500a0afb75b3b8b1417ad89'/>
<id>urn:sha1:4056974666cd1368c500a0afb75b3b8b1417ad89</id>
<content type='text'>
</content>
</entry>
<entry>
<title>T5195: remove obsoleted mangle_dict_keys</title>
<updated>2023-07-16T03:09:52+00:00</updated>
<author>
<name>John Estabrook</name>
<email>jestabro@vyos.io</email>
</author>
<published>2023-07-15T19:22:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-1x.git/commit/?id=3284444b1755912883eaa8d474fac01c2355af66'/>
<id>urn:sha1:3284444b1755912883eaa8d474fac01c2355af66</id>
<content type='text'>
</content>
</entry>
<entry>
<title>T5195: vyos.util -&gt; vyos.utils package refactoring part #2</title>
<updated>2023-07-15T18:13:12+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2023-07-15T18:12:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-1x.git/commit/?id=5f77ccf91eb402c548fc91b2e080a4b2b86f4181'/>
<id>urn:sha1:5f77ccf91eb402c548fc91b2e080a4b2b86f4181</id>
<content type='text'>
</content>
</entry>
<entry>
<title>T5195: vyos.util -&gt; vyos.utils package refactoring (#2093)</title>
<updated>2023-07-14T20:18:36+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2023-07-14T20:18:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-1x.git/commit/?id=d1ca536da448749dff557f13ecae97b124026e96'/>
<id>urn:sha1:d1ca536da448749dff557f13ecae97b124026e96</id>
<content type='text'>
* T5195: move run, cmd, call, rc_cmd helper to vyos.utils.process

* T5195: use read_file and write_file implementation from vyos.utils.file

Changed code automatically using:

find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import read_file$/from vyos.utils.file import read_file/g' {} +
find . -type f -not -path '*/\.*' -exec sed -i 's/^from vyos.util import write_file$/from vyos.utils.file import write_file/g' {} +

* T5195: move chmod* helpers to vyos.utils.permission

* T5195: use colon_separated_to_dict from vyos.utils.dict

* T5195: move is_systemd_service_* to vyos.utils.process

* T5195: fix boot issues with missing imports

* T5195: move dict_search_* helpers to vyos.utils.dict

* T5195: move network helpers to vyos.utils.network

* T5195: move commit_* helpers to vyos.utils.commit

* T5195: move user I/O helpers to vyos.utils.io</content>
</entry>
<entry>
<title>T5195: drop sysctl_* implementation from vyos.util - prefer vyos.utils.system</title>
<updated>2023-07-12T19:26:25+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2023-07-12T19:25:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-1x.git/commit/?id=ac60fe7d1840b8768542ee4b3f28f46544c290f2'/>
<id>urn:sha1:ac60fe7d1840b8768542ee4b3f28f46544c290f2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>T5195: move boot_* helpers to vyos.utils.boot</title>
<updated>2023-07-12T19:16:56+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2023-07-12T19:16:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-1x.git/commit/?id=4e2a087cc7e91a510dd590f7cc761e36ac8f77f8'/>
<id>urn:sha1:4e2a087cc7e91a510dd590f7cc761e36ac8f77f8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>vyos.utils: T5195: take the time and use the full command over an abbreviation</title>
<updated>2023-07-08T15:30:02+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2023-07-08T15:30:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-1x.git/commit/?id=618984bb98acf25d2d201c155e7911b0a1cf4ec2'/>
<id>urn:sha1:618984bb98acf25d2d201c155e7911b0a1cf4ec2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>T5320: check if unsaved commits are due to boot config error</title>
<updated>2023-06-28T16:52:16+00:00</updated>
<author>
<name>John Estabrook</name>
<email>jestabro@vyos.io</email>
</author>
<published>2023-06-27T20:36:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-1x.git/commit/?id=186d05c3c792ea1c61e8f0e68fd7006917244660'/>
<id>urn:sha1:186d05c3c792ea1c61e8f0e68fd7006917244660</id>
<content type='text'>
</content>
</entry>
<entry>
<title>vyos.util: T5300: check_port_availability: return False iff EADDRINUSE</title>
<updated>2023-06-20T15:45:24+00:00</updated>
<author>
<name>John Estabrook</name>
<email>jestabro@vyos.io</email>
</author>
<published>2023-06-20T14:29:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-1x.git/commit/?id=0439ade98cd8a0301351dfcdfe3e3f4dc7040473'/>
<id>urn:sha1:0439ade98cd8a0301351dfcdfe3e3f4dc7040473</id>
<content type='text'>
At boot, the util function check_port_availability can return False with
EADDRNOTAVAIL if the interface is not yet up; check explicitly for
address in use.
</content>
</entry>
<entry>
<title>vyos.util: extend process_named_running() signature with cmdline</title>
<updated>2023-05-28T19:17:43+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2023-05-28T19:14:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/marekm72/vyos-1x.git/commit/?id=9c677c81be6a6e62958c73b038c2a36f1f629108'/>
<id>urn:sha1:9c677c81be6a6e62958c73b038c2a36f1f629108</id>
<content type='text'>
process_named_running() was introduced in commit 16b2fc8fc4ca ("dns-forwarding:
T2298: fix path to control file") and thus remained more or less unchanged.

Smoketests use process_named_running() heavily and might spawn multiple
processes with the same name but ifferent options (e.g. dhcp6c or dhclient) and
it was yet not possible to properly filter on the "real-deal" like the process
bound to a given interface.

One can now optionally specify a string that is searched inside the command
line argument list of the process.

Example:

&gt;&gt;&gt; process_named_running('dhcp6c', 'veth0')
['/usr/sbin/dhcp6c', '-D', '-k', '/run/dhcp6c/dhcp6c.veth0.sock', '-c',
 '/run/dhcp6c/dhcp6c.veth0.conf', '-p', '/run/dhcp6c/dhcp6c.veth0.pid', 'veth0']
4215

&gt;&gt;&gt; process_named_running('dhcp6c', 'veth1')
['/usr/sbin/dhcp6c', '-D', '-k', '/run/dhcp6c/dhcp6c.veth1.sock', '-c',
 '/run/dhcp6c/dhcp6c.veth1.conf', '-p', '/run/dhcp6c/dhcp6c.veth1.pid', 'veth1']
4253

Where the debug list returned is the commandline searched.
</content>
</entry>
</feed>
