Created
August 3, 2017 19:23
-
-
Save adam-stokes/eb84b243014d68e3dda547f5f6c038b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class VSphere(BaseProvider): | |
| def __init__(self): | |
| super().__init__() | |
| self.auth_type = 'userpass' | |
| self.cloud_type = 'vsphere' | |
| self.endpoint = None | |
| self.user = None | |
| self.password = None | |
| self.endpoint_w = Field( | |
| label='api endpoint', | |
| widget=StringEditor(), | |
| key='endpoint', | |
| storable=False | |
| ) | |
| self.user_w = Field( | |
| label='user', | |
| widget=StringEditor(), | |
| key='user' | |
| ) | |
| self.password_w = Field( | |
| label='password', | |
| widget=PasswordEditor(), | |
| key='password' | |
| ) | |
| def save_form(self): | |
| self.user = self.user_w.value | |
| self.endpoint = self.endpoint_w.value | |
| self.password = self.password_w.value |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment