Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unused stuff #27

Merged
merged 1 commit into from
Sep 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion pyipmi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ def ipmb_address(self):


class Target(object):
'''The Target class represents an IPMI target.'''

def __init__(self, ipmb_address, routing=None):
"""
`ipmb_address` is the IPMB target address
Expand All @@ -80,7 +82,6 @@ def __init__(self, ipmb_address, routing=None):
if routing:
self.set_routing(routing)

'''The Target class represents an IPMI target.'''
class Routing(object):
def __init__(self, address, bridge_channel):
self.address = address
Expand Down
4 changes: 1 addition & 3 deletions pyipmi/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@

from builtins import object

#from .errors import DecodingError, CompletionCodeError, RetryError
from .utils import check_completion_code, ByteBuffer
from .utils import check_completion_code
from .msgs import create_request_by_name
#from .msgs import constants

EVENT_ASSERTION = 0
EVENT_DEASSERTION = 1
Expand Down
4 changes: 1 addition & 3 deletions pyipmi/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA


import array
import time

from .errors import DecodingError, CompletionCodeError, RetryError
from .errors import CompletionCodeError, RetryError
from .utils import check_completion_code, ByteBuffer
from .msgs import constants

Expand Down
2 changes: 1 addition & 1 deletion pyipmi/hpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def wait_until_new_firmware_comes_up(self, timeout, interval):
start_time = time.time()
while time.time() < start_time + timeout:
try:
status = self.get_upgrade_status()
self.get_upgrade_status()
self.get_device_id()
except TimeoutError:
time.sleep(interval)
Expand Down
2 changes: 1 addition & 1 deletion pyipmi/interfaces/aardvark.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def is_ipmc_accessible(self, target):
raw_data = []

self._send_raw(header, raw_data)
rx_data = self._receive_raw(header)
self._receive_raw(header)
return True

def _inc_sequence_number(self):
Expand Down
2 changes: 0 additions & 2 deletions pyipmi/interfaces/ipmitool.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA


from builtins import chr
from builtins import object

import re
Expand Down
2 changes: 1 addition & 1 deletion pyipmi/ipmitool.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def cmd_sensor_rearm(ipmi, args):
if len(args) < 1:
return
number = int(args[0], 0)
rsp = ipmi.rearm_sensor_events(number)
ipmi.rearm_sensor_events(number)

def sdr_show(ipmi, s):
if s.type is pyipmi.sdr.SDR_TYPE_FULL_SENSOR_RECORD:
Expand Down
3 changes: 1 addition & 2 deletions pyipmi/lan.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
# from builtins import object

from .msgs import create_request_by_name
# from .errors import DecodingError, CompletionCodeError
from .utils import check_completion_code, ByteBuffer
from .utils import check_completion_code

LAN_PARAMETER_SET_IN_PROGRESS = 0
LAN_PARAMETER_AUTHENTICATION_TYPE_SUPPORT = 1
Expand Down
2 changes: 0 additions & 2 deletions pyipmi/msgs/chassis.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
from . import register_message_class
from . import Message
from . import UnsignedInt
from . import UnsignedIntMask
from . import Timestamp
from . import Bitfield
from . import CompletionCode
from . import Conditional
from . import Optional

CONTROL_POWER_DOWN = 0
Expand Down
3 changes: 0 additions & 3 deletions pyipmi/msgs/hpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@
from . import register_message_class
from . import Message
from . import UnsignedInt
from . import UnsignedIntMask
from . import Timestamp
from . import Bitfield
from . import CompletionCode
from . import Conditional
from . import Optional
from . import RemainingBytes
from .picmg import PicmgIdentifier
Expand Down
1 change: 0 additions & 1 deletion pyipmi/msgs/picmg.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from . import Message
from . import UnsignedInt
from . import UnsignedIntMask
from . import Timestamp
from . import Bitfield
from . import CompletionCode
from . import Conditional
Expand Down
2 changes: 1 addition & 1 deletion pyipmi/msgs/sdr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from __future__ import absolute_import
# Copyright (c) 2014 Kontron Europe GmbH
#
# This library is free software; you can redistribute it and/or
Expand All @@ -14,6 +13,7 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
from __future__ import absolute_import

from . import constants
from . import register_message_class
Expand Down
2 changes: 0 additions & 2 deletions pyipmi/msgs/sel.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
from . import Message
from . import ByteArray
from . import UnsignedInt
from . import UnsignedIntMask
from . import Timestamp
from . import Bitfield
from . import CompletionCode
from . import Conditional
from . import RemainingBytes

@register_message_class
Expand Down
1 change: 0 additions & 1 deletion pyipmi/msgs/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from . import constants
from . import register_message_class
from . import Message
from . import ByteArray
from . import UnsignedInt
from . import Timestamp
from . import Bitfield
Expand Down
5 changes: 1 addition & 4 deletions pyipmi/sdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,10 @@

import math
from . import errors
import array
import time

from .errors import DecodingError, CompletionCodeError, RetryError
from .errors import DecodingError
from .utils import check_completion_code, ByteBuffer
from .msgs import create_request_by_name
#from .msgs import constants

from .helper import get_sdr_data_helper, clear_repository_helper
from .helper import get_sdr_chunk_helper
Expand Down
3 changes: 0 additions & 3 deletions tests/msgs/test_chassis.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#!/usr/bin/env python

from array import array

from nose.tools import eq_

import pyipmi.msgs.chassis

from pyipmi.errors import DecodingError, EncodingError
from pyipmi.msgs import encode_message, decode_message

def test_getchassisstatus_encode_valid_req():
Expand Down
5 changes: 1 addition & 4 deletions tests/msgs/test_hpm.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#!/usr/bin/env python

from array import array

from nose.tools import eq_, raises
from nose.tools import eq_

import pyipmi.msgs.hpm

from pyipmi.errors import DecodingError, EncodingError
from pyipmi.msgs import encode_message
from pyipmi.msgs import decode_message

Expand Down
2 changes: 1 addition & 1 deletion tests/msgs/test_message.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#-*- coding: utf-8 -*-

from nose.tools import eq_, raises
from nose.tools import eq_

from array import array
from pyipmi.utils import ByteBuffer
Expand Down
4 changes: 2 additions & 2 deletions tests/msgs/test_msgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

from array import array

from nose.tools import eq_, raises
from nose.tools import eq_

import pyipmi.msgs.bmc
import pyipmi.msgs.event

from pyipmi.errors import DecodingError, EncodingError
from pyipmi.errors import EncodingError
from pyipmi.msgs import encode_message
from pyipmi.msgs import decode_message

Expand Down
5 changes: 1 addition & 4 deletions tests/msgs/test_picmg.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
#!/usr/bin/env python

from array import array

from nose.tools import eq_, raises
from nose.tools import eq_

import pyipmi.msgs.bmc
import pyipmi.msgs.sel
import pyipmi.msgs.event
import pyipmi.msgs.hpm
import pyipmi.msgs.sensor

from pyipmi.errors import DecodingError, EncodingError
from pyipmi.msgs import encode_message
from pyipmi.msgs import decode_message

Expand Down
3 changes: 1 addition & 2 deletions tests/test_bmc.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/usr/bin/env python
#-*- coding: utf-8 -*-

from nose.tools import eq_, raises
from nose.tools import eq_

from pyipmi.bmc import *
import pyipmi.msgs.bmc
from pyipmi.msgs import encode_message
from pyipmi.msgs import decode_message

def test_watchdog_object():
Expand Down
3 changes: 1 addition & 2 deletions tests/test_chassis.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
#!/usr/bin/env python
#-*- coding: utf-8 -*-

from nose.tools import eq_, ok_, raises
from nose.tools import eq_, ok_

from pyipmi.chassis import *
import pyipmi.msgs.chassis
from pyipmi.msgs import encode_message
from pyipmi.msgs import decode_message

def test_chassisstatus_object():
Expand Down
4 changes: 2 additions & 2 deletions tests/test_sensor.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python
#-*- coding: utf-8 -*-

from nose.tools import eq_, raises
from mock import MagicMock, call
from nose.tools import eq_
from mock import MagicMock

from pyipmi.sensor import *
from pyipmi import interfaces, create_connection
Expand Down