Skip to content
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
e5ebd28
Added get_new_service_instance_stub that creates a new service instan…
Sep 19, 2017
dd54f8a
Added tests for salt.utils.vmware.get_new_service_instance_stub
Sep 19, 2017
3e8ed59
Added initial sysdoc and imports of salt.utils.pbm
Sep 19, 2017
e77b912
Added salt.utils.pbm.get_profile_manager
Sep 19, 2017
6b2ddff
Added tests for salt.utils.pbm.get_profile_manager
Sep 19, 2017
c790107
Added salt.utils.pbm.get_placement_solver
Sep 19, 2017
68f48d1
Added tests for salt.utils.pbm.get_placement_solver
Sep 19, 2017
eac509b
Added salt.utils.pbm.get_capability_definitions
Sep 19, 2017
e980407
Added tests for salt.utils.pbm.get_capability_definitions
Sep 19, 2017
f42de9c
Added salt.utils.pbm.get_policies_by_id
Sep 19, 2017
d8e0cbd
Added tests for salt.utils.pbm.get_policies_by_id
Sep 19, 2017
df16bdb
Added salt.utils.pbm.get_storage_policies
Sep 19, 2017
7576456
Added tests for salt.utils.pbm.get_storage_policies
Sep 19, 2017
d3744c8
Added salt.utils.pbm.create_storage_policy
Sep 19, 2017
c80df65
Fixed tests for salt.utils.pbm.get_policies_by_id
Sep 19, 2017
d43e342
Added tests for salt.utils.pbm.create_storage_policy
Sep 19, 2017
9c05f7c
Added salt.utils.pbm.update_storage_policy
Sep 19, 2017
7941970
Added tests for salt.utils.pbm.update_storage_policy
Sep 19, 2017
61c226c
Added salt.utils.pbm.get_default_storage_policy_of_datastore
Sep 19, 2017
5dbbac1
Added tests for salt.utils.pbm.get_default_storage_policy_of_datastore
Sep 19, 2017
20fca4b
Added salt.utils.pbm.assign_default_storage_policy_to_datastore
Sep 20, 2017
a3047ad
Added tests for salt.utils.pbm.assign_default_storage_policy_to_datas…
Sep 20, 2017
6da3ff5
Added salt.modules.vsphere._get_policy_dict that transforms a policy …
Sep 20, 2017
6bb0111
Added salt.modules.vsphere.list_storage_policies that retrieves dict …
Sep 20, 2017
f9f84fd
Added salt.modules.vsphere.list_default_vsan_policy that retrieves di…
Sep 20, 2017
8275e57
Added salt.modules.vsphere._get_capability_definition_dict that trans…
Sep 20, 2017
c88c207
Added salt.modules.vsphere.list_capability_definitions that returns d…
Sep 20, 2017
ee2af6f
Added salt.modules.vsphere._apply_policy_config that applies a storag…
Sep 20, 2017
a5ae51f
Added salt.modules.vsphere.create_storage_policy
Sep 20, 2017
41a65bf
Added salt.modules.vsphere.update_storage_policy
Sep 20, 2017
582919f
Added salt.modules.vsphere.list_default_storage_policy_of_datastore t…
Sep 20, 2017
0b2b796
Added salt.modules.vsphere.assign_default_storage_policy_to_datastore
Sep 20, 2017
507910b
Added VCenterProxySchema JSON schema that validates the vcenter proxy
Sep 21, 2017
176222b
Added vcenter proxy
Sep 21, 2017
483fa0d
Added salt.modules.vcenter shim execution module between the proxy an…
Sep 21, 2017
94929d5
Added support for vcenter proxy in salt.modules.vsphere
Sep 21, 2017
58445e9
Updated all vsphere tests to support the vcenter proxy
Sep 21, 2017
da39e7c
Comments, imports, init function in salt.states.pbm
Sep 21, 2017
9f96c1f
Added salt.states.pbm.default_vsan_policy_configured state that confi…
Sep 21, 2017
bb52e0d
Added salt.states.pbm.storage_policies_configured state that creates/…
Sep 21, 2017
36fc89c
Added salt.states.pbm.default_storage_policy_assigned state that mana…
Sep 21, 2017
b6577e4
pylint
Sep 21, 2017
f484bd5
more pylint
Sep 21, 2017
e1bfe24
Removed excs reference from new methods in salt.modules.vsphere
Sep 22, 2017
4ff745d
Added python/pyvmomi compatibility check to salt.states.pbm + removed…
Sep 22, 2017
ac79f89
Fixed utils.pbm unit tests
Sep 26, 2017
c51891c
Merge branch 'develop' into storage_policies-gh
Sep 26, 2017
5c3109f
Removed commented imports
Sep 27, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions salt/config/schemas/vcenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

# Import Salt libs
from salt.utils.schema import (Schema,
ArrayItem,
IntegerItem,
StringItem)


Expand All @@ -31,3 +33,25 @@ class VCenterEntitySchema(Schema):
vcenter = StringItem(title='vCenter',
description='Specifies the vcenter hostname',
required=True)


class VCenterProxySchema(Schema):
'''
Schema for the configuration for the proxy to connect to a VCenter.
'''
title = 'VCenter Proxy Connection Schema'
description = 'Schema that describes the connection to a VCenter'
additional_properties = False
proxytype = StringItem(required=True,
enum=['vcenter'])
vcenter = StringItem(required=True, pattern=r'[^\s]+')
mechanism = StringItem(required=True, enum=['userpass', 'sspi'])
username = StringItem()
passwords = ArrayItem(min_items=1,
items=StringItem(),
unique_items=True)

domain = StringItem()
principal = StringItem(default='host')
protocol = StringItem(default='https')
port = IntegerItem(minimum=1)
29 changes: 29 additions & 0 deletions salt/modules/vcenter.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# -*- coding: utf-8 -*-
'''
Module used to access the vcenter proxy connection methods
'''
from __future__ import absolute_import

# Import python libs
import logging
import salt.utils


log = logging.getLogger(__name__)

__proxyenabled__ = ['vcenter']
# Define the module's virtual name
__virtualname__ = 'vcenter'


def __virtual__():
'''
Only work on proxy
'''
if salt.utils.is_proxy():
return __virtualname__
return False


def get_details():
return __proxy__['vcenter.get_details']()
Loading