20 Commits

Author SHA1 Message Date
Mark D Horn 13b28fd349 yaml: switch to strict unmarshal
Enable Strict Unmarshal to ensure that we fail on unknown
tokens and duplicate tokens.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-05-08 15:03:31 -07:00
Mark D Horn 59302346d6 linter: enable whitespace
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2020-04-24 14:53:17 -07:00
Karthik Prabhu Vinod f2c78d56e6 Make a tab(\t) count as 4 char
Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-04-10 00:08:40 -07:00
Karthik Prabhu Vinod 8da9febcd4 Fix long line issues
Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-04-10 00:08:40 -07:00
Karthik Prabhu Vinod 57496cc494 Fix network test
This fixes the network test to use systemd-network or NetworkManager
service based on what is active

Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-03-18 20:15:22 +00:00
Karthik Prabhu Vinod ccc97c99fa Implement GO Modules
Signed-off-by: Karthik Prabhu Vinod <karthik.prabhu.vinod@intel.com>
2020-02-26 00:51:57 +00:00
John Akre 66a93b8668 network: Add HTTP warning to IsValidURI
When --allow-insecure-http is not set and the IsValidURI function
recieves an HTTP URI, a warning will be displayed.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-03 13:36:47 -07:00
John Akre 10f1ecea4d Move IsValidMirror to network package
The IsValidMirror function was moved to the network package and renamed
to IsValidURI because it can be used for more than swupd mirror validation.
The IsValidURI function is used to check for supported URI protocols.

Signed-off-by: John Akre <john.w.akre@intel.com>
2019-10-02 16:46:40 -07:00
Mark D Horn 55df2389ae network: Always copy /etc network files
When executing interactively, text-base or graphical, we want
to always copy any local /etc network configuration files to
the target system.

If the user has made customer network settings, usually with
nmcli/nmtui for console, or NetworkManager on the desktop, these
will want to be propagated to the target.

Add command line option to avoid network copy.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-05-15 12:52:04 -07:00
Mark D Horn f993546d80 network: Change in network bundle name
Switch from NetworkManager-basic to NetworkManager for the pending
network patch set.

Change to running each systemctl command in sequence instead of as
a single command to improve the recovery rate for network restart.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-05-06 13:36:34 -07:00
Reagan Lopez f6e38af962 gui: Add second set of translations
Add the second set of translations and fix issues due to the increase in
the size of texts.

Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2019-05-02 14:57:29 -07:00
Reagan Lopez 9ee68d0a3e Initialize localization in test files
Signed-off-by: Reagan Lopez <reagan.lopez@intel.com>
2019-04-23 18:52:18 -07:00
Mark D Horn 6e6ede72bd gui: Forward port Download User Messages
Graphical UI version of the previous TUI feature

New functionality to download Pre and Post Installer messages
TODO: Display the messages as pop-ups
- Need to use system curl command to handle proxies for now

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-19 14:29:35 -07:00
Ikey Doherty 277c049a11 network: Use absolute file paths to ensure pkexec doesn't mess PATH up
Signed-off-by: Ikey Doherty <ikey.doherty@intel.com>
2019-04-19 14:29:35 -07:00
Mark D Horn 3945c9aeb2 network: Add support for Network Manager
Now check for which service is handling wired network interfaces.
Needed by the TUI which still handles static IP configurations for
wired connections.

TODO: Once NetworkManager is the new OS default, we can explore
configuring wireless interfaces via the TUI as well.

TODO: Consider change the other systemctl calls to use new dbus.

Dropping coverage requirement for this build

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-04-19 10:57:15 -07:00
Mark D Horn 786a1f27b5 Download User Messages
New functionality to download Pre and Post Installer messages
TODO: Display the messages as pop-ups
- Need to use system curl command to handle proxies for now

Refactoring for enabling:
- Moved FetchRemoteConfigFile from conf to network
- Move code for Clear Linux Version parsing until a utility function
  which is called early in the flow for reuse

Now that use external curl FILE protocol passes.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-03-11 17:11:55 -07:00
Mark D Horn a53dc00958 Fix setting static IP
We also need to set either proxies or the
DNS search domain to enable pacdiscovery
if network testing does not pass.

Need to add:
    systemctl enable pacdiscovery on target
    Ensure we copy the /etc/systemd/network settings

- Fixed bug in showing dns server per interface
- Add new DNS Domain field per interface
- Mask out (skip) Wireless and Bridge interfaces
- Update Network Interface TUI
  - Added DNS Domain
  - Widen screen for error messages
  - Moved Error labels before field

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2019-03-06 11:27:53 -08:00
Leandro Dorileo f19841287c local-travis: add a travis "emulation"
This patch introduces the local-travis, an small util program locally
emulate the remote travis execution. The program will read the travis
yaml file and execute the tasks.

The program is not intended to be manually executed but wrapped by
"make check-coverage". The program uses the env var TRAVIS_CONF to
know where to find the travis yaml file (the makefile will have it all
set for you).

We also use the http_proxy, https_proxy and no_proxy if they are set.
If we're executing a docker command that supports -e flag then these
variables are also handled.

The check-coverage.sh script will also auto update the coverage database
and commit the changes if it detects a coverage increase. In order to
do that check-coverage will only update the database if there's no
unstaged changes in the tree and if it's being executed with
make check-coverage.

Signed-off-by: Leandro Dorileo <leandro.maciel.dorileo@intel.com>
2018-09-26 14:33:21 -07:00
Mark D Horn 72c68dabe8 Enable Public Travis-CI
Fix version of Golang for Travis
Setting to 1.10 get parsed as a float and interrupted as 1.1 instead
of 1.10. Adding quotes so it is treated as string.
See: https://github.com/travis-ci/travis-ci/issues/9247

Revamp to use a Clear Linux Docker image for build and test.
- Telemetry not starting due to systemd issues
- Disabled Telemetry testing under this is resolved

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-08-15 15:36:47 -07:00
Mark D Horn e84bb0e403 First Open Source push of code base
This is code is still alpha. The Text-based User Interface is
undergoing a resign of the layout before beta.

Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
2018-08-13 14:14:30 -07:00