{"action":"created","comment":{"url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/pulls/comments/176728636","pull_request_review_id":106484893,"id":176728636,"diff_hunk":"@@ -111,91 +137,176 @@ export class OstackSetupComponent implements OnInit {\n       }\n     }\n \n-    if (this.form.value['authURL'].substring(this.form.value['authURL'].length - 2,\n-        this.form.value['authURL'].length).toLocaleLowerCase() === 'v3') {\n-      this.isUserDomainName = true;\n-    } else {\n-      this.isUserDomainName = false;\n+    // parse the RC file to retrieve all the information required to connect to the TSI portal\n+    if (this.cloudProvider.credential.password)\n+      this.parseRcFile(this.cloudProvider.credential.rc_file);\n+  }\n+\n+  parseRcFile(rcFile: string) {\n+    if (rcFile) {\n+      // reset previous values\n+      this.rcVersion = null;\n+      this.authUrl = null;\n+      this.projectName = \"\";\n+      this.tenantName = \"\";\n+      this.domainName = \"\";\n+\n+      // update RC file with the user password and set it as current RC file\n+      // console.log(\"The current RC file...\", rcFile);\n+      rcFile = rcFile.replace(/(#.*)\\n/g, '');         // remove all comments\n+      rcFile = rcFile.replace(/(echo.+)\\n/g, '');      // remove all echo commands","path":"src/app/setup/ostack-setup/ostack-setup.component.ts","position":139,"original_position":139,"commit_id":"7e0dab80aaff3fa6629b37a02df9c25386135404","original_commit_id":"7e0dab80aaff3fa6629b37a02df9c25386135404","user":{"login":"ilveroluca","id":1502936,"avatar_url":"https://avatars3.githubusercontent.com/u/1502936?v=4","gravatar_id":"","url":"https://api.github.com/users/ilveroluca","html_url":"https://github.com/ilveroluca","followers_url":"https://api.github.com/users/ilveroluca/followers","following_url":"https://api.github.com/users/ilveroluca/following{/other_user}","gists_url":"https://api.github.com/users/ilveroluca/gists{/gist_id}","starred_url":"https://api.github.com/users/ilveroluca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilveroluca/subscriptions","organizations_url":"https://api.github.com/users/ilveroluca/orgs","repos_url":"https://api.github.com/users/ilveroluca/repos","events_url":"https://api.github.com/users/ilveroluca/events{/privacy}","received_events_url":"https://api.github.com/users/ilveroluca/received_events","type":"User","site_admin":false},"body":"Lax scanning","created_at":"2018-03-23T13:10:34Z","updated_at":"2018-03-23T13:59:48Z","html_url":"https://github.com/phnmnl/ng2-phenomenal-portal/pull/38#discussion_r176728636","pull_request_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/pulls/38","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/pulls/comments/176728636"},"html":{"href":"https://github.com/phnmnl/ng2-phenomenal-portal/pull/38#discussion_r176728636"},"pull_request":{"href":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/pulls/38"}}},"pull_request":{"url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/pulls/38","id":176859695,"html_url":"https://github.com/phnmnl/ng2-phenomenal-portal/pull/38","diff_url":"https://github.com/phnmnl/ng2-phenomenal-portal/pull/38.diff","patch_url":"https://github.com/phnmnl/ng2-phenomenal-portal/pull/38.patch","issue_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/issues/38","number":38,"state":"open","locked":false,"title":"Feature/openstack support","user":{"login":"kikkomep","id":1832243,"avatar_url":"https://avatars0.githubusercontent.com/u/1832243?v=4","gravatar_id":"","url":"https://api.github.com/users/kikkomep","html_url":"https://github.com/kikkomep","followers_url":"https://api.github.com/users/kikkomep/followers","following_url":"https://api.github.com/users/kikkomep/following{/other_user}","gists_url":"https://api.github.com/users/kikkomep/gists{/gist_id}","starred_url":"https://api.github.com/users/kikkomep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kikkomep/subscriptions","organizations_url":"https://api.github.com/users/kikkomep/orgs","repos_url":"https://api.github.com/users/kikkomep/repos","events_url":"https://api.github.com/users/kikkomep/events{/privacy}","received_events_url":"https://api.github.com/users/kikkomep/received_events","type":"User","site_admin":false},"body":"This PR allows users to deploy CREs through the Portal using OpenStack as Cloud Provider.\r\n\r\nThe form to insert OpenStack credentials requires users to provide the **RC file** (*V2* or *V3*) and the **password** of their OpenStack account.\r\n\r\nNotice that in some OpenStack clusters the use of the *RC file v3* produces empty results when the system tries to get *Networks*, *Flavours* and *IP Pools*: in such cases, please try to use the RC file v2.","created_at":"2018-03-22T17:49:25Z","updated_at":"2018-03-23T13:59:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e02b12438cab236b037fad270a9309f7c51070d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/pulls/38/commits","review_comments_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/pulls/38/comments","review_comment_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/issues/38/comments","statuses_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/statuses/7e0dab80aaff3fa6629b37a02df9c25386135404","head":{"label":"kikkomep:feature/ostack-support","ref":"feature/ostack-support","sha":"7e0dab80aaff3fa6629b37a02df9c25386135404","user":{"login":"kikkomep","id":1832243,"avatar_url":"https://avatars0.githubusercontent.com/u/1832243?v=4","gravatar_id":"","url":"https://api.github.com/users/kikkomep","html_url":"https://github.com/kikkomep","followers_url":"https://api.github.com/users/kikkomep/followers","following_url":"https://api.github.com/users/kikkomep/following{/other_user}","gists_url":"https://api.github.com/users/kikkomep/gists{/gist_id}","starred_url":"https://api.github.com/users/kikkomep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kikkomep/subscriptions","organizations_url":"https://api.github.com/users/kikkomep/orgs","repos_url":"https://api.github.com/users/kikkomep/repos","events_url":"https://api.github.com/users/kikkomep/events{/privacy}","received_events_url":"https://api.github.com/users/kikkomep/received_events","type":"User","site_admin":false},"repo":{"id":114924309,"name":"ng2-phenomenal-portal","full_name":"kikkomep/ng2-phenomenal-portal","owner":{"login":"kikkomep","id":1832243,"avatar_url":"https://avatars0.githubusercontent.com/u/1832243?v=4","gravatar_id":"","url":"https://api.github.com/users/kikkomep","html_url":"https://github.com/kikkomep","followers_url":"https://api.github.com/users/kikkomep/followers","following_url":"https://api.github.com/users/kikkomep/following{/other_user}","gists_url":"https://api.github.com/users/kikkomep/gists{/gist_id}","starred_url":"https://api.github.com/users/kikkomep/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kikkomep/subscriptions","organizations_url":"https://api.github.com/users/kikkomep/orgs","repos_url":"https://api.github.com/users/kikkomep/repos","events_url":"https://api.github.com/users/kikkomep/events{/privacy}","received_events_url":"https://api.github.com/users/kikkomep/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kikkomep/ng2-phenomenal-portal","description":"PhenoMeNal Cloud Research Environment","fork":true,"url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal","forks_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/forks","keys_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/teams","hooks_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/hooks","issue_events_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/issues/events{/number}","events_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/events","assignees_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/assignees{/user}","branches_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/branches{/branch}","tags_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/tags","blobs_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/languages","stargazers_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/stargazers","contributors_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/contributors","subscribers_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/subscribers","subscription_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/subscription","commits_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/contents/{+path}","compare_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/merges","archive_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/downloads","issues_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/issues{/number}","pulls_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/labels{/name}","releases_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/releases{/id}","deployments_url":"https://api.github.com/repos/kikkomep/ng2-phenomenal-portal/deployments","created_at":"2017-12-20T19:38:42Z","updated_at":"2017-12-20T19:38:43Z","pushed_at":"2018-03-23T11:09:44Z","git_url":"git://github.com/kikkomep/ng2-phenomenal-portal.git","ssh_url":"git@github.com:kikkomep/ng2-phenomenal-portal.git","clone_url":"https://github.com/kikkomep/ng2-phenomenal-portal.git","svn_url":"https://github.com/kikkomep/ng2-phenomenal-portal","homepage":"http://portal.phenomenal-h2020.eu","size":8118,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"phnmnl:develop","ref":"develop","sha":"0520f02ef6896cfca2cda7f67df4e85b8ca59b74","user":{"login":"phnmnl","id":14231499,"avatar_url":"https://avatars1.githubusercontent.com/u/14231499?v=4","gravatar_id":"","url":"https://api.github.com/users/phnmnl","html_url":"https://github.com/phnmnl","followers_url":"https://api.github.com/users/phnmnl/followers","following_url":"https://api.github.com/users/phnmnl/following{/other_user}","gists_url":"https://api.github.com/users/phnmnl/gists{/gist_id}","starred_url":"https://api.github.com/users/phnmnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phnmnl/subscriptions","organizations_url":"https://api.github.com/users/phnmnl/orgs","repos_url":"https://api.github.com/users/phnmnl/repos","events_url":"https://api.github.com/users/phnmnl/events{/privacy}","received_events_url":"https://api.github.com/users/phnmnl/received_events","type":"Organization","site_admin":false},"repo":{"id":68694428,"name":"ng2-phenomenal-portal","full_name":"phnmnl/ng2-phenomenal-portal","owner":{"login":"phnmnl","id":14231499,"avatar_url":"https://avatars1.githubusercontent.com/u/14231499?v=4","gravatar_id":"","url":"https://api.github.com/users/phnmnl","html_url":"https://github.com/phnmnl","followers_url":"https://api.github.com/users/phnmnl/followers","following_url":"https://api.github.com/users/phnmnl/following{/other_user}","gists_url":"https://api.github.com/users/phnmnl/gists{/gist_id}","starred_url":"https://api.github.com/users/phnmnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phnmnl/subscriptions","organizations_url":"https://api.github.com/users/phnmnl/orgs","repos_url":"https://api.github.com/users/phnmnl/repos","events_url":"https://api.github.com/users/phnmnl/events{/privacy}","received_events_url":"https://api.github.com/users/phnmnl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phnmnl/ng2-phenomenal-portal","description":"PhenoMeNal Cloud Research Environment","fork":false,"url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal","forks_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/forks","keys_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/teams","hooks_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/hooks","issue_events_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/issues/events{/number}","events_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/events","assignees_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/assignees{/user}","branches_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/branches{/branch}","tags_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/tags","blobs_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/languages","stargazers_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/stargazers","contributors_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/contributors","subscribers_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/subscribers","subscription_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/subscription","commits_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/contents/{+path}","compare_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/merges","archive_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/downloads","issues_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/issues{/number}","pulls_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/labels{/name}","releases_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/releases{/id}","deployments_url":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/deployments","created_at":"2016-09-20T09:06:30Z","updated_at":"2016-10-24T15:21:45Z","pushed_at":"2018-03-22T17:49:25Z","git_url":"git://github.com/phnmnl/ng2-phenomenal-portal.git","ssh_url":"git@github.com:phnmnl/ng2-phenomenal-portal.git","clone_url":"https://github.com/phnmnl/ng2-phenomenal-portal.git","svn_url":"https://github.com/phnmnl/ng2-phenomenal-portal","homepage":"http://portal.phenomenal-h2020.eu","size":8069,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":16,"license":null,"forks":2,"open_issues":16,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/pulls/38"},"html":{"href":"https://github.com/phnmnl/ng2-phenomenal-portal/pull/38"},"issue":{"href":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/issues/38"},"comments":{"href":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/issues/38/comments"},"review_comments":{"href":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/pulls/38/comments"},"review_comment":{"href":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/pulls/38/commits"},"statuses":{"href":"https://api.github.com/repos/phnmnl/ng2-phenomenal-portal/statuses/7e0dab80aaff3fa6629b37a02df9c25386135404"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"ilveroluca"}}