We need to hook the post-build action into the main ngcpcfg script,
otherwise we cannot call it standalone, nor get help about it.
Fixes: commit ad0cf94b46
Change-Id: I9a1173ac88d0f13797b50bad7fdaa3539752a903
We will use this new action to handle database actions that are
currently done in the commit action.
These need to be performed after build and before service, so that
any service restart will have the correct grants and schema changes
to be able to operate correctly.
Change-Id: Ia13c40bcd219902fa523f989d3f1f686fdff93a1
- Update copyright years.
- Remove «Priority: optional» field, which is now the default.
- Remove boilerplate comment from dh-make from maintainer script.
- Do not use unbalanced quotes in error message in maintainer script.
- Fix vim modelines in bash-completion scripts to set file type to bash.
- Fix comments in debian/rules.
- Unify make lists by terminating them with «#EOL» on its own line.
- Wrap and sort fields.
- Add spaces around operators in make variables.
Change-Id: Ic5c7fba4fd019786d34d308b1aade0c7a92d4b18
- Update copyright years.
- Update Standards-Version to 4.7.2
- Remove Rules-Requires-Root now defaulting to «no».
- Remove ancient conffile removal handling.
- Remove dependencies for versions earlier than the previous LTS.
- Sort fields by strength and use: Depends, Conflicts, Replaces, Provides.
- Switch to dh-sequence-bash-completion instead of Build-depends and
dh --with.
- Minor coding style fixes.
Change-Id: I2cf62db7ebdd03075ca44e4e4ffdf0ccd463c00b
This field tells dpkg-buildpackage that no debian/rules target needs
to run as root-like (usually via fakeroot), and can be built with no
privileges (real or faked ones). This should make the build either
faster as there will be no interposed libc calls via an LD_PRELOAD
library like fakeroot does, and more robust as fakeroot needs to keep
up with implementation details from the system libc; or more secure if
the build was being done via real root.
The full documentation can be found with «man deb-src-control» and
at «/usr/share/doc/dpkg/spec/rootless-builds.txt».
Some test cases in the test suite require execution under root-like,
and if not will fallback to use `fakeroot`. Once we stop running the
build as root-like (via fakeroot), the test then tries to execute
fakeroot which cannot be found any longer as there is no explicit
Build-Depends on it, so we need to add it explicitly.
After the above, there is no longer any need to run the build as
root-like. A rebuild before and after this change produces the same
file list and permissions.
Change-Id: I639a3c77dc0a74430813377124eedf197589121a
We move some of the OpenPGP support into this file, which we will extend
once we switch to use the OpenPGP Stateless OpenPGP support.
Change-Id: I56acd993cb394dd8bc12a8da3cf4c78088adb61b
* sync_timezone_version() checks the current olson database
version from DateTime::TimeZone vs ngcp.timezone.version
and updates billing.contacts.timezone field with the new
names following the "links" (aliases)
Change-Id: Iacb552a9151ffb8eaaa40a16b530cbde0cc4b718
These commands are db-specific, and the constants one involves the
database credentials, so give both better names to make it clear these
are not general purpose commands.
Preserve backwards compatibility symlinks for external callers, or
user muscle memory, which this gets migrated away.
Change-Id: I3baae364e786ebbdc9e386dfc4f8c0bf54333cd1
Move perl code which actually modifies yml file to separate helper as
there is no sense to recreate it every call of 'ngcpcfg del'.
Change-Id: Iab9e023318cf9798bdb10d89b08dc2afe125c495
Move perl code which actually modifies yml file to separate helper as
there is no sense to recreate it every call of 'ngcpcfg set'.
Change-Id: I08b10186b1aa127d4a2b81ef36b234dfdd46fc8e
Introduce a list of checks related to connections:
* check that we don't have instance names duplicates
* prove an existence of a preferred for instnace host
* an instance to which instance gets connected exists
* a host to which instance gets connected exists
* interface via which instance gets connected is defined
Change-Id: I24f43b0fb24e308f571a88f30a72a9b6dd04b94d
We add support for YAML schemas, and hook it into the check command to
validate the sites.yml file.
Change-Id: Ic6ed43e36361d395b485230af4ec3cf7e77758bb
The configuration files specific to the ngcpcfg tool should not be
mixed with the site specific configuration, as that's rather confusing,
more so when the actual ngcpcfg configuration contains references to the
location of the ngcp-config dir itself, which makes it self-referential.
Change-Id: I93f59e2ce3441c2c315956f68e22e4b2e9c839ac
The factory_default files are not created anymore by the installer,
and the systems.cfg file is neither created by the installer nor
needed or used since commit 5e2037cf82.
Change-Id: I9c58021db307f23923b4cfee8a1862561dc09d3d
Path.is_relative() (as used in t/fixtures/programs.py) is a new feature
as of Python 3.9, see
https://docs.python.org/3.9/whatsnew/changelog.html?highlight=is_relative_to
and https://github.com/python/cpython/issues/81870
When running with an older python3 version, tests fail with:
| env = {}
|
| def prepare_conf(env={}):
| testenv = define_env(env)
| ngcpcfg_path = testenv["NGCPCFG"]
| > if not ngcpcfg_path.is_relative_to(CWD):
| E AttributeError: 'PosixPath' object has no attribute 'is_relative_to'
While python3-pytest depends on python3:any, let's keep the build
dependency slim, by build-depending on the python3-minimal package only.
Problem spotted while trying to debug the git safe.directory issue
in an outdated bullseye based container, providing python3 3.7.5-3.
Change-Id: Ib620a796a780817a81a51d791a766c950b1a541c
This new action concatenates the various configuration files and outputs
the result as YAML. This is useful because they have a determined
ordering, and include optional host specific files that might not be
obvious how to merge.
This will also be the foundation for verifying all the current host
settings against the cfg-schema.
Change-Id: I72a61193f74caf3b2f7a58a47eefad2ed46c973a
will provide a new instance_info variable with the all the content
defined at network.yml for the instance
removed intance_name since instance_info.name has the same value
Change-Id: I349d0b430b59280bc383d46d5ba6a61f5d1f9046
we need to produce different output for each instance defined
from the same source
* helper/instances-info, produces the needed output to feed
helper/tt2-process with the proper arguments to build
instances files. We inject ``instance_name`` with the
proper value to templates and INSTANCE_NAME to hooks
environment
* ${NGCPCTL_MAIN}/ngcpcfg.instances is where we define the
supported instance templates and where the output path is
* helper/tt2-process, add -r --replace <path:path> option
in order to allow generation of different output from
the same source
Change-Id: I067266b5226485ea0d6c3bc3436275c5553a8177