{"action":"created","comment":{"url":"https://api.github.com/repos/fusor/fusor/pulls/comments/59069024","id":59069024,"diff_hunk":"@@ -101,6 +101,36 @@ def validate(deployment)\n             deployment.errors[:cfme_root_password] << _('CloudForms deployments must specify a root password for the CloudForms machines')\n           end\n         end\n+\n+        if deployment.deploy_openshift\n+          if !(deployment.deploy_rhev or deployment.deploy_openstack)\n+            deployment.errors[:deploy_openshift] << _(\"OpenShift deployments must also deploy either RHEV or OpenStack\")\n+          end\n+\n+          if deployment.openshift_number_master_nodes < 1\n+            deployment.errors[:openshift_number_master_nodes] << _(\"OpenShift deployments must have at least one master node\")\n+          else\n+            if deployment.openshift_master_vcpu < 1 or deployment.openshift_master_ram < 1 or deployment.openshift_master_disk < 1\n+              deployment.errors[:openshift_master_vcpu] << _(\"OpenShift deployments must specify amount of resources to be used\")\n+            end\n+          end\n+\n+          if deployment.openshift_username.empty?\n+            deployment.errors[:openshift_username] << _(\"OpenShift deployments must specify an OSE user to be created\")\n+          end\n+\n+          if deployment.openshift_subdomain_name.empty?\n+            deployment.errors[:openshift_subdomain_name] << _(\"Openshift deployments must specify a wildcard subdomain region\")\n+          else\n+            subdomain = Net::DNS::ARecord.new({:ip => \"0.0.0.0\", ","path":"server/app/lib/fusor/validators/deployment_validator.rb","position":25,"original_position":25,"commit_id":"f000aafb8b939bd86d2e673823796d000d81f7cd","original_commit_id":"f000aafb8b939bd86d2e673823796d000d81f7cd","user":{"login":"jmrodri","id":17137,"avatar_url":"https://avatars.githubusercontent.com/u/17137?v=3","gravatar_id":"","url":"https://api.github.com/users/jmrodri","html_url":"https://github.com/jmrodri","followers_url":"https://api.github.com/users/jmrodri/followers","following_url":"https://api.github.com/users/jmrodri/following{/other_user}","gists_url":"https://api.github.com/users/jmrodri/gists{/gist_id}","starred_url":"https://api.github.com/users/jmrodri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmrodri/subscriptions","organizations_url":"https://api.github.com/users/jmrodri/orgs","repos_url":"https://api.github.com/users/jmrodri/repos","events_url":"https://api.github.com/users/jmrodri/events{/privacy}","received_events_url":"https://api.github.com/users/jmrodri/received_events","type":"User","site_admin":false},"body":"This line has a trailing whitespace","created_at":"2016-04-08T18:26:59Z","updated_at":"2016-04-08T18:26:59Z","html_url":"https://github.com/fusor/fusor/pull/755#discussion_r59069024","pull_request_url":"https://api.github.com/repos/fusor/fusor/pulls/755","_links":{"self":{"href":"https://api.github.com/repos/fusor/fusor/pulls/comments/59069024"},"html":{"href":"https://github.com/fusor/fusor/pull/755#discussion_r59069024"},"pull_request":{"href":"https://api.github.com/repos/fusor/fusor/pulls/755"}}},"pull_request":{"url":"https://api.github.com/repos/fusor/fusor/pulls/755","id":65819331,"html_url":"https://github.com/fusor/fusor/pull/755","diff_url":"https://github.com/fusor/fusor/pull/755.diff","patch_url":"https://github.com/fusor/fusor/pull/755.patch","issue_url":"https://api.github.com/repos/fusor/fusor/issues/755","number":755,"state":"open","locked":false,"title":"Added server side validations for OSE deployment","user":{"login":"dymurray","id":16140195,"avatar_url":"https://avatars.githubusercontent.com/u/16140195?v=3","gravatar_id":"","url":"https://api.github.com/users/dymurray","html_url":"https://github.com/dymurray","followers_url":"https://api.github.com/users/dymurray/followers","following_url":"https://api.github.com/users/dymurray/following{/other_user}","gists_url":"https://api.github.com/users/dymurray/gists{/gist_id}","starred_url":"https://api.github.com/users/dymurray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dymurray/subscriptions","organizations_url":"https://api.github.com/users/dymurray/orgs","repos_url":"https://api.github.com/users/dymurray/repos","events_url":"https://api.github.com/users/dymurray/events{/privacy}","received_events_url":"https://api.github.com/users/dymurray/received_events","type":"User","site_admin":false},"body":"The main motivation for this change is to warn the user if the subdomain entry already exists on Satellite. On top of this I added some basic validations to ensure we have a valid deployment model. We will still be adding more validations to this page as we flesh out the storage information.","created_at":"2016-04-08T17:24:25Z","updated_at":"2016-04-08T18:26:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"df36d5f386d06f57e6d23602907ca0edf7fefd1b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fusor/fusor/pulls/755/commits","review_comments_url":"https://api.github.com/repos/fusor/fusor/pulls/755/comments","review_comment_url":"https://api.github.com/repos/fusor/fusor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fusor/fusor/issues/755/comments","statuses_url":"https://api.github.com/repos/fusor/fusor/statuses/f000aafb8b939bd86d2e673823796d000d81f7cd","head":{"label":"dymurray:OSE_test","ref":"OSE_test","sha":"f000aafb8b939bd86d2e673823796d000d81f7cd","user":{"login":"dymurray","id":16140195,"avatar_url":"https://avatars.githubusercontent.com/u/16140195?v=3","gravatar_id":"","url":"https://api.github.com/users/dymurray","html_url":"https://github.com/dymurray","followers_url":"https://api.github.com/users/dymurray/followers","following_url":"https://api.github.com/users/dymurray/following{/other_user}","gists_url":"https://api.github.com/users/dymurray/gists{/gist_id}","starred_url":"https://api.github.com/users/dymurray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dymurray/subscriptions","organizations_url":"https://api.github.com/users/dymurray/orgs","repos_url":"https://api.github.com/users/dymurray/repos","events_url":"https://api.github.com/users/dymurray/events{/privacy}","received_events_url":"https://api.github.com/users/dymurray/received_events","type":"User","site_admin":false},"repo":{"id":47559192,"name":"fusor","full_name":"dymurray/fusor","owner":{"login":"dymurray","id":16140195,"avatar_url":"https://avatars.githubusercontent.com/u/16140195?v=3","gravatar_id":"","url":"https://api.github.com/users/dymurray","html_url":"https://github.com/dymurray","followers_url":"https://api.github.com/users/dymurray/followers","following_url":"https://api.github.com/users/dymurray/following{/other_user}","gists_url":"https://api.github.com/users/dymurray/gists{/gist_id}","starred_url":"https://api.github.com/users/dymurray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dymurray/subscriptions","organizations_url":"https://api.github.com/users/dymurray/orgs","repos_url":"https://api.github.com/users/dymurray/repos","events_url":"https://api.github.com/users/dymurray/events{/privacy}","received_events_url":"https://api.github.com/users/dymurray/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dymurray/fusor","description":"","fork":true,"url":"https://api.github.com/repos/dymurray/fusor","forks_url":"https://api.github.com/repos/dymurray/fusor/forks","keys_url":"https://api.github.com/repos/dymurray/fusor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dymurray/fusor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dymurray/fusor/teams","hooks_url":"https://api.github.com/repos/dymurray/fusor/hooks","issue_events_url":"https://api.github.com/repos/dymurray/fusor/issues/events{/number}","events_url":"https://api.github.com/repos/dymurray/fusor/events","assignees_url":"https://api.github.com/repos/dymurray/fusor/assignees{/user}","branches_url":"https://api.github.com/repos/dymurray/fusor/branches{/branch}","tags_url":"https://api.github.com/repos/dymurray/fusor/tags","blobs_url":"https://api.github.com/repos/dymurray/fusor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dymurray/fusor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dymurray/fusor/git/refs{/sha}","trees_url":"https://api.github.com/repos/dymurray/fusor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dymurray/fusor/statuses/{sha}","languages_url":"https://api.github.com/repos/dymurray/fusor/languages","stargazers_url":"https://api.github.com/repos/dymurray/fusor/stargazers","contributors_url":"https://api.github.com/repos/dymurray/fusor/contributors","subscribers_url":"https://api.github.com/repos/dymurray/fusor/subscribers","subscription_url":"https://api.github.com/repos/dymurray/fusor/subscription","commits_url":"https://api.github.com/repos/dymurray/fusor/commits{/sha}","git_commits_url":"https://api.github.com/repos/dymurray/fusor/git/commits{/sha}","comments_url":"https://api.github.com/repos/dymurray/fusor/comments{/number}","issue_comment_url":"https://api.github.com/repos/dymurray/fusor/issues/comments{/number}","contents_url":"https://api.github.com/repos/dymurray/fusor/contents/{+path}","compare_url":"https://api.github.com/repos/dymurray/fusor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dymurray/fusor/merges","archive_url":"https://api.github.com/repos/dymurray/fusor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dymurray/fusor/downloads","issues_url":"https://api.github.com/repos/dymurray/fusor/issues{/number}","pulls_url":"https://api.github.com/repos/dymurray/fusor/pulls{/number}","milestones_url":"https://api.github.com/repos/dymurray/fusor/milestones{/number}","notifications_url":"https://api.github.com/repos/dymurray/fusor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dymurray/fusor/labels{/name}","releases_url":"https://api.github.com/repos/dymurray/fusor/releases{/id}","deployments_url":"https://api.github.com/repos/dymurray/fusor/deployments","created_at":"2015-12-07T15:04:30Z","updated_at":"2015-12-07T15:04:31Z","pushed_at":"2016-04-08T17:26:53Z","git_url":"git://github.com/dymurray/fusor.git","ssh_url":"git@github.com:dymurray/fusor.git","clone_url":"https://github.com/dymurray/fusor.git","svn_url":"https://github.com/dymurray/fusor","homepage":null,"size":30710,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":0,"default_branch":"master"}},"base":{"label":"fusor:openshift3","ref":"openshift3","sha":"2a6cd00dc0d6803548a0cd20d2c7e829fca3cbae","user":{"login":"fusor","id":9267379,"avatar_url":"https://avatars.githubusercontent.com/u/9267379?v=3","gravatar_id":"","url":"https://api.github.com/users/fusor","html_url":"https://github.com/fusor","followers_url":"https://api.github.com/users/fusor/followers","following_url":"https://api.github.com/users/fusor/following{/other_user}","gists_url":"https://api.github.com/users/fusor/gists{/gist_id}","starred_url":"https://api.github.com/users/fusor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusor/subscriptions","organizations_url":"https://api.github.com/users/fusor/orgs","repos_url":"https://api.github.com/users/fusor/repos","events_url":"https://api.github.com/users/fusor/events{/privacy}","received_events_url":"https://api.github.com/users/fusor/received_events","type":"Organization","site_admin":false},"repo":{"id":25686301,"name":"fusor","full_name":"fusor/fusor","owner":{"login":"fusor","id":9267379,"avatar_url":"https://avatars.githubusercontent.com/u/9267379?v=3","gravatar_id":"","url":"https://api.github.com/users/fusor","html_url":"https://github.com/fusor","followers_url":"https://api.github.com/users/fusor/followers","following_url":"https://api.github.com/users/fusor/following{/other_user}","gists_url":"https://api.github.com/users/fusor/gists{/gist_id}","starred_url":"https://api.github.com/users/fusor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fusor/subscriptions","organizations_url":"https://api.github.com/users/fusor/orgs","repos_url":"https://api.github.com/users/fusor/repos","events_url":"https://api.github.com/users/fusor/events{/privacy}","received_events_url":"https://api.github.com/users/fusor/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fusor/fusor","description":"","fork":false,"url":"https://api.github.com/repos/fusor/fusor","forks_url":"https://api.github.com/repos/fusor/fusor/forks","keys_url":"https://api.github.com/repos/fusor/fusor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fusor/fusor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fusor/fusor/teams","hooks_url":"https://api.github.com/repos/fusor/fusor/hooks","issue_events_url":"https://api.github.com/repos/fusor/fusor/issues/events{/number}","events_url":"https://api.github.com/repos/fusor/fusor/events","assignees_url":"https://api.github.com/repos/fusor/fusor/assignees{/user}","branches_url":"https://api.github.com/repos/fusor/fusor/branches{/branch}","tags_url":"https://api.github.com/repos/fusor/fusor/tags","blobs_url":"https://api.github.com/repos/fusor/fusor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fusor/fusor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fusor/fusor/git/refs{/sha}","trees_url":"https://api.github.com/repos/fusor/fusor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fusor/fusor/statuses/{sha}","languages_url":"https://api.github.com/repos/fusor/fusor/languages","stargazers_url":"https://api.github.com/repos/fusor/fusor/stargazers","contributors_url":"https://api.github.com/repos/fusor/fusor/contributors","subscribers_url":"https://api.github.com/repos/fusor/fusor/subscribers","subscription_url":"https://api.github.com/repos/fusor/fusor/subscription","commits_url":"https://api.github.com/repos/fusor/fusor/commits{/sha}","git_commits_url":"https://api.github.com/repos/fusor/fusor/git/commits{/sha}","comments_url":"https://api.github.com/repos/fusor/fusor/comments{/number}","issue_comment_url":"https://api.github.com/repos/fusor/fusor/issues/comments{/number}","contents_url":"https://api.github.com/repos/fusor/fusor/contents/{+path}","compare_url":"https://api.github.com/repos/fusor/fusor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fusor/fusor/merges","archive_url":"https://api.github.com/repos/fusor/fusor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fusor/fusor/downloads","issues_url":"https://api.github.com/repos/fusor/fusor/issues{/number}","pulls_url":"https://api.github.com/repos/fusor/fusor/pulls{/number}","milestones_url":"https://api.github.com/repos/fusor/fusor/milestones{/number}","notifications_url":"https://api.github.com/repos/fusor/fusor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fusor/fusor/labels{/name}","releases_url":"https://api.github.com/repos/fusor/fusor/releases{/id}","deployments_url":"https://api.github.com/repos/fusor/fusor/deployments","created_at":"2014-10-24T11:57:40Z","updated_at":"2016-01-12T16:26:29Z","pushed_at":"2016-04-08T17:26:54Z","git_url":"git://github.com/fusor/fusor.git","ssh_url":"git@github.com:fusor/fusor.git","clone_url":"https://github.com/fusor/fusor.git","svn_url":"https://github.com/fusor/fusor","homepage":null,"size":32845,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":8,"forks":23,"open_issues":8,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fusor/fusor/pulls/755"},"html":{"href":"https://github.com/fusor/fusor/pull/755"},"issue":{"href":"https://api.github.com/repos/fusor/fusor/issues/755"},"comments":{"href":"https://api.github.com/repos/fusor/fusor/issues/755/comments"},"review_comments":{"href":"https://api.github.com/repos/fusor/fusor/pulls/755/comments"},"review_comment":{"href":"https://api.github.com/repos/fusor/fusor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fusor/fusor/pulls/755/commits"},"statuses":{"href":"https://api.github.com/repos/fusor/fusor/statuses/f000aafb8b939bd86d2e673823796d000d81f7cd"}}}}