Skip to content

Commit

Permalink
Backport from develop features required by yomi
Browse files Browse the repository at this point in the history
* Add root and no_recommends parameters in the public interface for Zypper and RPM (lowpkg)
  saltstack/salt#50125

* Add root parameter to useradd, shadow and groupadd
  saltstack/salt#50175

* cmd: Add root parameter for wait and run states
  saltstack/salt#50302

* systemd: add optional root parameter
  saltstack/salt#50380

* Add new chroot module
  https://github.com/openSUSE/salt/pull/50418

* Add new module freezer
  saltstack/salt#50452

* btrfs: add all subvolume commands
  saltstack/salt#50541

* btrfs: add new btrfs state
  saltstack/salt#50635

* zypper: demote log from error to warning
  saltstack/salt#50671

* blkid: add search by token
  saltstack/salt#50706

* mount: add fstab_{present,absent} states
  saltstack/salt#50725

* btrfs: add option to not set subvolumes as default
  https://github.com/openSUSE/salt/pull/50801

* Add disk_set and disk_toggle functions, and update valid partition flags
  https://github.com/openSUSE/salt/pull/50834

* disk: support setting FAT size for format_
  https://github.com/openSUSE/salt/pull/51074

* parted: fix set_ valid flags comment.
  https://github.com/openSUSE/salt/pull/51704

* grains/core: ignore HOST_NOT_FOUND errno in fqdns()
  https://github.com/openSUSE/salt/pull/51706

* cmdmod: add 'binds' parameter in run_chroot
  https://github.com/openSUSE/salt/pull/51871

* mount: fix extra -t parameter
  https://github.com/openSUSE/salt/pull/51905

* lvm: be quiet when a pv, lv or vg is not expected
  https://github.com/openSUSE/salt/pull/51929

* linux_lvm: clean error in pvcreate and pvremove
  https://github.com/openSUSE/salt/pull/51954

* blockdev: hide blkid errors when are expected
  https://github.com/openSUSE/salt/pull/51956

* partially unify public functions signature for pkg and lowpkg
  https://github.com/openSUSE/salt/pull/51973

* extmods: add utils directories in sys.path
  https://github.com/openSUSE/salt/pull/52001
  • Loading branch information
aplanas committed Mar 6, 2019
1 parent 33374e5 commit d59cdff
Show file tree
Hide file tree
Showing 52 changed files with 5,081 additions and 578 deletions.
6 changes: 5 additions & 1 deletion salt/grains/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ def linux_distribution(**kwargs):

_INTERFACES = {}

# Possible value for h_errno defined in netdb.h
HOST_NOT_FOUND = 1
NO_DATA = 4


def _windows_cpudata():
'''
Expand Down Expand Up @@ -2208,7 +2212,7 @@ def fqdns():
name, aliaslist, addresslist = socket.gethostbyaddr(ip)
fqdns.update([socket.getfqdn(name)] + [als for als in aliaslist if salt.utils.network.is_fqdn(als)])
except socket.herror as err:
if err.errno == 0:
if err.errno in (0, HOST_NOT_FOUND, NO_DATA):
# No FQDN for this IP address, so we don't need to know this all the time.
log.debug("Unable to resolve address %s: %s", ip, err)
else:
Expand Down
2 changes: 1 addition & 1 deletion salt/modules/aixpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ def latest_version(*names, **kwargs):
available_version = salt.utils.functools.alias_function(latest_version, 'available_version')


def upgrade_available(name):
def upgrade_available(name, **kwargs):
'''
Check whether or not an upgrade is available for a given package
Expand Down
12 changes: 6 additions & 6 deletions salt/modules/apkpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def version(*names, **kwargs):
return __salt__['pkg_resource.version'](*names, **kwargs)


