* 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
This PR does:
* Adds flags `project`, `application` and `component` flag to respective commands
* added `getProjectName` and `getAppName` reusable functions which looks for `project` or `application` flag first, if not provided then it gives current value by default.
* Provide comments to some of the exported functions
* Refactors the way we provide `namespace` value for methods in `occlient.go`.
(No method will accept namespace as a argument, whenever needed we will use `client.Namespace` value)
* Updated unit tests as per new refactoring
* Initial implementation setting up of smart completion.
* Initial implementation for service delete.
* Initial implementation for service create.
This doesn't work properly because we really need to be able to
distinguish between positional arguments.
* Clean-up.
* Add doc.
* Add doc.
* Refactor completion handler code to make it easier to test. Add tests.
* Update vendor.
* Filtering doesn't occur at the completion handler level at this point.
* Add test for delete completion.
* Update glide and vendor.
* Fix format.
* Fix format.
* Add MPL-2.0 to licenses.
* Revert to 1.1.2 version of complete library due to bug with 1.2.0.
See https://github.com/posener/complete/issues/74
* Fix odo -h.
* Added the odo catalog describe service command e.g `odo catalog describe service <service-name>`
Functions GetClusterServiceClass() and GetClusterPlansFromServiceName() are added to occlient to get the service class and the plans associated with the class.
Signed-off-by: mik-dass <mrinald7@gmail.com>
* Fixed the service command format and examples
Signed-off-by: mik-dass <mrinald7@gmail.com>
* Fixed the problem of checking in application for service existence
* Add support for optional params
* Renamed some plan variables and the short/long description for generic describe command
* Fixed sentance and indentation in the example