Browse Source

Internal restructuring of stx-integ

Create new directories:
   ceph
   config
   config-files
   filesystem
   kernel
   kernel/kernel-modules
   ldap
   logging
   strorage-drivers
   tools
   utilities
   virt

Retire directories:
   connectivity
   core
   devtools
   support
   extended

Delete two packages:
   tgt
   irqbalance

Relocated packages:
   base/
      dhcp
      initscripts
      libevent
      lighttpd
      linuxptp
      memcached
      net-snmp
      novnc
      ntp
      openssh
      pam
      procps
      sanlock
      shadow
      sudo
      systemd
      util-linux
      vim
      watchdog

   ceph/
      python-cephclient

   config/
      facter
      puppet-4.8.2
      puppet-modules

   filesystem/
      e2fsprogs
      nfs-utils
      nfscheck

   kernel/
      kernel-std
      kernel-rt

   kernel/kernel-modules/
      mlnx-ofa_kernel

   ldap/
      nss-pam-ldapd
      openldap

   logging/
      syslog-ng
      logrotate

   networking/
      lldpd
      iproute
      mellanox
      python-ryu
      mlx4-config

   python/
      python-2.7.5
      python-django
      python-gunicorn
      python-setuptools
      python-smartpm
      python-voluptuous

   security/
      shim-signed
      shim-unsigned
      tboot

   strorage-drivers/
      python-3parclient
      python-lefthandclient

   virt/
      cloud-init
      libvirt
      libvirt-python
      qemu

   tools/
      storage-topology
      vm-topology

   utilities/
      tis-extensions
      namespace-utils
      nova-utils
      update-motd

Change-Id: I37ade764d873c701b35eac5881eb40412ba64a86
Story: 2002801
Task: 22687
Signed-off-by: Scott Little <scott.little@windriver.com>
changes/20/680920/1
Scott Little 3 years ago
parent
commit
f8b0e31584
  1. 6
      ceph/python-cephclient/centos/build_srpm.data
  2. 56
      ceph/python-cephclient/centos/python-cephclient.spec
  3. 220
      ceph/python-cephclient/python-cephclient/0001-US63903-Ceph-Rebase-Update-REST-API-to-0.94.2.patch
  4. 475
      ceph/python-cephclient/python-cephclient/0001-US70398-Ceph-Rebase-Update-REST-API-to-0.94.5.patch
  5. 1062
      ceph/python-cephclient/python-cephclient/US92424-Ceph-Rebase-Update-REST-API-to-10.2.4.patch
  6. 15
      ceph/python-cephclient/python-cephclient/add-osd-get-pool-quota.patch
  7. 25
      ceph/python-cephclient/python-cephclient/fix-osd-crush-remove.patch
  8. 19
      ceph/python-cephclient/python-cephclient/fix-osd-tier-add.patch
  9. 20
      ceph/python-cephclient/python-cephclient/set-default-endpoint.patch
  10. 202
      utilities/namespace-utils/LICENSE
  11. 2
      utilities/namespace-utils/centos/build_srpm.data
  12. 35
      utilities/namespace-utils/centos/namespace-utils.spec
  13. 202
      utilities/namespace-utils/namespace-utils/LICENSE
  14. 59
      utilities/namespace-utils/namespace-utils/bashns.c
  15. 25
      utilities/namespace-utils/namespace-utils/umount-in-namespace
  16. 202
      utilities/nfscheck/LICENSE
  17. 14
      utilities/nfscheck/PKG-INFO
  18. 2
      utilities/nfscheck/centos/build_srpm.data
  19. 43
      utilities/nfscheck/centos/nfscheck.spec
  20. 202
      utilities/nfscheck/files/LICENSE
  21. 79
      utilities/nfscheck/files/nfscheck-init.sh
  22. 10
      utilities/nfscheck/files/nfscheck.service
  23. 53
      utilities/nfscheck/files/nfscheck.sh
  24. 13
      utilities/stx-extensions/PKG-INFO
  25. 2
      utilities/stx-extensions/centos/build_srpm.data
  26. 69
      utilities/stx-extensions/centos/tis-extensions.spec
  27. 202
      utilities/stx-extensions/files/LICENSE
  28. 4
      utilities/stx-extensions/files/coredump-sysctl.conf
  29. 8
      utilities/stx-extensions/files/coredump.conf
  30. 1
      utilities/stx-extensions/files/modules-load-vfio.conf
  31. 290
      utilities/stx-extensions/files/target
  32. 14
      utilities/stx-extensions/files/target.service
  33. 202
      utilities/update-motd/LICENSE
  34. 14
      utilities/update-motd/PKG-INFO
  35. 2
      utilities/update-motd/centos/build_srpm.data
  36. 59
      utilities/update-motd/centos/update-motd.spec
  37. 202
      utilities/update-motd/files/LICENSE
  38. 25
      utilities/update-motd/files/apply_banner_customization
  39. 286
      utilities/update-motd/files/customize-banner
  40. 16
      utilities/update-motd/files/install_banner_customization
  41. 16
      utilities/update-motd/files/motd-footer
  42. 16
      utilities/update-motd/files/motd-header
  43. 15
      utilities/update-motd/files/motd-update
  44. 3
      utilities/update-motd/files/motd-update.cron

6
ceph/python-cephclient/centos/build_srpm.data

@ -0,0 +1,6 @@
CLIENT_NAME=python-cephclient
CLIENT_VER=v0.1.0.5
COPY_LIST="$CGCS_BASE/downloads/$CLIENT_NAME-$CLIENT_VER.tar.gz $PKG_BASE/$CLIENT_NAME/*"
TIS_PATCH_VER=2

56
ceph/python-cephclient/centos/python-cephclient.spec

