* Move main to cmd/odo.
* Refactor doc generation into one single command.
* Rename for consistency.
* Move commands to pkg/odo/cli.
* Export Add*Flag functions to prepare for move.
* Move validateName to pkg/odo/cli/util/validation.go.
* Move functions used by only one command to the command file.
* Renamed to storage_test since tests are storage-related.
* Move usage template to cmdutils.
* Use RootCmd() instead of var access.
* Move printComponentInfo back to cmdutils and expose.
* Move application to application package.
* Move component to component package. Move componentShortFlag also.
Not sure why it was on delete and not on component.
* Move commands to appropriate packages.
* Rename root to cli.
* Rename main to odo.
* Fix wrong reference to main file.
* Fix(?) generate-coverage.sh.
* Move root command name to cli.go.
* Move Add*Flag functions to genericclioptions/context_flags.
Move adding completion handler to package-specific functions
(duplication >_<)
* Move CmdUsageTemplate and PrintComponentInfo to odo/util package.
* Move VERSION and getLatestReleaseInfo to cli/version package.
Remove now empty cmdutils.
* Start using NewCmd* instead of init. Break import cycle. :)
* Rename client to cmdutils.
* Move to use NewCmd* pattern for all commands.
* Fix cross-compilation target.
* Use constants for flag names.
* Introduce Context struct and use it to replace util.GetComponent
* Remove redundant break statements.
* Do not exit when attempting to access a possibly not defined flag.
* Fix improper logic.
* Add ComponentAllowingEmpty to make it more useful and use it.
* Start removing usage of util.GetAppName
* Remove unneeded check for error (no error can occur there).
* Deprecate GetAppName in favor of Context.Application.
Will need to use Context in completion infrastructure as well but this
will be part of a later PR.
* Remove unneeded (and invalid) GetOrCreateAppName function.
* Deprecate GetAndSetNamespace and remove it where possible.
Can't currently touch the completion handlers.
* Make completion handlers use Context and allow
them to access the current command.
This allows removal of GetAppName and GetAndSetNamespace.
* Replace GetOcClient function by genericclioptions.Client and ClientWithConnectionCheck
* Remove now unneeded global variables and GetOcClient function.
* Fix improper check if component flag has been set.
* Polish and add comments.
* Update FileCompletionHandler.
* Fix formatting.
* Fix AppCompletionHandler.
* Rename existsOrExit to be more explicit.
* Change error code.
* Replace todo by TODO.
* Improve odo link support
- Provide wait flag for secret to be present
- Improve error messages
- Provide detailed statuses for deployed services
Fixes: #846
* Polish
This PR adds `--client` flag to `odo version` command so that,
to check only client version, we dont need to talk to server.
(Similar to `kubectl`)
Usage:
```
odo version --client
```
This is done by making `link` always "inject" a secret into the
DeploymentConfig of the source component.
In the case of services, the secret is created indirectly via the
ServiceBinding.
In the case of components, the secret is created when when we create
the component. In such cases on secret is created per exposed port.
Fixes: #652
This is done because a cluster created with "oc cluster up" can in some
cases (as is the case for OKD 3.11) the endpoint is missing completely
and we don't want the tool to fail in such cases (following the example
set by oc)
Fixes: #872
1. WatchAndPush: The test for this function:
i. Creates a temporary component source directory structure
ii. Mocks implementation of PushLocal to only use compare the diff set against the expected ones
iii. Creates, deletes and modifies some files and folders
iv. Ignores some files and folders specified using regexp
v. Also, stops the watch gracefully at the end of the tests using the newly added extChan channel.
2. e2e test for watch does the following:
i. Uses the wildfly component local source for component creation
ii. Spawns a go-routine to simulate file modifications to test watch
iii. Starts execution of non-terminating watch command witha timeout and when test condition passes
before timeout, the command gracefully exits
fixes#770
Signed-off-by: anmolbabu <anmolbudugutta@gmail.com>
This function adds the --open parameter to `odo url create`.
This will open the created link on the user's default browser.
To test:
```sh
odo create nodejs
odo url create --open
```
Closes https://github.com/redhat-developer/odo/issues/905
The previous implementation only used the command's name as key which
wasn't enough. This implementation requires the command hierarchy to be
resolved before the registration process as the key is generated by
walking back to the root command. The implementation will exit with an
error message if registration happens before the hierarchy is set.
A new struct ServicePlanParameter is introduced that contains
information about all parameters of a plan
The UI is also updated to show this information
(albeit in a non optimized way)
Fixes: #880