{"action":"created","comment":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments/38069803","id":38069803,"diff_hunk":"@@ -1646,65 +1687,11 @@ def reindex(self, args, config):\n \n     @with_rw_config\n     def ports(self, args, config):\n-        self.check_access()\n-        from omero.install.change_ports import change_ports\n-        webserverkey = 'omero.web.application_server.port'\n-        webserver_default_port = 4080\n-        weblistkey = 'omero.web.server_list'\n-        weblist_default_port = 4064\n-        weblist_template = '[[\"localhost\", %s, \"omero\"]]'\n-\n-        if not args.skipcheck:\n-            if 0 == self.status(args, node_only=True):\n-                self.ctx.die(\n-                    100, \"Can't change ports while the server is running!\")\n-\n-            # Resetting return value.\n-            self.ctx.rv = 0\n-\n-        if args.prefix:\n-            for x in (\"registry\", \"tcp\", \"ssl\", \"webserver\"):\n-                setattr(args, x, \"%s%s\" % (args.prefix, getattr(args, x)))\n-        change_ports(\n-            args.ssl, args.tcp, args.registry, args.revert, dir=self.ctx.dir)\n-\n-        # Use the same conditions as change_ports when modifying ports\n-        if args.revert:\n-            webserver_from = args.webserver\n-            webserver_to = str(webserver_default_port)\n-            weblist_from = weblist_template % args.ssl\n-            weblist_to = weblist_template % str(weblist_default_port)\n-        else:\n-            webserver_from = str(webserver_default_port)\n-            webserver_to = args.webserver\n-            weblist_from = weblist_template % str(weblist_default_port)\n-            weblist_to = weblist_template % args.ssl\n-        try:\n-            waport = config[webserverkey]\n-        except KeyError:\n-            waport = ''\n-            webserver_from = ''\n-        try:\n-            weblist = config[weblistkey]\n-        except KeyError:\n-            weblist = ''\n-            weblist_from = ''\n-\n-        if waport != webserver_from:\n-            self.ctx.out('No match found for %s=%s in %s' % (\n-                webserverkey, webserver_from, config.filename))\n-        else:\n-            config[webserverkey] = webserver_to\n-            self.ctx.out('Converted: %s => %s %s in %s' % (\n-                webserver_from, webserver_to, webserverkey, config.filename))\n-\n-        if weblist != weblist_from:\n-            self.ctx.out('No match found for %s=%s in %s' % (\n-                weblistkey, weblist_from, config.filename))\n-        else:\n-            config[weblistkey] = weblist_to\n-            self.ctx.out('Converted: %s => %s %s in %s' % (\n-                weblist_from, weblist_to, weblistkey, config.filename))\n+        self.ctx.err(\n+            \"WARNING: the admin ports subcommand is deprecated. Changes will\"\n+            \" be overwritten the next time the configuration files are\"\n+            \" regenerated. Use the omero.ports.xxx configuration properties\"\n+            \" instead.\")","path":"components/tools/OmeroPy/src/omero/plugins/admin.py","position":147,"original_position":147,"commit_id":"319723794aebed07e58b5aa90252bec2d00d6092","original_commit_id":"319723794aebed07e58b5aa90252bec2d00d6092","user":{"login":"joshmoore","id":88113,"avatar_url":"https://avatars.githubusercontent.com/u/88113?v=3","gravatar_id":"","url":"https://api.github.com/users/joshmoore","html_url":"https://github.com/joshmoore","followers_url":"https://api.github.com/users/joshmoore/followers","following_url":"https://api.github.com/users/joshmoore/following{/other_user}","gists_url":"https://api.github.com/users/joshmoore/gists{/gist_id}","starred_url":"https://api.github.com/users/joshmoore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshmoore/subscriptions","organizations_url":"https://api.github.com/users/joshmoore/orgs","repos_url":"https://api.github.com/users/joshmoore/repos","events_url":"https://api.github.com/users/joshmoore/events{/privacy}","received_events_url":"https://api.github.com/users/joshmoore/received_events","type":"User","site_admin":false},"body":"Perhaps instead of `err`'ing, set the appropriate value?","created_at":"2015-08-27T07:46:56Z","updated_at":"2015-08-27T07:46:56Z","html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4093#discussion_r38069803","pull_request_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4093","_links":{"self":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments/38069803"},"html":{"href":"https://github.com/openmicroscopy/openmicroscopy/pull/4093#discussion_r38069803"},"pull_request":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4093"}}},"pull_request":{"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4093","id":43271377,"html_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4093","diff_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4093.diff","patch_url":"https://github.com/openmicroscopy/openmicroscopy/pull/4093.patch","issue_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4093","number":4093,"state":"open","locked":false,"title":"Migrate more server configuration files to the templates directory","user":{"login":"sbesson","id":1355463,"avatar_url":"https://avatars.githubusercontent.com/u/1355463?v=3","gravatar_id":"","url":"https://api.github.com/users/sbesson","html_url":"https://github.com/sbesson","followers_url":"https://api.github.com/users/sbesson/followers","following_url":"https://api.github.com/users/sbesson/following{/other_user}","gists_url":"https://api.github.com/users/sbesson/gists{/gist_id}","starred_url":"https://api.github.com/users/sbesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbesson/subscriptions","organizations_url":"https://api.github.com/users/sbesson/orgs","repos_url":"https://api.github.com/users/sbesson/repos","events_url":"https://api.github.com/users/sbesson/events{/privacy}","received_events_url":"https://api.github.com/users/sbesson/received_events","type":"User","site_admin":false},"body":"See https://trello.com/c/lHVF6Olb/36-switch-between-prefixed-ports.\r\n\r\nFollowing the effort made on `bin/omero admin jvmcfg` in \r\nthis PR:\r\n- migrates all configuration files that are modified by `admin ports` under `etc/templates`\r\n- renames `generated.xml` as `templates.xml` since the template file is moved to a separate folder\r\n- defines `omero.ports.xxx` properties allowing to control the ports on which the server application is deployed\r\n- modifies the `omero admin` subcommand to regenerate the configuration files from the templates and the local configuration similarly to what is done with `jvmcfg`\r\n- adds unit tests covering the new semantics and fix unit tests requiring `ICE_CONFIG`\r\n- deprecates the usage of `bin/omero admin ports`\r\n\r\nThis PR will required coupled deployment PR for the testing on the CI server and should be considered as breaking from a deployment perspective for servers using non-standard ports.\r\n\r\nSome implementation questions:\r\n- is `omero admin copycfg` a good option or should we look into merging all generation steps (`copycfg` and `jvmcfg`)?\r\n- `bin/omero admin ports --prefix PREFIX` was also modifying the webserver port. Is there any reason `omero.ports.prefix` should also affect the Web application_port or should we keep both completely separate?\r\n\r\n/cc @joshmoore @manics @aleksandra-tarkowska ","created_at":"2015-08-25T10:32:41Z","updated_at":"2015-08-27T07:46:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"738b7dc611c4f3c25a0f60c0e8dbf2f5be22ca8f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4093/commits","review_comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4093/comments","review_comment_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4093/comments","statuses_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/statuses/319723794aebed07e58b5aa90252bec2d00d6092","head":{"label":"sbesson:cfg_templates","ref":"cfg_templates","sha":"319723794aebed07e58b5aa90252bec2d00d6092","user":{"login":"sbesson","id":1355463,"avatar_url":"https://avatars.githubusercontent.com/u/1355463?v=3","gravatar_id":"","url":"https://api.github.com/users/sbesson","html_url":"https://github.com/sbesson","followers_url":"https://api.github.com/users/sbesson/followers","following_url":"https://api.github.com/users/sbesson/following{/other_user}","gists_url":"https://api.github.com/users/sbesson/gists{/gist_id}","starred_url":"https://api.github.com/users/sbesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbesson/subscriptions","organizations_url":"https://api.github.com/users/sbesson/orgs","repos_url":"https://api.github.com/users/sbesson/repos","events_url":"https://api.github.com/users/sbesson/events{/privacy}","received_events_url":"https://api.github.com/users/sbesson/received_events","type":"User","site_admin":false},"repo":{"id":3709486,"name":"openmicroscopy","full_name":"sbesson/openmicroscopy","owner":{"login":"sbesson","id":1355463,"avatar_url":"https://avatars.githubusercontent.com/u/1355463?v=3","gravatar_id":"","url":"https://api.github.com/users/sbesson","html_url":"https://github.com/sbesson","followers_url":"https://api.github.com/users/sbesson/followers","following_url":"https://api.github.com/users/sbesson/following{/other_user}","gists_url":"https://api.github.com/users/sbesson/gists{/gist_id}","starred_url":"https://api.github.com/users/sbesson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbesson/subscriptions","organizations_url":"https://api.github.com/users/sbesson/orgs","repos_url":"https://api.github.com/users/sbesson/repos","events_url":"https://api.github.com/users/sbesson/events{/privacy}","received_events_url":"https://api.github.com/users/sbesson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sbesson/openmicroscopy","description":"OME (Open Microscopy Environment) develops open-source software and data format standards for the storage and manipulation of biological light microscopy data. A joint project between universities, research establishments and industry in Europe and the USA, OME has over 20 active researchers with strong links to the microscopy community. Funded by private and public research grants, OME has been a major force on the international microscopy stage since 2000.","fork":true,"url":"https://api.github.com/repos/sbesson/openmicroscopy","forks_url":"https://api.github.com/repos/sbesson/openmicroscopy/forks","keys_url":"https://api.github.com/repos/sbesson/openmicroscopy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sbesson/openmicroscopy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sbesson/openmicroscopy/teams","hooks_url":"https://api.github.com/repos/sbesson/openmicroscopy/hooks","issue_events_url":"https://api.github.com/repos/sbesson/openmicroscopy/issues/events{/number}","events_url":"https://api.github.com/repos/sbesson/openmicroscopy/events","assignees_url":"https://api.github.com/repos/sbesson/openmicroscopy/assignees{/user}","branches_url":"https://api.github.com/repos/sbesson/openmicroscopy/branches{/branch}","tags_url":"https://api.github.com/repos/sbesson/openmicroscopy/tags","blobs_url":"https://api.github.com/repos/sbesson/openmicroscopy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sbesson/openmicroscopy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sbesson/openmicroscopy/git/refs{/sha}","trees_url":"https://api.github.com/repos/sbesson/openmicroscopy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sbesson/openmicroscopy/statuses/{sha}","languages_url":"https://api.github.com/repos/sbesson/openmicroscopy/languages","stargazers_url":"https://api.github.com/repos/sbesson/openmicroscopy/stargazers","contributors_url":"https://api.github.com/repos/sbesson/openmicroscopy/contributors","subscribers_url":"https://api.github.com/repos/sbesson/openmicroscopy/subscribers","subscription_url":"https://api.github.com/repos/sbesson/openmicroscopy/subscription","commits_url":"https://api.github.com/repos/sbesson/openmicroscopy/commits{/sha}","git_commits_url":"https://api.github.com/repos/sbesson/openmicroscopy/git/commits{/sha}","comments_url":"https://api.github.com/repos/sbesson/openmicroscopy/comments{/number}","issue_comment_url":"https://api.github.com/repos/sbesson/openmicroscopy/issues/comments{/number}","contents_url":"https://api.github.com/repos/sbesson/openmicroscopy/contents/{+path}","compare_url":"https://api.github.com/repos/sbesson/openmicroscopy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sbesson/openmicroscopy/merges","archive_url":"https://api.github.com/repos/sbesson/openmicroscopy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sbesson/openmicroscopy/downloads","issues_url":"https://api.github.com/repos/sbesson/openmicroscopy/issues{/number}","pulls_url":"https://api.github.com/repos/sbesson/openmicroscopy/pulls{/number}","milestones_url":"https://api.github.com/repos/sbesson/openmicroscopy/milestones{/number}","notifications_url":"https://api.github.com/repos/sbesson/openmicroscopy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sbesson/openmicroscopy/labels{/name}","releases_url":"https://api.github.com/repos/sbesson/openmicroscopy/releases{/id}","created_at":"2012-03-13T17:54:24Z","updated_at":"2015-05-08T18:19:00Z","pushed_at":"2015-08-26T06:56:14Z","git_url":"git://github.com/sbesson/openmicroscopy.git","ssh_url":"git@github.com:sbesson/openmicroscopy.git","clone_url":"https://github.com/sbesson/openmicroscopy.git","svn_url":"https://github.com/sbesson/openmicroscopy","homepage":"http://www.openmicroscopy.org","size":1994587,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":3,"default_branch":"develop"}},"base":{"label":"openmicroscopy:develop","ref":"develop","sha":"dcbf5cfbf55192e6963e4fa2b2032c8022234a5a","user":{"login":"openmicroscopy","id":975861,"avatar_url":"https://avatars.githubusercontent.com/u/975861?v=3","gravatar_id":"","url":"https://api.github.com/users/openmicroscopy","html_url":"https://github.com/openmicroscopy","followers_url":"https://api.github.com/users/openmicroscopy/followers","following_url":"https://api.github.com/users/openmicroscopy/following{/other_user}","gists_url":"https://api.github.com/users/openmicroscopy/gists{/gist_id}","starred_url":"https://api.github.com/users/openmicroscopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmicroscopy/subscriptions","organizations_url":"https://api.github.com/users/openmicroscopy/orgs","repos_url":"https://api.github.com/users/openmicroscopy/repos","events_url":"https://api.github.com/users/openmicroscopy/events{/privacy}","received_events_url":"https://api.github.com/users/openmicroscopy/received_events","type":"Organization","site_admin":false},"repo":{"id":2228226,"name":"openmicroscopy","full_name":"openmicroscopy/openmicroscopy","owner":{"login":"openmicroscopy","id":975861,"avatar_url":"https://avatars.githubusercontent.com/u/975861?v=3","gravatar_id":"","url":"https://api.github.com/users/openmicroscopy","html_url":"https://github.com/openmicroscopy","followers_url":"https://api.github.com/users/openmicroscopy/followers","following_url":"https://api.github.com/users/openmicroscopy/following{/other_user}","gists_url":"https://api.github.com/users/openmicroscopy/gists{/gist_id}","starred_url":"https://api.github.com/users/openmicroscopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openmicroscopy/subscriptions","organizations_url":"https://api.github.com/users/openmicroscopy/orgs","repos_url":"https://api.github.com/users/openmicroscopy/repos","events_url":"https://api.github.com/users/openmicroscopy/events{/privacy}","received_events_url":"https://api.github.com/users/openmicroscopy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openmicroscopy/openmicroscopy","description":"OME (Open Microscopy Environment) develops open-source software and data format standards for the storage and manipulation of biological light microscopy data. A joint project between universities, research establishments and industry in Europe and the USA, OME has over 20 active researchers with strong links to the microscopy community. Funded by private and public research grants, OME has been a major force on the international microscopy stage since 2000.","fork":false,"url":"https://api.github.com/repos/openmicroscopy/openmicroscopy","forks_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/forks","keys_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/teams","hooks_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/hooks","issue_events_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/events{/number}","events_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/events","assignees_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/assignees{/user}","branches_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/branches{/branch}","tags_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/tags","blobs_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/refs{/sha}","trees_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/statuses/{sha}","languages_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/languages","stargazers_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/stargazers","contributors_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/contributors","subscribers_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/subscribers","subscription_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/subscription","commits_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/commits{/sha}","git_commits_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/git/commits{/sha}","comments_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/comments{/number}","issue_comment_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/comments{/number}","contents_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/contents/{+path}","compare_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/merges","archive_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/downloads","issues_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues{/number}","pulls_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls{/number}","milestones_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/milestones{/number}","notifications_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/labels{/name}","releases_url":"https://api.github.com/repos/openmicroscopy/openmicroscopy/releases{/id}","created_at":"2011-08-18T14:26:02Z","updated_at":"2015-07-31T07:59:57Z","pushed_at":"2015-08-27T07:11:02Z","git_url":"git://github.com/openmicroscopy/openmicroscopy.git","ssh_url":"git@github.com:openmicroscopy/openmicroscopy.git","clone_url":"https://github.com/openmicroscopy/openmicroscopy.git","svn_url":"https://github.com/openmicroscopy/openmicroscopy","homepage":"http://www.openmicroscopy.org","size":2167188,"stargazers_count":69,"watchers_count":69,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":67,"mirror_url":null,"open_issues_count":48,"forks":67,"open_issues":48,"watchers":69,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4093"},"html":{"href":"https://github.com/openmicroscopy/openmicroscopy/pull/4093"},"issue":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4093"},"comments":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/issues/4093/comments"},"review_comments":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4093/comments"},"review_comment":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/pulls/4093/commits"},"statuses":{"href":"https://api.github.com/repos/openmicroscopy/openmicroscopy/statuses/319723794aebed07e58b5aa90252bec2d00d6092"}}}}