@ -0,0 +1,56 @@
%{!?_licensedir:%global license %%doc}
%global pypi_name python-cephclient
Name: python-cephclient
Version: 0.1.0.5
Release: 0%{?_tis_dist}.%{tis_patch_ver}
Summary: python-cephclient
License: Apache-2.0
URL: https://github.com/dmsimard/python-cephclient
Group: devel/python
Packager: Wind River <info@windriver.com>
Source0: %{pypi_name}-v%{version}.tar.gz
Patch0: fix-osd-crush-remove.patch
Patch1: set-default-endpoint.patch
Patch2: 0001-US63903-Ceph-Rebase-Update-REST-API-to-0.94.2.patch
Patch3: add-osd-get-pool-quota.patch
Patch4: 0001-US70398-Ceph-Rebase-Update-REST-API-to-0.94.5.patch
Patch5: fix-osd-tier-add.patch
Patch6: US92424-Ceph-Rebase-Update-REST-API-to-10.2.4.patch
BuildArch: noarch
BuildRequires: python
BuildRequires: ceph
Requires: python
Provides: python-cephclient
%description
Client library for the Ceph REST API
%prep
%autosetup -p 1 -n %{pypi_name}-%{version}
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info
# Let RPM handle the dependencies
rm -f requirements.txt
%build
%{__python2} setup.py build
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
%files
%doc README.rst
%license LICENSE
%{python2_sitelib}/cephclient
%{python2_sitelib}/*.egg-info

220
ceph/python-cephclient/python-cephclient/0001-US63903-Ceph-Rebase-Update-REST-API-to-0.94.2.patch

@ -0,0 +1,220 @@
From 016ebffad6c953cf51c538cc8c45edf56e681515 Mon Sep 17 00:00:00 2001
From: Robert Church <robert.church@windriver.com>
Date: Fri, 21 Aug 2015 13:05:18 -0500
Subject: [PATCH] US63903: Ceph Rebase - Update REST API to 0.94.2
This updates the existing REST APIs to correspond to what in required by
Ceph 0.94.2 (Hammer LTS)
---
cephclient/wrapper.py | 134 +++++++++++++++++++++++++++++++++++---------------
1 file changed, 95 insertions(+), 39 deletions(-)
diff --git a/cephclient/wrapper.py b/cephclient/wrapper.py
index 8f583a5..926eb7f 100644
--- a/cephclient/wrapper.py
+++ b/cephclient/wrapper.py
@@ -335,8 +335,12 @@ class CephWrapper(client.CephClient):
def osd_crush_dump(self, **kwargs):
return self.get('osd/crush/dump', **kwargs)
- def osd_crush_rule_dump(self, **kwargs):
- return self.get('osd/crush/rule/dump', **kwargs)
+ def osd_crush_rule_dump(self, name=None, **kwargs):
+ if name is not None:
+ return self.get('osd/crush/rule/dump?name={0}'
+ .format(name), **kwargs)
+ else:
+ return self.get('osd/crush/rule/dump', **kwargs)
def osd_crush_rule_list(self, **kwargs):
return self.get('osd/crush/rule/list', **kwargs)
@@ -450,7 +454,7 @@ class CephWrapper(client.CephClient):
.format(name, args), **kwargs)
def osd_crush_remove(self, name, ancestor=None, **kwargs):
- if ancestor:
+ if ancestor is not None:
return self.put('osd/crush/remove?name={0}&ancestor={1}'
.format(name, ancestor), **kwargs)
else:
@@ -462,29 +466,43 @@ class CephWrapper(client.CephClient):
.format(name, weight), **kwargs)
def osd_crush_rm(self, name, ancestor, **kwargs):
- return self.put('osd/crush/rm?name={0}&ancestor={1}'
- .format(name, ancestor), **kwargs)
+ if ancestor is not None:
+ return self.put('osd/crush/rm?name={0}&ancestor={1}'
+ .format(name, ancestor), **kwargs)
+ else:
+ return self.put('osd/crush/rm?name={0}'
+ .format(name), **kwargs)
- def osd_crush_rule_create_simple(self, name, root, type, **kwargs):
- return self.put(
- 'osd/crush/rule/create-simple?name={0}&root={1}&type={2}'
- .format(name, root, type), **kwargs)
+ def osd_crush_rule_create_simple(self, name, root,
+ type, mode=None, **kwargs):
+ if mode is not None:
+ return self.put(
+ 'osd/crush/rule/create-simple?name={0}&root={1}&type={2}'
+ '&mode={3}'.format(name, root, type, mode), **kwargs)
+ else:
+ return self.put(
+ 'osd/crush/rule/create-simple?name={0}&root={1}&type={2}'
+ .format(name, root, type), **kwargs)
def osd_crush_rule_rm(self, name, **kwargs):
return self.put('osd/crush/rule/rm?name={0}'
.format(name), **kwargs)
- def osd_crush_set(self, id, name, weight, args, **kwargs):
+ def osd_crush_set(self, id, weight, args, **kwargs):
return self.put('osd/crush/set?id={0}&weight={1}&args={2}'
- .format(id, name, weight, args), **kwargs)
+ .format(id, weight, args), **kwargs)
def osd_crush_tunables(self, profile, **kwargs):
return self.put('osd/crush/tunables?profile={0}'
.format(profile), **kwargs)
- def osd_crush_unlink(self, name, ancestor, **kwargs):
- return self.put('osd/crush/unlink?name={0}&ancestor={1}'
- .format(name, ancestor), **kwargs)
+ def osd_crush_unlink(self, name, ancestor=None, **kwargs):
+ if ancestor is not None:
+ return self.put('osd/crush/unlink?name={0}&ancestor={1}'
+ .format(name, ancestor), **kwargs)
+ else:
+ return self.put('osd/crush/unlink?name={0}'
+ .format(name), **kwargs)
def osd_deep_scrub(self, who, **kwargs):
return self.put('osd/deep-scrub?who={0}'
@@ -498,22 +516,44 @@ class CephWrapper(client.CephClient):
return self.put('osd/in?ids={0}'
.format(ids), **kwargs)
- def osd_lost(self, id, sure, **kwargs):
- return self.put('osd/lost?id={0}&sure={1}'
- .format(id, sure), **kwargs)
+ def osd_lost(self, id, sure=None, **kwargs):
+ if sure is not None:
+ return self.put('osd/lost?id={0}&sure={1}'
+ .format(id, sure), **kwargs)
+ else:
+ return self.put('osd/lost?id={0}'
+ .format(id), **kwargs)
def osd_out(self, ids, **kwargs):
return self.put('osd/out?ids={0}'
.format(ids), **kwargs)
- def osd_pool_create(self, pool, pg_num, pgp_num, properties, **kwargs):
- return self.put(
- 'osd/pool/create?pool={0}&pg_num={1}&pgp_num={2}&properties={3}'
- .format(pool, pg_num, pgp_num, properties), **kwargs)
-
- def osd_pool_delete(self, pool, sure, **kwargs):
- return self.put('osd/pool/delete?pool={0}&sure={1}'
- .format(pool, sure), **kwargs)
+ def osd_pool_create(self, pool, pg_num, pgp_num, pool_type=None,
+ erasure_code_profile=None, ruleset=None,
+ expected_num_objects=None, **kwargs):
+ request = []
+ request.append('osd/pool/create?pool={0}&pg_num={1}&pgp_num={2}'
+ .format(pool, pg_num, pgp_num))
+ if pool_type is not None:
+ request.append('&pool_type={0}'.format(pool_type))
+ if erasure_code_profile is not None:
+ request.append('&erasure_code_profile={0}'
+ .format(erasure_code_profile))
+ if ruleset is not None:
+ request.append('&ruleset={0}'.format(ruleset))
+ if expected_num_objects is not None:
+ request.append('&expected_num_objects={0}'
+ .format(expected_num_objects))
+ return self.put(''.join(request), **kwargs)
+
+ def osd_pool_delete(self, pool, pool2=None, sure=None, **kwargs):
+ request = []
+ request.append('osd/pool/delete?pool={0}'.format(pool))
+ if pool2 is not None:
+ request.append('&pool2={0}'.format(pool2))
+ if sure is not None:
+ request.append('&sure={0}'.format(sure))
+ return self.put(''.join(request), **kwargs)
def osd_pool_param(self, pool, var, **kwargs):
return self.put('osd/pool/get?pool={0}&var={1}'
@@ -531,13 +571,17 @@ class CephWrapper(client.CephClient):
return self.put('osd/pool/rmsnap?pool={0}&snap={1}'
.format(pool, snap), **kwargs)
- def osd_set_pool_param(self, pool, var, **kwargs):
- return self.put('osd/pool/set?pool={0}&var={1}'
- .format(pool, var), **kwargs)
+ def osd_set_pool_param(self, pool, var, val, force=None, **kwargs):
+ if force is not None:
+ return self.put('osd/pool/set?pool={0}&var={1}&val={2}&force={3}'
+ .format(pool, var, val, force), **kwargs)
+ else:
+ return self.put('osd/pool/set?pool={0}&var={1}&val={2}'
+ .format(pool, var, val), **kwargs)
- def osd_set_pool_quota(self, pool, field, **kwargs):
- return self.put('osd/pool/set-quota?pool={0}&field={1}'
- .format(pool, field), **kwargs)
+ def osd_set_pool_quota(self, pool, field, val, **kwargs):
+ return self.put('osd/pool/set-quota?pool={0}&field={1}&val={2}'
+ .format(pool, field, val), **kwargs)
def osd_repair(self, pool, who, **kwargs):
return self.put('osd/repair?who={0}'
@@ -571,9 +615,14 @@ class CephWrapper(client.CephClient):
return self.put('osd/thrash?num_epochs={0}'
.format(num_epochs), **kwargs)
- def osd_tier_add(self, pool, tierpool, **kwargs):
- return self.put('osd/tier/add?pool={0}&tierpool={1}'
- .format(pool, tierpool), **kwargs)
+ def osd_tier_add(self, pool, tierpool, force_notempty=None, **kwargs):
+ if force_notempty is not None:
+ return self.put('osd/tier/add?pool={0}&tierpool={1}'
+ '&force_notempty={2}'
+ .format(pool, tierpool, force_notempty), **kwargs)
+ else:
+ return self.put('osd/tier/add?pool={0}&tierpool={1}'
+ .format(pool, tierpool), **kwargs)
def osd_tier_cachemode(self, pool, mode, **kwargs):
return self.put('osd/tier/cache-mode?pool={0}&mode={1}'
@@ -621,12 +670,19 @@ class CephWrapper(client.CephClient):
def pg_dump_pools_json(self, **kwargs):
return self.get('pg/dump_pools_json', **kwargs)
- def pg_dump_stuck(self, stuckops=None, **kwargs):
+ def pg_dump_stuck(self, stuckops=None, threshold=None, **kwargs):
+ request = []
+ request.append('pg/dump_stuck')
if stuckops is not None:
- return self.get('pg/dump_stuck?stuckops={0}'
- .format(stuckops), **kwargs)
- else:
- return self.get('pg/dump_stuck', **kwargs)
+ request.append('?stuckops={0}'.format(stuckops))
+ if threshold is not None:
+ if stuckops is not None:
+ request.append('&')
+ else:
+ request.append('?')
+ request.append('threshold={0}'.format(threshold))
+
+ return self.get(''.join(request), **kwargs)
def pg_getmap(self, **kwargs):
kwargs['supported_body_types'] = ['binary']
--
2.5.0

475
ceph/python-cephclient/python-cephclient/0001-US70398-Ceph-Rebase-Update-REST-API-to-0.94.5.patch

@ -0,0 +1,475 @@
From 2253242390ed6dfd1206ae2743ccab4c28437d13 Mon Sep 17 00:00:00 2001
From: Robert Church <robert.church@windriver.com>
Date: Tue, 24 Nov 2015 20:37:39 -0600
Subject: [PATCH] US70398: Ceph Rebase - Update REST API to 0.94.5
Add support for all APIs currently present in the Ceph REST API. This
provides a version 0.94.5 compliant client and include client calls that
were present previously but never added to the python-cephclient.
---
cephclient/wrapper.py | 281 +++++++++++++++++++++++++++++++++++++++++++++++---
1 file changed, 269 insertions(+), 12 deletions(-)
diff --git a/cephclient/wrapper.py b/cephclient/wrapper.py
index 867b68b..871b53a 100644
--- a/cephclient/wrapper.py
+++ b/cephclient/wrapper.py
@@ -58,6 +58,9 @@ class CephWrapper(client.CephClient):
def status(self, **kwargs):
return self.get('status', **kwargs)
+ def version(self, **kwargs):
+ return self.get('version', **kwargs)
+
###
# root PUT calls
###
@@ -83,6 +86,16 @@ class CephWrapper(client.CephClient):
def scrub(self, **kwargs):
return self.put('scrub', **kwargs)
+ def sync(self, validate1=None, validate2=None, **kwargs):
+ request = []
+ request.append('sync/force')
+ if validate1 is not None:
+ request.append('?validate1={0}'.format(validate1))
+ if validate2 is not None:
+ request.append('validate2={0}'.format(validate2))
+
+ return self.put(''.join(request), **kwargs)
+
def tell(self, target, args, **kwargs):
return self.put('tell?target={0}&args={1}'
.format(target, args), **kwargs)
@@ -191,6 +204,44 @@ class CephWrapper(client.CephClient):
return self.get('config-key/list', **kwargs)
###
+ # config-key PUT calls
+ ###
+ def config_key_del(self, key, **kwargs):
+ return self.put('config-key/del?key={0}'
+ .format(key), **kwargs)
+
+ def config_key_put(self, key, val, **kwargs):
+ return self.put('config-key/put?key={0}&val={1}'
+ .format(key, val), **kwargs)
+
+ ###
+ # fs GET calls
+ ###
+ def fs_ls(self, **kwargs):
+ return self.get('fs/ls', **kwargs)
+
+ ###
+ # fs PUT calls
+ ###
+ def fs_new(self, fs_name, metadata, data, **kwargs):
+ return self.put('fs/new?fs_name={0}&metadata={1}&data={2}'
+ .format(fs_name, metadata, data), **kwargs)
+
+ def fs_reset(self, fs_name, sure=None, **kwargs):
+ request = []
+ request.append('fs/reset?fs_name={0}'.format(fs_name))
+ if sure is not None:
+ request.append('&sure={0}'.format(sure))
+ return self.put(''.join(request), **kwargs)
+
+ def fs_rm(self, fs_name, sure=None, **kwargs):
+ request = []
+ request.append('fs/rm?fs_name={0}'.format(fs_name))
+ if sure is not None:
+ request.append('&sure={0}'.format(sure))
+ return self.put(''.join(request), **kwargs)
+
+ ###
# mds GET calls
###
def mds_compat_show(self, **kwargs):
@@ -244,9 +295,13 @@ class CephWrapper(client.CephClient):
return self.put('mds/fail?who={0}'
.format(who), **kwargs)
- def mds_newfs(self, metadata, data, sure, **kwargs):
- return self.put('mds/newfs?metadata={0}&data={1}&sure={2}'
- .format(metadata, data, sure), **kwargs)
+ def mds_newfs(self, metadata, data, sure=None, **kwargs):
+ if sure is not None:
+ return self.put('mds/newfs?metadata={0}&data={1}&sure={2}'
+ .format(metadata, data, sure), **kwargs)
+ else:
+ return self.put('mds/newfs?metadata={0}&data={1}'
+ .format(metadata, data), **kwargs)
def mds_remove_data_pool(self, pool, **kwargs):
return self.put('mds/remove_data_pool?pool={0}'
@@ -260,11 +315,29 @@ class CephWrapper(client.CephClient):
return self.put('mds/rmfailed?who={0}'
.format(who), **kwargs)
- def mds_set_allow_new_snaps(self, sure, **kwargs):
- """
- mds/set?key=allow_new_snaps&sure=
- """
- raise exceptions.FunctionNotImplemented()
+ def mds_set_max_file_size(self, val, confirm=None, **kwargs):
+ if confirm is not None:
+ return self.put('mds/set?var=max_file_size?val={0}&confirm={1}'
+ .format(val, confirm), **kwargs)
+ else:
+ return self.put('mds/set?var=max_file_size?val={0}'
+ .format(val), **kwargs)
+
+ def mds_set_allow_new_snaps(self, val, confirm=None, **kwargs):
+ if confirm is not None:
+ return self.put('mds/set?var=allow_new_snaps?val={0}&confirm={1}'
+ .format(val, confirm), **kwargs)
+ else:
+ return self.put('mds/set?var=allow_new_snaps?val={0}'
+ .format(val), **kwargs)
+
+ def mds_set_inline_data(self, val, confirm=None, **kwargs):
+ if confirm is not None:
+ return self.put('mds/set?var=inline_data?val={0}&confirm={1}'
+ .format(val, confirm), **kwargs)
+ else:
+ return self.put('mds/set?var=inline_data?val={0}'
+ .format(val), **kwargs)
def mds_set_max_mds(self, maxmds, **kwargs):
return self.put('mds/set_max_mds?maxmds={0}'
@@ -332,6 +405,9 @@ class CephWrapper(client.CephClient):
def osd_blacklist_ls(self, **kwargs):
return self.get('osd/blacklist/ls', **kwargs)
+ def osd_blocked_by(self, **kwargs):
+ return self.get('osd/blocked-by', **kwargs)
+
def osd_crush_dump(self, **kwargs):
return self.get('osd/crush/dump', **kwargs)
@@ -348,6 +424,19 @@ class CephWrapper(client.CephClient):
def osd_crush_rule_ls(self, **kwargs):
return self.get('osd/crush/rule/ls', **kwargs)
+ def osd_crush_show_tunables(self, **kwargs):
+ return self.get('osd/crush/show-tunables', **kwargs)
+
+ def osd_crush_tree(self, **kwargs):
+ return self.get('osd/crush/tree', **kwargs)
+
+ def osd_df(self, output_method=None, **kwargs):
+ if output_method is not None:
+ return self.get('osd/df?output_method={0}'
+ .format(output_method), **kwargs)
+ else:
+ return self.get('osd/df', **kwargs)
+
def osd_dump(self, epoch=None, **kwargs):
if epoch is not None:
return self.get('osd/dump?epoch={0}'
@@ -355,6 +444,13 @@ class CephWrapper(client.CephClient):
else:
return self.get('osd/dump', **kwargs)
+ def osd_erasure_code_profile_get(self, name, **kwargs):
+ return self.get('osd/erasure-code-profile/get?name={0}'
+ .format(name), **kwargs)
+
+ def osd_erasure_code_profile_ls(self, **kwargs):
+ return self.get('osd/erasure-code-profile/ls', **kwargs)
+
def osd_find(self, id, **kwargs):
return self.get('osd/find?id={0}'
.format(id), **kwargs)
@@ -398,9 +494,17 @@ class CephWrapper(client.CephClient):
return self.get('osd/map?pool={0}&object={1}'
.format(pool, object), **kwargs)
+ def osd_metadata(self, id, **kwargs):
+ return self.get('osd/metadata?id={0}'
+ .format(id), **kwargs)
+
def osd_perf(self, **kwargs):
return self.get('osd/perf', **kwargs)
+ def osd_get_pool_param(self, pool, var, **kwargs):
+ return self.get('osd/pool/get?pool={0}&var={1}'
+ .format(pool, var), **kwargs)
+
def osd_pool_get(self, pool, var, **kwargs):
return self.get('osd/pool/get?pool={0}&var={1}'
.format(pool, var), **kwargs)
@@ -416,6 +520,13 @@ class CephWrapper(client.CephClient):
return self.get('osd/pool/get-quota?pool={0}'
.format(pool), **kwargs)
+ def osd_pool_ls(self, detail=None, **kwargs):
+ if detail is not None:
+ return self.get('osd/pool/ls?detail={0}'
+ .format(detail), **kwargs)
+ else:
+ return self.get('osd/pool/ls', **kwargs)
+
def osd_stat(self, **kwargs):
return self.get('osd/stat', **kwargs)
@@ -449,6 +560,10 @@ class CephWrapper(client.CephClient):
return self.put('osd/crush/create-or-move?id={0}&weight={1}&args={2}'
.format(id, weight, args), **kwargs)
+ def osd_crush_get_tunable(self, tunable, **kwargs):
+ return self.put('osd/crush/get-tunable?tunable={0}'
+ .format(tunable), **kwargs)
+
def osd_crush_link(self, name, args, **kwargs):
return self.put('osd/crush/link?name={0}&args={2}'
.format(name, args), **kwargs)
@@ -465,10 +580,21 @@ class CephWrapper(client.CephClient):
return self.put('osd/crush/remove?name={0}'
.format(name), **kwargs)
+ def osd_crush_rename_bucket(self, srcname, dstname, **kwargs):
+ return self.put('osd/crush/rename-bucket?srcname={0}&dstname={1}'
+ .format(srcname, dstname), **kwargs)
+
def osd_crush_reweight(self, name, weight, **kwargs):
return self.put('osd/crush/reweight?name={0}&weight={1}'
.format(name, weight), **kwargs)
+ def osd_crush_reweight_all(self, **kwargs):
+ return self.put('osd/crush/reweight-all', **kwargs)
+
+ def osd_crush_reweight_subtree(self, name, weight, **kwargs):
+ return self.put('osd/crush/reweight-subtree?name={0}&weight={1}'
+ .format(name, weight), **kwargs)
+
def osd_crush_rm(self, name, ancestor, **kwargs):
if ancestor is not None:
return self.put('osd/crush/rm?name={0}&ancestor={1}'
@@ -477,6 +603,11 @@ class CephWrapper(client.CephClient):
return self.put('osd/crush/rm?name={0}'
.format(name), **kwargs)
+ def osd_crush_rule_create_erasure(self, name, profile, **kwargs):
+ return self.put(
+ 'osd/crush/rule/create-erasure?name={0}&profile={1}'
+ .format(name, profile), **kwargs)
+
def osd_crush_rule_create_simple(self, name, root,
type, mode=None, **kwargs):
if mode is not None:
@@ -496,6 +627,10 @@ class CephWrapper(client.CephClient):
return self.put('osd/crush/set?id={0}&weight={1}&args={2}'
.format(id, weight, args), **kwargs)
+ def osd_crush_set_tunable(self, tunable, value, **kwargs):
+ return self.put('osd/crush/set-tunable?tunable={0}&value={1}'
+ .format(tunable), **kwargs)
+
def osd_crush_tunables(self, profile, **kwargs):
return self.put('osd/crush/tunables?profile={0}'
.format(profile), **kwargs)
@@ -516,6 +651,18 @@ class CephWrapper(client.CephClient):
return self.put('osd/down?ids={0}'
.format(ids), **kwargs)
+ def osd_erasure_code_profile_rm(self, name, **kwargs):
+ return self.put('osd/erasure-code-profile/rm?name={0}'
+ .format(name), **kwargs)
+
+ def osd_erasure_code_profile_set(self, name, profile=None, **kwargs):
+ if profile is not None:
+ return self.put('osd/erasure-code-profile/set?name={0}&profile={1}'
+ .format(name, profile), **kwargs)
+ else:
+ return self.put('osd/erasure-code-profile/set?name={0}'
+ .format(name), **kwargs)
+
def osd_in(self, ids, **kwargs):
return self.put('osd/in?ids={0}'
.format(ids), **kwargs)
@@ -532,6 +679,17 @@ class CephWrapper(client.CephClient):
return self.put('osd/out?ids={0}'
.format(ids), **kwargs)
+ def osd_pause(self, **kwargs):
+ return self.put('osd/pause', **kwargs)
+
+ def osd_pg_temp(self, pgid, id=None, **kwargs):
+ if id is not None:
+ return self.put('osd/pg-temp?pgid={0}&id={1}'
+ .format(pgid, id), **kwargs)
+ else:
+ return self.put('osd/pg-temp?pgid={0}'
+ .format(pgid), **kwargs)
+
def osd_pool_create(self, pool, pg_num, pgp_num, pool_type=None,
erasure_code_profile=None, ruleset=None,
expected_num_objects=None, **kwargs):
@@ -559,10 +717,6 @@ class CephWrapper(client.CephClient):
request.append('&sure={0}'.format(sure))
return self.put(''.join(request), **kwargs)
- def osd_pool_param(self, pool, var, **kwargs):
- return self.put('osd/pool/get?pool={0}&var={1}'
- .format(pool, var), **kwargs)
-
def osd_pool_mksnap(self, pool, snap, **kwargs):
return self.put('osd/pool/mksnap?pool={0}&snap={1}'
.format(pool, snap), **kwargs)
@@ -583,6 +737,22 @@ class CephWrapper(client.CephClient):
return self.put('osd/pool/set?pool={0}&var={1}&val={2}'
.format(pool, var, val), **kwargs)
+ def osd_pool_set(self, pool, var, val, force=None, **kwargs):
+ if force is not None:
+ return self.put('osd/pool/set?pool={0}&var={1}&val={2}&force={3}'
+ .format(pool, var, val, force), **kwargs)
+ else:
+ return self.put('osd/pool/set?pool={0}&var={1}&val={2}'
+ .format(pool, var, val), **kwargs)
+
+ def osd_primary_affinity(self, id, weight, **kwargs):
+ return self.put('osd/primary-affinity?id={0}&weight={1}'
+ .format(id, weight), **kwargs)
+
+ def osd_primary_temp(self, pgid, id, **kwargs):
+ return self.put('osd/primary-temp?pgid={0}&id={1}'
+ .format(pgid, id), **kwargs)
+
def osd_set_pool_quota(self, pool, field, val, **kwargs):
return self.put('osd/pool/set-quota?pool={0}&field={1}&val={2}'
.format(pool, field, val), **kwargs)
@@ -595,6 +765,10 @@ class CephWrapper(client.CephClient):
return self.put('osd/reweight?id={0}&weight={1}'
.format(id, weight), **kwargs)
+ def osd_reweight_by_pg(self, oload, pools, **kwargs):
+ return self.put('osd/reweight-by-pg?oload={0}&pools={1}'
+ .format(oload, pools), **kwargs)
+
def osd_reweight_by_utilization(self, oload, **kwargs):
return self.put('osd/reweight-by-utilization?oload={0}'
.format(oload), **kwargs)
@@ -611,6 +785,12 @@ class CephWrapper(client.CephClient):
return self.put('osd/set?key={0}'
.format(key), **kwargs)
+ def osd_crushmap(self, **kwargs):
+ """
+ osd/crushmap
+ """
+ raise exceptions.FunctionNotImplemented()
+
def osd_setmaxosd(self, newmax, **kwargs):
return self.put('osd/setmaxosd?newmax={0}'
.format(newmax), **kwargs)
@@ -628,6 +808,11 @@ class CephWrapper(client.CephClient):
return self.put('osd/tier/add?pool={0}&tierpool={1}'
.format(pool, tierpool), **kwargs)
+ def osd_tier_add_cache(self, pool, tierpool, size, **kwargs):
+ return self.put('osd/tier/add-cache?pool={0}&tierpool={1}'
+ '&size={2}'
+ .format(pool, tierpool, size), **kwargs)
+
def osd_tier_cachemode(self, pool, mode, **kwargs):
return self.put('osd/tier/cache-mode?pool={0}&mode={1}'
.format(pool, mode), **kwargs)
@@ -644,6 +829,9 @@ class CephWrapper(client.CephClient):
return self.put('osd/tier/set-overlay?pool={0}&overlaypool={1}'
.format(pool, overlaypool), **kwargs)
+ def osd_unpause(self, key, **kwargs):
+ return self.put('osd/unpause', **kwargs)
+
def osd_unset(self, key, **kwargs):
return self.put('osd/unset?key={0}'
.format(key), **kwargs)
@@ -693,6 +881,44 @@ class CephWrapper(client.CephClient):
return self.get('pg/getmap', **kwargs)
+ def pg_ls(self, pool=None, states=None, **kwargs):
+ request = []
+ request.append('pg/ls')
+ if pool is not None:
+ request.append('?pool={0}'.format(pool))
+ if states is not None:
+ request.append('states={0}'.format(states))
+
+ return self.get(''.join(request), **kwargs)
+
+ def pg_ls_by_osd(self, osd, pool=None, states=None, **kwargs):
+ request = []
+ request.append('pg/ls-by-osd?osd={0}'.format(osd))
+ if pool is not None:
+ request.append('?pool={0}'.format(pool))
+ if states is not None:
+ request.append('states={0}'.format(states))
+
+ return self.get(''.join(request), **kwargs)
+
+ def pg_ls_by_pool(self, poolstr, states=None, **kwargs):
+ if states is not None:
+ return self.get('pg/ls-by-pool?poolstr={0}&states={1}'
+ .format(poolstr, states), **kwargs)
+ else:
+ return self.get('pg/ls-by-pool?poolstr={0}'
+ .format(poolstr), **kwargs)
+
+ def pg_ls_by_primary(self, osd, pool=None, states=None, **kwargs):
+ request = []
+ request.append('pg/ls-by-primary?osd={0}'.format(osd))
+ if pool is not None:
+ request.append('?pool={0}'.format(pool))
+ if states is not None:
+ request.append('states={0}'.format(states))
+
+ return self.get(''.join(request), **kwargs)
+
def pg_map(self, pgid, **kwargs):
return self.get('pg/map?pgid={0}'
.format(pgid), **kwargs)
@@ -701,6 +927,37 @@ class CephWrapper(client.CephClient):
return self.get('pg/stat', **kwargs)
###
+ # pg PUT calls
+ ###
+
+ def pg_deep_scrub(self, pgid, **kwargs):
+ return self.put('pg/deep-scrub?pgid={0}'
+ .format(pgid), **kwargs)
+
+ def pg_force_create_pg(self, pgid, **kwargs):
+ return self.put('pg/force_create_pg?pgid={0}'
+ .format(pgid), **kwargs)
+
+ def pg_repair(self, pgid, **kwargs):
+ return self.put('pg/repair?pgid={0}'
+ .format(pgid), **kwargs)
+
+ def pg_scrub(self, pgid, **kwargs):
+ return self.put('pg/scrub?pgid={0}'
+ .format(pgid), **kwargs)
+
+ def pg_send_pg_creates(self, **kwargs):
+ return self.put('pg/send_pg_creates', **kwargs)
+
+ def pg_set_full_ratio(self, ratio, **kwargs):
+ return self.put('pg/set_full_ratio?ratio={0}'
+ .format(ratio), **kwargs)
+
+ def pg_set_nearfull_ratio(self, ratio, **kwargs):
+ return self.put('pg/set_nearfull_ratio?ratio={0}'
+ .format(ratio), **kwargs)
+
+ ###
# tell GET calls
###
def tell_debug_dump_missing(self, id, filename, **kwargs):
--
2.5.0

1062
ceph/python-cephclient/python-cephclient/US92424-Ceph-Rebase-Update-REST-API-to-10.2.4.patch
File diff suppressed because it is too large
View File

15
ceph/python-cephclient/python-cephclient/add-osd-get-pool-quota.patch

@ -0,0 +1,15 @@
Index: git/cephclient/wrapper.py
===================================================================
--- git.orig/cephclient/wrapper.py 2015-10-26 16:00:32.768154102 +0200
+++ git/cephclient/wrapper.py 2015-11-04 14:46:09.491855340 +0200
@@ -412,6 +412,10 @@
else:
return self.get('osd/pool/stats', **kwargs)
+ def osd_get_pool_quota(self, pool, **kwargs):
+ return self.get('osd/pool/get-quota?pool={0}'
+ .format(pool), **kwargs)
+
def osd_stat(self, **kwargs):
return self.get('osd/stat', **kwargs)

25
ceph/python-cephclient/python-cephclient/fix-osd-crush-remove.patch

@ -0,0 +1,25 @@
---
cephclient/wrapper.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
Index: git/cephclient/wrapper.py
===================================================================
--- git.orig/cephclient/wrapper.py
+++ git/cephclient/wrapper.py
@@ -449,9 +449,13 @@ class CephWrapper(client.CephClient):
return self.put('osd/crush/move?name={0}&args={1}'
.format(name, args), **kwargs)
- def osd_crush_remove(self, name, ancestor, **kwargs):
- return self.put('osd/crush/remove?name={0}&ancestor={1}'
- .format(name, ancestor), **kwargs)
+ def osd_crush_remove(self, name, ancestor=None, **kwargs):
+ if ancestor:
+ return self.put('osd/crush/remove?name={0}&ancestor={1}'
+ .format(name, ancestor), **kwargs)
+ else:
+ return self.put('osd/crush/remove?name={0}'
+ .format(name), **kwargs)
def osd_crush_reweight(self, name, weight, **kwargs):
return self.put('osd/crush/reweight?name={0}&weight={1}'

19
ceph/python-cephclient/python-cephclient/fix-osd-tier-add.patch

@ -0,0 +1,19 @@
diff -rupN a/cephclient/wrapper.py b/cephclient/wrapper.py
--- a/cephclient/wrapper.py 2016-07-04 21:59:06.000000000 +0300
+++ b/cephclient/wrapper.py 2016-07-07 18:01:50.000000000 +0300
@@ -799,11 +799,11 @@ class CephWrapper(client.CephClient):
return self.put('osd/thrash?num_epochs={0}'
.format(num_epochs), **kwargs)
- def osd_tier_add(self, pool, tierpool, force_notempty=None, **kwargs):
- if force_notempty is not None:
+ def osd_tier_add(self, pool, tierpool, force_nonempty=None, **kwargs):
+ if force_nonempty is not None:
return self.put('osd/tier/add?pool={0}&tierpool={1}'
- '&force_notempty={2}'
- .format(pool, tierpool, force_notempty), **kwargs)
+ '&force_nonempty={2}'
+ .format(pool, tierpool, force_nonempty), **kwargs)
else:
return self.put('osd/tier/add?pool={0}&tierpool={1}'
.format(pool, tierpool), **kwargs)

20
ceph/python-cephclient/python-cephclient/set-default-endpoint.patch

@ -0,0 +1,20 @@
---
cephclient/client.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/cephclient/client.py
+++ b/cephclient/client.py
@@ -53,7 +53,12 @@ class CephClient(object):
self.log.debug("Params: {0}".format(str(self.params)))
- self.endpoint = self.params['endpoint']
+ if 'endpoint' in self.params:
+ self.endpoint = self.params['endpoint']
+ else:
+ # default endpoint
+ self.endpoint = 'http://localhost:5001/api/v0.1/'
+
if 'timeout' not in self.params:
self.timeout = None

202
utilities/namespace-utils/LICENSE

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

2
utilities/namespace-utils/centos/build_srpm.data

@ -0,0 +1,2 @@
SRC_DIR="namespace-utils"
TIS_PATCH_VER=0

35
utilities/namespace-utils/centos/namespace-utils.spec

@ -0,0 +1,35 @@
%define _CC gcc
Summary: namespace utils
Name: namespace-utils
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
License: Apache-2.0
Group: base
Packager: Wind River <info@windriver.com>
URL: unknown
Source0: %{name}-%{version}.tar.gz
%description
Titanium Cloud namespace utilities
%prep
%setup -q
%build
%{_CC} -o bashns bashns.c
%install
rm -rf ${RPM_BUILD_ROOT}
install -d -m 755 ${RPM_BUILD_ROOT}%{_sbindir}
install -m 500 bashns ${RPM_BUILD_ROOT}%{_sbindir}
install -m 500 umount-in-namespace ${RPM_BUILD_ROOT}%{_sbindir}
%clean
rm -rf ${RPM_BUILD_ROOT}
%files
%license LICENSE
%defattr(-,root,root,-)
%{_sbindir}/umount-in-namespace
%{_sbindir}/bashns

202
utilities/namespace-utils/namespace-utils/LICENSE

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

59
utilities/namespace-utils/namespace-utils/bashns.c

@ -0,0 +1,59 @@
/*
* Copyright (c) 2015 Wind River Systems, Inc.
*
* SPDX-License-Identifier: Apache-2.0
*
*/
#define _GNU_SOURCE
#include <sched.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
void usage(char *name)
{
printf("usage: %s <pid>\n", name);
}
int main(int argc, char **argv) {
if (argc < 2) {
printf("usage: %s <pid>\n", argv[0]);
return -1;
}
int pid = atoi(argv[1]);
printf("trying to open filesystem namespace of pid %d\n", pid);
char buf[100];
sprintf(buf, "/proc/%d/ns/mnt", pid);
printf("trying to open %s\n", buf);
int fd = open(buf, O_RDWR);
if (fd < 1) {
perror("unable to open file");
return -1;
}
printf("got fd, trying to set namespace\n");
int rc = setns(fd, 0);
if (rc < 0) {
perror("unable to set namespace");
return -1;
}
printf("entered namespace successfully, trying to exec bash\n");
rc = execvp("bash", 0);
if (rc < 0) {
perror("unable to exec bash");
return -1;
}
}

