DESCRIPTION

Bug 468966 - New Connection Wizard fails when no settings are detected

Refactored the wizard page to use Databinding and to validate
connection settings input:
- the unix socket exists and is readable/writable
- the TCP connection scheme is "tcp", "http" or "https"
- the TCP connection host and port are valid
- the path to certificates exists and is readable
  (those values are validated according to the connection
   mode)
- automatically insert a "unix://" prefix (scheme) in the
  "Unix Socket" field when the user selects a file from
  the FileDialog

Change-Id: I193461394f906119f00125ba982aedd942ebd1b8
Signed-off-by: Zechariah Krause xxx@xxx.xxx


COMMENTS

author: Zechariah Krause
date: 2015-08-27 10:06:44.000000000

Uploaded patch set 8.

-------------------------------------
author: Brenden Conley
date: 2015-08-27 10:06:50.000000000

Patch Set 8:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/9836/

-------------------------------------
author: Brenden Conley
date: 2015-08-27 10:27:40.000000000

Patch Set 8: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/9836/ : SUCCESS

-------------------------------------
author: Nathanael Holden
date: 2015-08-31 16:18:07.000000000

Patch Set 8: Verified-1

(1 comment)

Just some things I've noticed to fix :

- Both unix options and tcp options are active when you create a new connection with no daemon's configured. This seems like a bug in the initial state for that situation. I think the initial state for that case should be "Use custom connection settings" unchecked and the user should take it from there.

- I think if the user ommits a scheme for the case of a tcp connection that could still be acceptable. If no scheme and they don't "Enable authentication" then we know they mean http so it's valid. If they select "Enable authentication", then we know they mean https. This logic is already implemented in the builder so
the only thing required is to permit this usage.

Line:492, containers/org.eclipse.linuxtools.docker.ui/src/org/eclipse/linuxtools/internal/docker/ui/views/DockerImagesView.java -> Can you describe a case where the URI would be null and the Connection Wizard would be correct to allow this ? I think if the user enters some location, the connection URI will always be non-null.

-------------------------------------
author: Zechariah Krause
date: 2015-09-01 13:21:56.000000000

Patch Set 8:

Validating the URI with patterns could be a solution to accept scheme-less input, but I could not find a proper regex that would support hostname, IPv4 and IPv6 addresses with optional port, path, etc.
I suggest we keep the current validator (URI is invalid if scheme is missing.)
We could have a look at Apache Commons Validator (http://svn.apache.org/viewvc/commons/proper/validator/trunk/src/main/java/org/apache/commons/validator/routines/UrlValidator.java?view=markup) but this bundle is not available in our TP as far as I can see.

-------------------------------------
author: Gerrit Code Review
date: 2015-09-03 14:52:50.000000000

Change has been successfully cherry-picked as 05adcd885f2a59d20ed5b5f0175c5cf4c1fe1ad9 by Nathanael Holden

-------------------------------------