def refresh_db():
def refresh_db(**kwargs):
'''
Updates the package list
Expand Down Expand Up @@ -425,7 +425,7 @@ def remove(name=None, pkgs=None, purge=False, **kwargs): # pylint: disable=unus
return ret


def upgrade(name=None, pkgs=None, refresh=True):
def upgrade(name=None, pkgs=None, refresh=True, **kwargs):
'''
Upgrades all packages via ``apk upgrade`` or a specific package if name or
pkgs is specified. Name is ignored if pkgs is specified
Expand Down Expand Up @@ -485,7 +485,7 @@ def upgrade(name=None, pkgs=None, refresh=True):
return ret


def list_upgrades(refresh=True):
def list_upgrades(refresh=True, **kwargs):
'''
List all available package upgrades.
Expand Down Expand Up @@ -524,7 +524,7 @@ def list_upgrades(refresh=True):
return ret


def file_list(*packages):
def file_list(*packages, **kwargs):
'''
List the files that belong to a package. Not specifying any packages will
return a list of _every_ file on the system's package database (not
Expand All @@ -541,7 +541,7 @@ def file_list(*packages):
return file_dict(*packages)


def file_dict(*packages):
def file_dict(*packages, **kwargs):
'''
List the files that belong to a package, grouped by package. Not
specifying any packages will return a list of _every_ file on the system's
Expand Down Expand Up @@ -580,7 +580,7 @@ def file_dict(*packages):
return {'errors': errors, 'packages': ret}


def owner(*paths):
def owner(*paths, **kwargs):
'''
Return the name of the package that owns the file. Multiple file paths can
be passed. Like :mod:`pkg.version <salt.modules.apk.version`, if a single
Expand Down
14 changes: 7 additions & 7 deletions salt/modules/aptpkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def version(*names, **kwargs):
return __salt__['pkg_resource.version'](*names, **kwargs)


def refresh_db(cache_valid_time=0, failhard=False):
def refresh_db(cache_valid_time=0, failhard=False, **kwargs):
'''
Updates the APT database to latest packages based upon repositories
Expand Down Expand Up @@ -1430,7 +1430,7 @@ def list_upgrades(refresh=True, dist_upgrade=True, **kwargs):
return _get_upgradable(dist_upgrade, **kwargs)


def upgrade_available(name):
def upgrade_available(name, **kwargs):
'''
Check whether or not an upgrade is available for a given package
Expand All @@ -1443,7 +1443,7 @@ def upgrade_available(name):
return latest_version(name) != ''


def version_cmp(pkg1, pkg2, ignore_epoch=False):
def version_cmp(pkg1, pkg2, ignore_epoch=False, **kwargs):
'''
Do a cmp-style comparison on two packages. Return -1 if pkg1 < pkg2, 0 if
pkg1 == pkg2, and 1 if pkg1 > pkg2. Return None if there was a problem
Expand Down Expand Up @@ -1633,7 +1633,7 @@ def _skip_source(source):
return False


def list_repos():
def list_repos(**kwargs):
'''
Lists all repos in the sources.list (and sources.lists.d) files
Expand Down Expand Up @@ -2400,7 +2400,7 @@ def mod_repo(repo, saltenv='base', **kwargs):
}


def file_list(*packages):
def file_list(*packages, **kwargs):
'''
List the files that belong to a package. Not specifying any packages will
return a list of _every_ file on the system's package database (not
Expand All @@ -2417,7 +2417,7 @@ def file_list(*packages):
return __salt__['lowpkg.file_list'](*packages)


def file_dict(*packages):
def file_dict(*packages, **kwargs):
'''
List the files that belong to a package, grouped by package. Not
specifying any packages will return a list of _every_ file on the system's
Expand Down Expand Up @@ -2701,7 +2701,7 @@ def _resolve_deps(name, pkgs, **kwargs):
return


def owner(*paths):
def owner(*paths, **kwargs):
'''
.. versionadded:: 2014.7.0
Expand Down
Loading

0 comments on commit d59cdff

Please sign in to comment.