forked from shaba/openuds
ovirt -> proxmox in Proxmox service
This commit is contained in:
parent
cdd3cd546f
commit
a8d0081fd1
@ -64,7 +64,7 @@ class ProxmoxDeployment(services.UserDeployment):
|
|||||||
create consumable services for users using UserDeployment class as
|
create consumable services for users using UserDeployment class as
|
||||||
provider of this elements.
|
provider of this elements.
|
||||||
|
|
||||||
The logic for managing ovirt deployments (user machines in this case) is here.
|
The logic for managing Proxmox deployments (user machines in this case) is here.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
# : Recheck every this seconds by default (for task methods)
|
# : Recheck every this seconds by default (for task methods)
|
||||||
@ -164,7 +164,7 @@ class ProxmoxDeployment(services.UserDeployment):
|
|||||||
|
|
||||||
def reset(self) -> None:
|
def reset(self) -> None:
|
||||||
"""
|
"""
|
||||||
o oVirt, reset operation just shutdowns it until v3 support is removed
|
o Proxmox, reset operation just shutdowns it until v3 support is removed
|
||||||
"""
|
"""
|
||||||
if self._vmid != '':
|
if self._vmid != '':
|
||||||
self.service().stopMachine(int(self._vmid))
|
self.service().stopMachine(int(self._vmid))
|
||||||
|
@ -44,7 +44,7 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
class ProxmoxDeferredRemoval(jobs.Job):
|
class ProxmoxDeferredRemoval(jobs.Job):
|
||||||
frecuency = 60 * 5 # Once every NN minutes
|
frecuency = 60 * 5 # Once every NN minutes
|
||||||
friendly_name = 'Ovirt removal'
|
friendly_name = 'Proxmox removal'
|
||||||
counter = 0
|
counter = 0
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -169,7 +169,7 @@ class ProxmoxProvider(services.ServiceProvider): # pylint: disable=too-many-pub
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def test(env: 'Environment', data: 'Module.ValuesType') -> typing.List[typing.Any]:
|
def test(env: 'Environment', data: 'Module.ValuesType') -> typing.List[typing.Any]:
|
||||||
"""
|
"""
|
||||||
Test ovirt Connectivity
|
Test Proxmox Connectivity
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
env: environment passed for testing (temporal environment passed)
|
env: environment passed for testing (temporal environment passed)
|
||||||
|
@ -55,16 +55,16 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
class ProxmoxLinkedService(Service): # pylint: disable=too-many-public-methods
|
class ProxmoxLinkedService(Service): # pylint: disable=too-many-public-methods
|
||||||
"""
|
"""
|
||||||
oVirt Linked clones service. This is based on creating a template from selected vm, and then use it to
|
Proxmox Linked clones service. This is based on creating a template from selected vm, and then use it to
|
||||||
"""
|
"""
|
||||||
# : Name to show the administrator. This string will be translated BEFORE
|
# : Name to show the administrator. This string will be translated BEFORE
|
||||||
# : sending it to administration interface, so don't forget to
|
# : sending it to administration interface, so don't forget to
|
||||||
# : mark it as _ (using ugettext_noop)
|
# : mark it as _ (using ugettext_noop)
|
||||||
typeName = _('oVirt/RHEV Linked Clone')
|
typeName = _('Proxmox Linked Clone')
|
||||||
# : Type used internally to identify this provider
|
# : Type used internally to identify this provider
|
||||||
typeType = 'oVirtLinkedService'
|
typeType = 'ProxmoxLinkedService'
|
||||||
# : Description shown at administration interface for this provider
|
# : Description shown at administration interface for this provider
|
||||||
typeDescription = _('oVirt Services based on templates and COW (experimental)')
|
typeDescription = _('Proxmox Services based on templates and COW (experimental)')
|
||||||
# : Icon file used as icon for this provider. This string will be translated
|
# : Icon file used as icon for this provider. This string will be translated
|
||||||
# : BEFORE sending it to administration interface, so don't forget to
|
# : BEFORE sending it to administration interface, so don't forget to
|
||||||
# : mark it as _ (using ugettext_noop)
|
# : mark it as _ (using ugettext_noop)
|
||||||
@ -209,7 +209,7 @@ class ProxmoxLinkedService(Service): # pylint: disable=too-many-public-methods
|
|||||||
|
|
||||||
def sanitizeVmName(self, name: str) -> str:
|
def sanitizeVmName(self, name: str) -> str:
|
||||||
"""
|
"""
|
||||||
Ovirt only allows machine names with [a-zA-Z0-9_-]
|
Proxmox only allows machine names with [a-zA-Z0-9_-]
|
||||||
"""
|
"""
|
||||||
return re.sub("[^a-zA-Z0-9_-]", "-", name)
|
return re.sub("[^a-zA-Z0-9_-]", "-", name)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user