forked from shaba/openuds
Fixing up services
This commit is contained in:
parent
ee42653cea
commit
6038f93189
@ -1,5 +1,4 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#
|
||||
# Copyright (c) 2012-2019 Virtual Cable S.L.
|
||||
# All rights reserved.
|
||||
@ -423,7 +422,7 @@ class OVirtProvider(services.ServiceProvider): # pylint: disable=too-many-publi
|
||||
return self.__getApi().getConsoleConnection(machineId)
|
||||
|
||||
@staticmethod
|
||||
def test(env, data):
|
||||
def test(env: 'Environment', data: 'Module.ValuesType') -> typing.List[typing.Any]:
|
||||
"""
|
||||
Test ovirt Connectivity
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#
|
||||
# Copyright (c) 2012 Virtual Cable S.L.
|
||||
# Copyright (c) 2012-2019 Virtual Cable S.L.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#
|
||||
# Copyright (c) 2012 Virtual Cable S.L.
|
||||
# Copyright (c) 2012-2019 Virtual Cable S.L.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#
|
||||
# Copyright (c) 2012 Virtual Cable S.L.
|
||||
# Copyright (c) 2012-2019 Virtual Cable S.L.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
@ -30,6 +30,8 @@
|
||||
"""
|
||||
.. moduleauthor:: Adolfo Gómez, dkmaster at dkmon dot com
|
||||
"""
|
||||
import random
|
||||
import string
|
||||
import logging
|
||||
import typing
|
||||
|
||||
@ -193,7 +195,6 @@ class SamplePublication(services.Publication):
|
||||
In our case, destroy is 1-step action so this will no get called while
|
||||
destroying...
|
||||
"""
|
||||
import random
|
||||
self._number -= 1
|
||||
# Serialization will take care of storing self._number
|
||||
|
||||
@ -215,10 +216,8 @@ class SamplePublication(services.Publication):
|
||||
|
||||
Returned value, if any, is ignored
|
||||
"""
|
||||
import string
|
||||
import random
|
||||
# Make simply a random string
|
||||
self._name = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(10))
|
||||
self._name = ''.join(random.SystemRandom().choices(string.ascii_uppercase + string.digits, k=10))
|
||||
|
||||
def reasonOfError(self) -> str:
|
||||
"""
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
#
|
||||
# Copyright (c) 2012 Virtual Cable S.L.
|
||||
# Copyright (c) 2012-2019 Virtual Cable S.L.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without modification,
|
||||
@ -196,7 +196,6 @@ class ServiceOne(services.Service):
|
||||
return self.baseName.value
|
||||
|
||||
|
||||
|
||||
class ServiceTwo(services.Service):
|
||||
"""
|
||||
Just a second service, no comments here (almost same that ServiceOne
|
||||
|
Loading…
Reference in New Issue
Block a user