518 Commits

Author SHA1 Message Date
Zuul
780c6b8459 Merge "Update Kustomize to v3.3.1" 2020-04-09 10:07:30 +00:00
Zuul
9ad4db66f4 Merge "Fix for Lint warnings" 2020-04-09 10:01:26 +00:00
Zuul
a306429749 Merge "Create documentation for new developers" 2020-04-08 15:58:57 +00:00
Noor Muhammad Malik
e650468379 Create documentation for new developers
This patch updates the develop documentation in docs/source/developers.md.
Adds details on environment setup and uses some of the scripts available
in tools/gate directory.

Change-Id: I76d426746f668f89ab4f9e43ac00f75f47735702
Relates-To: #72
Closes: #72
2020-04-08 19:22:27 +05:00
Yasin, Siraj (SY495P)
f696ed5f11 Fix for Lint warnings
* This commit handles only warnings of mentioned type
  warning:
    comment on exported function <funcname> should be
      of the form "<funcname> ..."
* In this case, there were comments for the exported
  function/constant/var for which warnings raised,
  but not in expected format.
* So this fix is mostly formating the comment to avoid
  lint warnings.

  Observations:
    * comment did not had function name
    * function name in comment was immediately follwed by comma
        => function followed by space and any description is expected
    * function was not mentioned in the first line of the comment
        => when there is multiline comment, first line should start with
           function name

Change-Id: Ife97104ebc1054f4e34259dca51e8bdb42b33bbd
Relates-To:#148
2020-04-07 14:07:45 +00:00
Drew Walters
263f2ecd6f Add remote system shutdown command
This change introduces a system shutdown command that can be used to
power off remote hosts.

Relates-To: #5

Change-Id: I4fa52db055dcb17e344283fbdd772506e12f77fe
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-04-07 13:21:27 +00:00
Drew Walters
a4001d255f Add remote host reboot command
This change introduces a reboot command that allows the user to reboot a
remote host. The reboot command supports any airshipctl remote client
and simply uses the one defined in the remote options.

Relates #5

Change-Id: I6e11430aa60a09172eb3ac0f44d1a6ff17ca91b0
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-04-06 09:26:57 -05:00
Drew Walters
0c3eefe036 Add remote host power status command
This change introduces a command that allows the user to retrieve the
power status of a remote host.

Relates-To: #5

Change-Id: I4d3ded6667a5427ad6814c3d000da3becaec50a1
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-04-03 21:18:18 +00:00
Drew Walters
d25c22a538 Add remote command
This change introduces the remote command. The remote command will be
used to control the power of remote nodes and eventually include the
"bootstrap remotedirect" functionality.

This change is merely an outline of the command. No functionality is
included in this change.

Closes #117

Change-Id: I3291405f36d6a7acc5c8c1f07bd90ad9c2986cd3
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-04-03 20:52:22 +00:00
Drew Walters
b4b792a04f Fix function name misspelling
Change-Id: I8ffb5fc459360fb9cf4cb84dc0d6ab0aa4f30d21
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-04-03 20:49:17 +00:00
Drew Walters
a15f978cad Use new Redfish client
The remote package in airshipctl is tightly coupled to redfish. In the
future, we may need to introduce IPMI or SMASH; however, adding those
clients now would be difficult because of our tight dependence on
redfish. This change implements usage of the new Redfish client, which
implements the generic remote client. It also separates remoteDirect
functionality from the redfish package in order to make it more loosely
coupled.

Relates #5
Closes #122

Change-Id: I45d4ea6e2a4146ea519e94ea701a3ad527e50ca0
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-04-03 18:10:53 +00:00
Drew Walters
bca0a96603 Add mock Redfish client
Remote direct tests mock the go-redfish client in order to avoid making
Redfish API calls. We should be able to mock airshipctl's internal
Redfish API client for unit tests with less side effects. This change
adds a mock Redfish client to reduce the side effects in our remote
direct unit tests.

Relates #5, #122

Change-Id: Ic968c5eefa90aa2065a3f15bb9880edbacf73ece
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-04-03 18:01:45 +00:00
Matt McEuen
e690a4c453 Update Kustomize to v3.3.1
This updates the Kustomize module dependency to v3.3.1,
which has replacement functionality required by the Replacement Transformer
plugin, among other enhancements.

