New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added NFS validations on RHEV Self-Hosted #1000

Merged
merged 1 commit into from Jul 5, 2016

Conversation

Projects
None yet
4 participants
@dymurray
Contributor

dymurray commented Jul 1, 2016

I also added a Gluster path validator and added generic presence validators on the self hosted field.

This will now attempt to mount the hosted share and stop the user if it fails.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jul 1, 2016

Coverage Status

Coverage remained the same at 67.621% when pulling 5fef44c on dymurray:nfsSelfHosted into 3293682 on fusor:master.

coveralls commented Jul 1, 2016

Coverage Status

Coverage remained the same at 67.621% when pulling 5fef44c on dymurray:nfsSelfHosted into 3293682 on fusor:master.

@jmrodri

This comment has been minimized.

Show comment
Hide comment
@jmrodri

jmrodri Jul 1, 2016

Contributor

🎆 🙌 🏆 👍 ❗️ 👑

Contributor

jmrodri commented Jul 1, 2016

🎆 🙌 🏆 👍 ❗️ 👑

GlusterPathValidator.create({})
]
}),

This comment has been minimized.

@cfchase

cfchase Jul 1, 2016

Contributor

This looks awesome. 🎉 Less code and much cleaner. If you want to rip out the duplicate code in the templates you could do something like:

  sharePathValidator: Ember.computed('deploymentController.model.rhev_storage_type', function () {
    if (this.get('deploymentController.model.rhev_storage_type') === 'NFS') {
      return this.get('nfsPathValidator')
    }

    return this.get('glusterPathValidator');
  }),

  invalidSharePath: Ember.computed('sharePathValidator.model.rhev_share_path', 'sharePathValidator', function () {
    return this.get('sharePathValidator').isInvalid(this.get('deploymentController.model.rhev_share_path'));
  }),

  invalidExportPath: Ember.computed('deploymentController.model.rhev_export_domain_path', 'sharePathValidator', function () {
    return this.get('sharePathValidator').isInvalid(this.get('deploymentController.model.rhev_export_domain_path'));
  }),

Then you could reuse the shareValidator and use a single form.

@cfchase

cfchase Jul 1, 2016

Contributor

This looks awesome. 🎉 Less code and much cleaner. If you want to rip out the duplicate code in the templates you could do something like:

  sharePathValidator: Ember.computed('deploymentController.model.rhev_storage_type', function () {
    if (this.get('deploymentController.model.rhev_storage_type') === 'NFS') {
      return this.get('nfsPathValidator')
    }

    return this.get('glusterPathValidator');
  }),

  invalidSharePath: Ember.computed('sharePathValidator.model.rhev_share_path', 'sharePathValidator', function () {
    return this.get('sharePathValidator').isInvalid(this.get('deploymentController.model.rhev_share_path'));
  }),

  invalidExportPath: Ember.computed('deploymentController.model.rhev_export_domain_path', 'sharePathValidator', function () {
    return this.get('sharePathValidator').isInvalid(this.get('deploymentController.model.rhev_export_domain_path'));
  }),

Then you could reuse the shareValidator and use a single form.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jul 5, 2016

Coverage Status

Coverage remained the same at 67.621% when pulling 8eb0922 on dymurray:nfsSelfHosted into 6dd80be on fusor:master.

coveralls commented Jul 5, 2016

Coverage Status

Coverage remained the same at 67.621% when pulling 8eb0922 on dymurray:nfsSelfHosted into 6dd80be on fusor:master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jul 5, 2016

Coverage Status

Coverage remained the same at 67.621% when pulling 8eb0922 on dymurray:nfsSelfHosted into 6dd80be on fusor:master.

coveralls commented Jul 5, 2016

Coverage Status

Coverage remained the same at 67.621% when pulling 8eb0922 on dymurray:nfsSelfHosted into 6dd80be on fusor:master.

@cfchase

This comment has been minimized.

Show comment
Hide comment
@cfchase

cfchase Jul 5, 2016

Contributor

ACK

Contributor

cfchase commented Jul 5, 2016

ACK

@dymurray dymurray merged commit 2203e5d into fusor:master Jul 5, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 67.621%
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment