* 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 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 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>
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>
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
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>
This change modifies the error messages related to Selectors by
delegating formatting to the Selector's String method.
Change-Id: I88acb70751509e588139ea26a8388661b3f63511
Relates-To: #145
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>
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
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>
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
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
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
This change includes various code cleanups which improve the way that a
developer creates and interacts with ClusterComplexNames.
Change-Id: If3c4326f3ca46db7fd307b50ca260cdb1a82f3f3
This change removes the `Equals` methods from the types defined in
pkg/config. They are not being used anywhere in the code base and as
such are dead code.
A user who wishes to compare objects from pkg/config should defer to
using reflect.DeepEqual (several of the objects in pkg/config were
already using DeepEqual, ending up with the same result).
Change-Id: I12bb88b4bf1646f597af70fc8cca93e8d9f7c653
By default every document is to be deployed to kubernetes however
some documents may need to be skipped, because they serve only
informational purposes and have no consumers in kubernetes cluster
Change-Id: If2ea5659acb319c15cf3f55e9f3d9e86dc647e9f
Relates-To: #130
Closes: #130
By default kustomize cli orders k8s resources, in a way, that they
can easily by applied to cluster, namespaces and crds first. In this
patch set we implementing same behavior
Relates-To: #131
Closes: #131
Change-Id: I4fc75366627ed361ac1da48e89a35949bcb79801
Removing unused declarations of SiteDirectory and AirshipHostKind
Relates-To: #129
Change-Id: I7d0a01d47315bc15adbcf44feb74425865ed325d
Signed-off-by: Alexander Hughes <Alexander.Hughes@pm.me>
Now that initinfra leverages a specific entrypoint using
the cluster type, and the Config.Initinfra subdirectory
there is no need to also require all documents be labeled
with a specific label. That would be redundant.
Change-Id: I41ff1ea01d5f04d7d987d2308636adfff48016ea
SelectByFieldValue method returns new bundle with documents which
values referenced by JSON path comply with function passed as input
argument to the method
Related: #14
Change-Id: I31bb6beee96b0d65719b6976caac63e54c65dcd2
Settings variable, function names, and comments inconsistently use
either Kubeconfig, KubeconfigPath or KubeConfigPath capitalizations.
This is a minor refactor to consistently use the KubeConfig
capitalization variants.
Relates-To: #124
Change-Id: Iaece6683931164ccaa213f4f3385de9c077d26b7
Signed-off-by: Alexander Hughes <Alexander.Hughes@pm.me>
The dynamic client will be needed to interact with any custom resource
that airshipctl doesn't know about. It will be required for checking the
health of a cluster, as well as any other operations that may need to be
performed on generic objects.
This also adds the pkg/k8s/client/fake package, which can be used to
create a mock instance of a client for use in unit tests.
Change-Id: Ia331ff4875a067045f6f9245daee109126fb1d33
Relates-To: #73
Relates-To: #20