Change-Id: I058114c398464394cfb6b2626cb475d763c1bacc
2020-04-03 12:11:33 -05:00
Zuul
ad8c87611b Merge "Use 16GB flavor for gate job and let it vote" 2020-04-03 17:09:27 +00:00
Zuul
ddfb6ebdbe Merge "Add a HTTPS-->HTTP reverse proxy in front of redfish-emulator" 2020-04-03 15:03:51 +00:00
Zuul
01ca21754d Merge "Fix ironic deployment template" 2020-04-03 14:59:02 +00:00
Zuul
effc58d511 Merge "Add Bare Metal Operator Ironic entrypoints" 2020-04-03 14:46:59 +00:00
Zuul
004e9c47ac Merge "Switch gate to official isogen image" 2020-04-03 08:07:42 +00:00
Zuul
a200af5810 Merge "Remove external role dependency from gate job" 2020-04-03 00:42:01 +00:00
Stanislav Egorov
3063e207b3 Use 16GB flavor for gate job and let it vote
Gate job can be run on a 16GB flavor as well as 32GB.
It's better to use less resources if this works for tests.

Depends-On: https://review.opendev.org/#/c/715055/

Change-Id: I198d640584e80dc6ca3626a6b23855c2aba6bf60
2020-04-02 21:28:34 +00:00
Stanislav Egorov
b4a4be2a7f Switch gate to official isogen image
Change-Id: I65e02251b2f6c747c72a38bb20caf2dd3978ea7c
2020-04-02 14:17:15 -07:00
Vamsi Savaram
5bf96b27d6 Add a HTTPS-->HTTP reverse proxy in front of redfish-emulator
This patch introduces a reverse proxy that terminates an HTTPS
connection and forwards it to the redfish emulator behind that
is running HTTP. Also the reverse proxy presents a self-signed
certificate.

Closes: #136
Relates-To: #136

Change-Id: If6ee705247ae8866d2674bff1ff034277f9c9177
2020-04-02 10:21:37 -05:00
Drew Walters
f3262bc015 Retrieve actual virtual media ID and types
The "GetVirtualID" method is stubbed for our Redifsh implementation and
always returns the same values. This change uses the Redfish client to
retrieve the correct virtual media ID and type.

Closes #141

Change-Id: I319b89c13349e7b2f5bf6eb8ced97c949e5f44b5
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-04-02 15:13:41 +00:00
Ian Howell
bc949f259f Improve error messages related to Selectors
This change modifies the error messages related to Selectors by
delegating formatting to the Selector's String method.

Change-Id: I88acb70751509e588139ea26a8388661b3f63511
Relates-To: #145
2020-04-02 08:07:05 -05:00
Zuul
0ad22d69b6 Merge "Add remote Client interface" 2020-04-02 07:12:28 +00:00
Zuul
17be5ca472 Merge "Remove personal keys from ephemeral userData" 2020-04-01 21:31:33 +00:00
Zuul
5f1eff7858 Merge "Reduce the complexity of ScreenRedfishError" 2020-04-01 21:31:31 +00:00
Zuul
99189e3d5a Merge "Fix Redfish error handling logic" 2020-04-01 21:31:30 +00:00
Zuul
c6a02fc64b Merge "Remove mac address from networkdata" 2020-04-01 21:20:30 +00:00
Zuul
d9c38616e3 Merge "Improve document.Selector's String method" 2020-04-01 21:20:29 +00:00
Ian Howell
68ec25db22 Reduce the complexity of ScreenRedfishError
Change-Id: I69b7e546cd814f5e3b6b890348f4e808058ae6ef
Relates-To: #142
2020-04-01 15:34:51 -05:00
Kostiantyn Kalynovskyi
c5978363b3 Remove mac address from networkdata
Change-Id: I275c2ec370d61ffcad08fd9ecafafcf782d9057f
2020-04-01 15:27:36 -05:00
Drew Walters
7732567483 Remove personal keys from ephemeral userData
There are personal authorized user keys in the ephemeral userData, but
cloud init already configures password auth. This change removes the
unnecessary keys.

Change-Id: I0054e0dd87dee2dbdbb74cbfe6084e586db4720b
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-04-01 20:24:11 +00:00
Drew Walters
bd51d1f31b Add remote Client interface
The remote package in airshipctl is tightly coupled to redfish. In
the future, we may need to introduce IPMI or SMASH; however, adding
those clients now would be difficult because of our tight dependence on
redfish. This change adds a Client interface, remote.Client, that will
be implemented by all OOB clients (i.e. Redfish, SMASH, IPMI) in order
to satisfy remoteDirect and future power commands. This change also
creates a Redfish client that implements the client.

A future change will remove the old Redfish client and de-couple the
remoteDirect functionality from the redfish package.

Relates #5, #122

Change-Id: Id9fe09e74efef0c4fcd5b92a1c12897217a4dae1
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-04-01 18:37:47 +00:00
Ian Howell
714496fc1f Improve document.Selector's String method
This change adds additional output to a document.Selector's String
method, making it easier to find information about the selector being
used. This is particularly helpful when reporting errors, such as those
in #145.

