The Dell Redfish implementation slightly deviates from the DMTF Redfish
specification. One variation is the Dell specification's classification
of virtual media, in which the Dell variation adds support for virtual
CDs and virtual floppy drives [0]. In order to perform some actions on Dell
hardware, airshipctl needs support for vendor specific clients.
This change introduces ephemeral boot media support for iDRAC systems
using a proprietary API in the Dell client.
During the creation of this change, it was also observed that Redfish
calls fail when media is already inserted. This change adds a check
to eject media if media is already inserted.
[0] https://www.dell.com/support/manuals/us/en/04/idrac9-lifecycle-controller-v3.2-series/idrac_3.21.21.21_redfishapiguide/virtualmedia?guid=guid-d9e76cf6-627d-4cb9-a3de-3f2b88b74cfb&lang=en-us
Closes: #139
Co-authored-by: Drew Walters <andrew.walters@att.com>
Change-Id: Ic9fd9e1493b1ff1bb20e956ae5f821d137c74760
* The function definition for WithToDiscoveryClientByError and
WithDynamicClientByError seems to be swapped by mistake.
* So aligned the function definiton to its signature
Change-Id: I7e293b148765f460d007aa4a6dc931defeb879b5
This change accomplishes the following:
* Add a constructor for fake.Clients
* Add the ResourceAccumulator type and several instances of
ResourceAccumulators, each of which is intended to supply a fake.Client
with arbitrary kubernetes resources.
* Add the client.Factory type, which provides an easier method of
providing a fake.Client in place of a real one.
Change-Id: I97f5a613df3ca14bc4fdcf726d3e20c5413cbb5b
This change adds the APIExtension ClientSet to airship's client wrapper,
allowing interactions with CRDs.
Change-Id: Ic156551fde132754915cdb957dd3d82221744cc3
Goland is complaining of a number of bad practices, and unused code.
This patchset addresses some of those complaints, such as:
- struct initialization without field names
- error string should not be capitalized or end with punctuation
- name starts with package name
- duplicate yaml keys
- snake case
- redundant parentheses
For the http.Transport redundant parentheses, the lint target fails
without the use of //nolint:errcheck so it has been added as
(currently) there is no potential for there to be an error returned
see [0] for example.
[0] https://golang.org/src/net/http/transport.go#L42
Change-Id: Ib1b20639c9b6e9be097ef1f158ecd7472f578488
Signed-off-by: Alexander Hughes <Alexander.Hughes@pm.me>
The go-git module (and helper modules) recently moved from
`gopkg.in/src-d/go-git` to `github.com/go-git/go-git` [0]. This commit
switches to the new module, as well as uplifts from v4 to v5.
[0] https://github.com/src-d/go-git/issues/1295#issuecomment-592965250
Change-Id: I2e73ba7bb1220a3c75c0d81aa5ab0f1f13479161
This updates the Kustomize dependency for airshipctl to
api/v0.3.1, which is the oldest version which will support the
Replacement Transformer plugin.
Some changes were needed to accomodate the fact that various apis
that airshipctl was relying on were moved to kustomize-insternal
packages, namely:
- Integrated with the krusty.Kustomizer to drive kustomization
- Removed the custom plugin loader which leveraged the Unknown type
- Worked around NoFieldError becoming private, inc. removing a test
As a follow on we'll need to re-integrate plugin functionality somehow.
Also, in this release Kustomize has implemented support for the
"config.kubernetes.io/local-config" annotation, which we'd planned
to use to to avoid deploying some documents to the Kubernetes API.
It turns out the semantics are different than we anticipated;
Kustomize also fails to return these docs via document *selection*.
Therefore, this change reverts to an earlier approach which uses
a custom airshipit.org/deploy-k8s label.
Change-Id: I7022e12464ea7b6a3ca8609f99f3699bf8da0edd
The initial version of gating playbook contained ability
to run them either on Python2 or Python3 ansible.
But it causes a lot of issues e.g. a need to install[1] both
versions of libs to support both possible ways to run,
discrepancy between local and Zuul run[2]
Zuul testing is done with ansible running on Python3 [3].
Meanwhile ppa repo for ansible contains ansible pachage
that depends only from python2. There is no package for
Python3 and we used only Python2-ansyble.
The fact that Zuul runs it with different configuration
means that we'll keep facing the issues with dependencies
in future, since Gating doesn't test it.
This patch changes makes local scripts run as Zuul.
PS
The script partially takes care of reverting intallation
from its previous runs. To cleanup completely it's possible
to run [4] in case these pacakges are not used by anyone else
[1]
https://opendev.org/airship/airshipctl/src/branch/master/roles/libvirt-install/tasks/main.yaml#L38
[2]
https://review.opendev.org/#/c/717841/https://review.opendev.org/#/c/718590/
[3]
https://zuul.opendev.org/t/openstack/build/4096513604a84cd2b2f2578fc3f98660/log/zuul-info/host-info.primary.yaml#498
[4]
if dpkg -l | grep "ansible.*ppa~bionic"; then
sudo apt -y remove ansible
sudo apt -y autoremove
sudo add-apt-repository -r -y ppa:ansible/ansible
sudo apt-get -y update
fi
+ possibly
sudo apt remove virtinst python-libvirt python-docker python-requests python-lxml python-libvirt
Change-Id: Ia1ac3aa4128f6c4797dea1709ccb8516ae342a66
The methods are useful when incoming data are not key value pairs,
rather than iterating two times, one time when we call Annotate()
or Label() over the map, and then iterate again inside the function,
it would be better if we could skip iterating the first time, and
let everything to be handled by Annotate or Label functions
Relates-To: #162
Change-Id: Ia9d989a0534d15e4024317c4606a187ac021b751
* added license templates for go, bash & yaml in tools dir
* added a script that will add license information for all
missing files. Type: go, yaml, yml, sh
* skip adding license for all files within testdata
* Syntax:
> ./tools/add_license.sh
* Skip license for manifests folder
* Added one extra line after licene for yaml files
* Added License after Hashbang for bash.
* Add an extra line after hashbang and before license
* Updated the go template to use multiline comments
New Files:
1. tools/add_license.sh
2. tools/license_go.txt
3. tools/license_yaml.txt
4. tools/license_bash.txt
Change-Id: Ia4da5b261e7cd518d446896b72c810421877472a
Realtes-To:#147
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
This change removes the getters and setters for the following attributes
of pkg/environment.AirshipCTLSettings:
* airshipConfigPath
* kubeConfigPath
* config
The above attributes have been exported to account for the removal of
these methods.
Change-Id: I4e7d38bf6771f7521179a2fe2990475b936b5d95
* 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
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>
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>
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>
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>
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>
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>
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
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