Client interface currently has only one Init method.
Also add a constructor for the Client which is based on resource
defined in clusterctl/api package and a filesystem root to construct
bundle for repository interface. Root is expected to be derived
from the airshipctl settings document manifest.target-path
Factory functions allow to insert custom repository interface
into clusterctl client
Relates-To: #170
Change-Id: Ib27e73043b4776001f405d2d4e96016735c6f46e
Instead of having a lot different arbitrary named commands
such as "cluster initinfra", "cluster control-plane", add
a generic phase command that would provide capabilities
for interacting with phases (e.g. getting list or applying
specific one).
Change-Id: I1ab797121aecbfd2348933dfd993c1a5974edaf9
Relates-To: #162
When using "redfish-dell" as the management type, airshipctl throws an
error due to a missing case statement. This change fixes the regression
by re-adding "redfish-dell" as a remote type.
Change-Id: I8314a1e356d1bb3bb1705762bbeda1adf1db41d2
Signed-off-by: Drew Walters <andrew.walters@att.com>
warning:
* should not use basic type string as key in context.WithValue
Fix:
* Define a separate type for context Key(numRetries) and use the
same to pass value for it
* Added a constant ctxKeyNumRetries to be used by entire package
Relates-To: #148
Change-Id: Ifd464346ae7a8ecd82a1f1073a026af1e182fbef
This type would allow us to control behavior of clusterctl modules
and choose components we want to install, if we put document of kind
Clusterctl into Bundle. In near future we need to generate deepcopy
methods for this object, so it can be used with kubernetes schema
Relates-To: #170
Change-Id: I2f40a7e9b66e0f7f0bbc8b6874ec45f767416c69
Plugin is responsible for resource generation based on template
(go template format is used) supplied to its configuration.
Go template can use an object (map) specified under 'spec'
configuration parameter.
Change-Id: I8c1b7dc5676bfff2f9b1a47f6433177ae796a15f
This is a series of patches that refactor config.go into
several smaller modules, each relating specifically
to one component of the configuration structure.
This patch split bootstrap, context and manifest
related part in separate modules.
Relates-To: #35
Change-Id: I692ab90a62c54f21157e093af0fbdab86c36a486
This change modifies the constructor for StatusMaps, which uses the CRDs
currently residing in a cluster as the basis for how to define a
resource's status.
Change-Id: I15c04c1093c06840dba9b21bd5148b99f1257595
Currently it takes ClusterType as first parameter, however
this parameter can be retrieved via appropriate function
CurrentContextClusterType in the same module.
Change-Id: I205fd7d00bf1745cada88d8fd972dac1dbe0fddf
Early airshipctl usage has identified the need to eject virtual media
on-demand using airshipctl in order to prevent booting from stuck media.
This change adds a command to eject all virtual media attached to a
baremetal node.
Change-Id: Id67fa00489093dcb84ce54216e0553fa6a737ea6
Signed-off-by: Drew Walters <andrew.walters@att.com>
This change introduces a command to power on baremetal hosts.
Closes: #5
Change-Id: Ie76cd7c044cc44629648ef0b02bb7e492ccccdcf
Signed-off-by: Drew Walters <andrew.walters@att.com>
Early airshipctl usage has identified the need to change the power of
remote hosts directly from airshipctl. This functionality is typically
required during the bootstrapping phase of airshipctl; however, the
functionality could be used anytime. A logical home for this
functionality would be in a baremetal command, not a bootstrap command.
Since all functionality performed by the bootstrap command is performed on
baremetal hosts, a natural need has developed to group this
functionality together under one baremetal command.
This change moves all functionality from the remote command to a new
baremetal command.
Once all functionality is grouped within the new baremetal command, a
user can control hosts like this:
airshipctl baremetal isogen generate ephemeral node ISO
airshipctl baremetal remotedirect bootstrap ephemeral node
airshipctl baremetal poweroff [DOC_NAME] shutdown baremetal node
airshipctl baremetal poweron [DOC_NAME] power on baremetal node
airshipctl baremetal reboot [DOC_NAME] reboot baremetal node
airshipctl baremetal powerstatus [DOC_NAME] retrieve baremetal node status
Relates-To: #5
Change-Id: I31239df1593aac5810e66e1918d8d3207b9f60fb
Signed-off-by: Drew Walters <andrew.walters@att.com>
Management support is only available to the ephemeral host. This change
extends support of management features to hosts not labeled as the
ephemeral host.
Change-Id: I0ac917f2633f659e56e67cafc52d2db9d967754f
Signed-off-by: Drew Walters <andrew.walters@att.com>
* Add ability to to replace whole list element filtered by key and
value
* Raise an error in if user has specified wrong list filer in JSON path
* Enables support for a dot character in a value used in list filtering
Closes: #191
Closes: #192
Change-Id: I889550ee88d5738a1fb808ddef6478c3731b1561
Implementation would allow us to build our own cluster-api components
based on airship document bundle.
Relates-To: #170
Change-Id: Ic029fd07ca5221747e49c3cf48e80a3e279ac1f0
This is a series of patches that refactor config.go into
several smaller modules, each relating specifically
to one component of the configuration structure.
This particular patch split auth info and cluster
related part in separate modules.
Relates-To: #35
Change-Id: Ib2abebc87c80549544a8b7775969df9db55aa8be
Some BMCs return response formats that differ from the DMTF Redfish
specification. When the response format varies, airshipctl is unable to
decode the extended information field, leaving the user with the
general, top-level error message "A general error has occurred. See
ExtendedInfo for more information".
This change introduces raw JSON processing for all Redfish error
responses so both observed formats can be handled until this issue is
addressed by the manufacturers.
Change-Id: I6a6e87ecda65292b3cd58a0525985105db350ab8
Signed-off-by: Drew Walters <andrew.walters@att.com>
These are convinience methods, that may be helpful if any of our
modules need to have understanding which cluster they are operating
against.
Change-Id: Ib5d32ac3d4cd3170544bbc4d5bf3044926b52955
Relates-To: #162
If there is no container runtime defined in the airshipctl
config then the error message is not clear. New handler shows
specific error description
Change-Id: Ib5b735ddaa1556a8a88fdb15c4b3942cd010db9b
Some management options are not directly related to the remote direct
functionality, and the remote direct config should not be validated when
they are needed. This change moves those management options to a
dedicated configuration module.
Change-Id: If4388bccbc70b2c77d7804cb4c38644775404242
Signed-off-by: Drew Walters <andrew.walters@att.com>
This commit cleans up the command constructors in an attempt to make the
codebase more uniform and approachable. This includes several refactors:
* Removed the FlagConstants - this makes the help messages and examples
significantly more readable without needed to compile and run
airshipctl
* Long help messages and examples are now constant
* Short, Long, and Examples all begin with a capitol letter
* Flag descriptions begin with a lowercase letter. This matches the flag
description for the builtin "help" flag, making formatting uniform for
all flags
* Removed redundant unit tests on non-leaf commands
This change also updates the documentation for the affected commands.
Change-Id: I8b9dcbfd9846b3deaab06dec17f80643dae78de9