Change-Id: Ic3e67e7597776feec328ad4f54fdf06df863d928
Closes: #145
2020-04-01 10:24:32 -05:00
Drew Walters
ddd0f389be Fix Redfish error handling logic
A logic error in the ScreenRedfishError function causes a false success
if there is no error unmarshalling the body of a GenericOpenAPIError.
This change corrects the logic error and modifies some status checks to
use the http library constants for readability.

This functionality remains untested. The body field of the
GenericOpenAPI error is unexported; therefore, it is inaccessible to our
unit tests.

Fixes: #142

Change-Id: Ic9f248c239830e0b6013a2e2c5d74ea4d2ef25af
Signed-off-by: Drew Walters <andrew.walters@att.com>
2020-04-01 14:42:52 +00:00
Pete Birley
0f8b2032ce Fix ironic deployment template
This PS simply removes some duplicate keys in the ironic deployment
template.

Change-Id: Ib51fd05bf8c0be3b03b9265c90f341ac04000d76
Signed-off-by: Pete Birley <pete@port.direct>
2020-03-31 15:40:59 -05:00
Nikolay Fedorov
3ee25a7a7b Add Bare Metal Operator Ironic entrypoints
Relates-To: #105

Change-Id: Ia64033ec55865848ccf34cc3d8b8f51859c89785
2020-03-31 15:39:16 -05:00
Kostiantyn Kalynovskyi
559788c739 Add missing bmh secret for gate manifests
Change-Id: Ifbdf6210670786b4a769f8e3467aec51c3be96a1
2020-03-31 11:02:39 -05:00
Zuul
8fa2d4b45b Merge "Add Bare Metal Operator Ironic config files" 2020-03-31 14:49:46 +00:00
Zuul
bec9be6390 Merge "Add Bare Metal Operator resources" 2020-03-31 14:47:50 +00:00
Sreejith Punnapuzha
6fea813dba Remove external role dependency from gate job
This ps removes docker-install role import from openstack-helm-infra
in airship-airshipctl-gate-test. This will enable the gate to use
docker role defined in airshipctl repo

Depends-On: https://review.opendev.org/#/c/715055

Change-Id: Ia01aa8f58a2e0bcfcdd611f6a76c82acfda101c7
Signed-off-by: Sreejith Punnapuzha <sreejith.punnapuzha@outlook.com>
2020-03-30 16:15:35 -05:00
Zuul
6ea552bbbc Merge "Add Redfish Authentication Support" 2020-03-27 23:30:59 +00:00
Alan Meadows
e2cca32748 Add Redfish Authentication Support
This commit also introduces a dochelper concept.  This provides
some convenience methods to the document pkg that help extract data
from known document types as well as walk document relationships to
discover related information such as BMC credentials for baremetal
hosts.

Once merged, a follow up patchset will leverage these within the
cloud-init code to deduplicate some of these lookups.

Change-Id: Ie6a770ce4b34adbea30281917f0cb2fdc460b4fb
2020-03-27 15:29:07 -07:00
Ian Howell
77ebd891a2 Cluster Status library tools
This adds the StatusMap type, which can be used to gather the Status of
a given kubernetes resource. A StatusMap can be created from a
document.Bundle and represents all possible Statuses for all
CustomResources, and the conditions that must be met for those statuses
to be valid.

Relates-To: #73
Change-Id: If2cba0bb9890fe28feff0c890bb8036489196fc4
2020-03-27 16:09:15 -05:00
Zuul
d74412dd48 Merge "Fixed runtime log gathering" 2020-03-27 20:17:36 +00:00
Zuul
21c7c166ff Merge "Allow remotedirect to ignore http*_proxy settings" 2020-03-27 18:46:23 +00:00
Alan Meadows
2e7e6709ca Allow remotedirect to ignore http*_proxy settings
The airshipctl client performs several roles, some of them
benefit from the use of proxy settings and some of them are negatively
impacted by a proxy.

This patchset allows you to explicitly enable
remotedirect to leverage http*_proxy environmental settings but
defaults to ignoring them as that is the desired behavior that
most users will appreciate with communicating directly with BMC
(e.g. redfish) URLs.

At some point, this likely should be followed up with a more holistic
approach of how to configure airshipctl to use a proxy for some functions
but not others but this may be good enough for now.

Change-Id: I10ae4da765aaeb6633df2ca9cde5e6ab543937a5
Relates-To: #143
2020-03-27 09:44:39 -07:00
Ian Howell
567e063589 Refactor ClusterComplexName
This change includes various code cleanups which improve the way that a
developer creates and interacts with ClusterComplexNames.

Change-Id: If3c4326f3ca46db7fd307b50ca260cdb1a82f3f3
2020-03-26 17:46:35 -05:00
Zuul
cbc1e931ae Merge "Remove the various Equals methods from pkg/config" 2020-03-26 22:43:09 +00:00