25
utilities/namespace-utils/namespace-utils/umount-in-namespace

@ -0,0 +1,25 @@
#!/bin/bash
#
# Copyright (c) 2015 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
MNT=$1
SELF_NS=$(ls -l /proc/self/ns/mnt 2>/dev/null| sed -r 's/.*\[(.*)\]/\1/')
ls -l /proc/*/ns/mnt 2>/dev/null| sed -r 's/.*\[(.*)\]/\1/' | sort -u | while read ns
do
if [ "$ns" = "$SELF_NS" ]
then
continue
fi
ls -l /proc/*/ns/mnt 2>/dev/null | grep $ns |grep '/proc/[0-9]*/' | sed -r 's#.*/proc/([0-9]*)/ns.*#\1#' | while read pid
do
echo "umount -n -l $MNT" | /usr/sbin/bashns $pid
done
done

202
utilities/nfscheck/LICENSE

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

14
utilities/nfscheck/PKG-INFO

@ -0,0 +1,14 @@
Metadata-Version: 1.1
Name: nfscheck
Version: 1.0
Summary: NFS Audit
Home-page:
Author:
Author-email:
License: Apache-2.0
Description:
NFS Audit
Platform: UNKNOWN

2
utilities/nfscheck/centos/build_srpm.data

@ -0,0 +1,2 @@
COPY_LIST="LICENSE files/*"
TIS_PATCH_VER=0

43
utilities/nfscheck/centos/nfscheck.spec

@ -0,0 +1,43 @@
Name: nfscheck
Version: 1.0
Release: %{tis_patch_ver}%{?_tis_dist}
Summary: NFS Audit
Group: base
License: Apache-2.0
URL: unknown
Source0: nfscheck.sh
Source1: nfscheck.service
Source2: LICENSE
Requires: systemd
Requires: util-linux
%description
NFS Audit
%prep
%build
%install
install -d -m 755 %{buildroot}/usr/bin/
install -m 755 %{SOURCE0} %{buildroot}/usr/bin/nfscheck.sh
install -d -m 755 %{buildroot}/usr/lib/systemd/system/
install -m 664 %{SOURCE1} %{buildroot}/usr/lib/systemd/system/nfscheck.service
%post
/usr/bin/systemctl enable nfscheck.service >/dev/null 2>&1
%files
%license ../SOURCES/LICENSE
/usr/bin/*
/usr/lib/systemd/system/*
%changelog

202
utilities/nfscheck/files/LICENSE

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include