build/docker: CI: no tag reuse on env var change
[fuel.git] / deploy / dha_adapters / zte_adapter.py
1 ###############################################################################
2 # Copyright (c) 2016 Ericsson AB, ZTE and others.
3 # szilard.cserey@ericsson.com
4 # All rights reserved. This program and the accompanying materials
5 # are made available under the terms of the Apache License, Version 2.0
6 # which accompanies this distribution, and is available at
7 # http://www.apache.org/licenses/LICENSE-2.0
8 ###############################################################################
9
10
11 import time
12 from ipmi_adapter import IpmiAdapter
13
14 from common import (
15     log,
16     exec_cmd,
17     err,
18 )
19
20
21 class ZteAdapter(IpmiAdapter):
22
23     def __init__(self, yaml_path, attempts=100):
24         super(ZteAdapter, self).__init__(yaml_path, attempts)
25
26     def node_reset(self, node_id):
27         log('RESET Node %s' % node_id)
28         cmd = '%s chassis power cycle' % self.ipmi_cmd(node_id)
29         exec_cmd(cmd, attempts=self.attempts, delay=self.delay,
30                  verbose=True,
31                  mask_args=[8,10])
32