Remove unused functions from agent driver

_get_client() not used in agent module.
_time() not used in unit tests.

Change-Id: I8d6127a247675b39449e62445c2f37e5be2f2f12
This commit is contained in:
Yuriy Zveryanskyy 2015-10-19 14:28:14 +03:00
parent 2a2a5d0bbc
commit 96f0a72415
2 changed files with 1 additions and 19 deletions

View File

@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import time
from oslo_config import cfg
from oslo_log import log
from oslo_utils import excutils
@ -34,7 +32,6 @@ from ironic.conductor import task_manager
from ironic.conductor import utils as manager_utils
from ironic.drivers import base
from ironic.drivers.modules import agent_base_vendor
from ironic.drivers.modules import agent_client
from ironic.drivers.modules import deploy_utils
@ -88,16 +85,6 @@ REQUIRED_PROPERTIES = {
COMMON_PROPERTIES = REQUIRED_PROPERTIES
def _time():
"""Broken out for testing."""
return time.time()
def _get_client():
client = agent_client.AgentClient()
return client
def build_instance_info_for_deploy(task):
"""Build instance_info necessary for deploying to a node.

View File

@ -82,11 +82,6 @@ LOG = log.getLogger(__name__)
POST_CLEAN_STEP_HOOKS = {}
def _time():
"""Broken out for testing."""
return time.time()
def _get_client():
client = agent_client.AgentClient()
return client
@ -319,7 +314,7 @@ class BaseAgentVendor(base.VendorInterface):
'Heartbeat from %(node)s, last heartbeat at %(heartbeat)s.',
{'node': node.uuid,
'heartbeat': driver_internal_info.get('agent_last_heartbeat')})
driver_internal_info['agent_last_heartbeat'] = int(_time())
driver_internal_info['agent_last_heartbeat'] = int(time.time())
try:
driver_internal_info['agent_url'] = kwargs['agent_url']
except KeyError: