Showing 440 of 1,826 total issues
Function ip_filtering_exists
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ip_filtering_exists(handle, **kwargs):
"""
Checks if IP filtering settings match according to the parameters specified.
Args:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function vd_update
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def vd_update(handle,
controller_type,
controller_slot,
id,
server_id=1,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _get_bootable_slot_vnicname
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _get_bootable_slot_vnicname(handle):
# get all the end point vnics
vnics = handle.query_classid(class_id="AdaptorHostEthIf")
if vnics is None:
vnics = []
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _check_ntp_server_match
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _check_ntp_server_match(ntp_mo, mo):
for prop in _NTP_SERVER_LIST:
configured_value = getattr(ntp_mo, prop)
in_value = getattr(mo, prop)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function vmedia_mount_remove_all
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def vmedia_mount_remove_all(handle, volumes= None, server_id=1):
"""
This method will remove all the mapped vmedia mappings and saved vmedia mappings with the specified volumes
Args:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function boot_order_precision_get
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def boot_order_precision_get(handle, dump=False, server_id=1):
"""
Gets the precision boot order.
This is supported from EP release onwards only
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _check_ip_filter_match
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _check_ip_filter_match(ip_mo, mo):
for prop in _IP_FILTER_LIST:
configured_value = getattr(ip_mo, prop)
in_value = getattr(mo, prop)
if _is_invalid_value(configured_value) and \
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __str__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __str__(self):
ts = 8
if isinstance(self, GenericMo):
out_str = "\n"
out_str += 'GenericMo'.ljust(ts * 4) + ':' + str(
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ip_filtering_exists
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ip_filtering_exists(handle, **kwargs):
"""
Checks if IP filtering settings match according to the parameters specified.
Args:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _login
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _login(self, auto_refresh=None, force=None, timeout=None):
"""
Internal method responsible to do a login on imc server.
Args:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function __str__
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def __str__(self):
"""
Method to return string representation of a managed object.
"""
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _check_ip_filter_match
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _check_ip_filter_match(ip_mo, mo):
for prop in _IP_FILTER_LIST:
configured_value = getattr(ip_mo, prop)
in_value = getattr(mo, prop)
if _is_invalid_value(configured_value) and \
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _commit_mos
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _commit_mos(self, timeout=None):
"""Method to send multiple mos in a single XML API request"""
from .imccoreutils import ConfigConfMosConstants as Const
mo_dict = self.__to_commit
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _check_ldap_server_match
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _check_ldap_server_match(ldap_mo, ldap_servers):
servers, ports = _prepare_ldap_servers(ldap_servers)
for server in servers:
if servers[server] != getattr(ldap_mo, server):
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function get_mo_meta
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def get_mo_meta(mo, platform=None):
if platform:
try:
return mo.mo_meta[platform]
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ldap_enable
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def ldap_enable(handle,
basedn=None,
domain=None,
encryption=None,
timeout=None,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _check_ntp_server_match
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _check_ntp_server_match(ntp_mo, mo):
for prop in _NTP_SERVER_LIST:
configured_value = getattr(ntp_mo, prop)
in_value = getattr(mo, prop)
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function sync_mo
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def sync_mo(self, mo):
"""
Method to return string representation of a managed object.
"""
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _commit
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def _commit(self, timeout=None):
"""
Commit the buffer to the server. Pushes all the configuration changes
so far to the server.
Configuration could be added to the commit buffer using add_mo(),
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function set_attr
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
def set_attr(self, key, value):
""" This method sets the attribute of external method object."""
if key in self.__property_meta:
self.__dict__[key] = value
elif key == 'error_code':
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"