zend-patterns / ZendServerSDK

Pure ZF2 CLI for zpk creation and webapi client.
BSD 3-Clause "New" or "Revised" License
22 stars 17 forks source link

Defaulting port for addTarget command switch 'zsurl' #93

Closed MassiAtZend closed 8 years ago

MassiAtZend commented 8 years ago

The 'addTarget' command should be able to accept also a 'zsurl' value like 'http://testing-platform' or 'https://testing-platform' , defaulting the port to 10081 or 10082 respectively.

zvikazend commented 8 years ago

Not sure this is correct. Why to drop on default? If someone has the GUI on non-standard port on NAT with multiple dev servers? 10081 and 10082 should always be visible, so if they are in the ZSURL, listTargets will show you the port and you don't "accidentally" miss that and break your head why you don't get the GUI on HTTP 80 or HTTPS 443 in browser. But - feel free to enhance if you still fell its wanted.

MassiAtZend commented 8 years ago

If the port is given, it stays the same, but if it's not given it should default according to the schema. Right now, if you put --zsurl='http://testing-platform' it fails on an uncaught RuntimeException. Why not try defaulting on 'http://testing-platform:10081'?

zvikazend commented 8 years ago

right. I think it should respond back with a note about defaulting to 10081 or 10082, in case the user needs to alter the target. Thanks