Skip to content

Commit

Permalink
Address F811: redefinition of unused 'can_pause' and 'can_suspend'
Browse files Browse the repository at this point in the history
  • Loading branch information
ogajduse committed Oct 24, 2023
1 parent 0fd7264 commit a6c4c23
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 64 deletions.
8 changes: 0 additions & 8 deletions wrapanapi/entities/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -483,14 +483,6 @@ def __init__(self, *args, **kwargs):
)
)

@abstractproperty
def can_suspend(self):
"""Return True if this system can suspend VM's/instances, False if not."""

@abstractproperty
def can_pause(self):
"""Return True if this system can pause VM's/instances, False if not."""

@abstractmethod
def get_vm(self, name, **kwargs):
"""
Expand Down
8 changes: 0 additions & 8 deletions wrapanapi/systems/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -541,14 +541,6 @@ def __init__(self, **kwargs):
def _identifying_attrs(self):
return {"username": self._username, "password": self._password, "region": self._region_name}

@property
def can_suspend(self):
return False

@property
def can_pause(self):
return False

def disconnect(self):
"""Disconnect from the EC2 API -- NOOP
Expand Down
8 changes: 0 additions & 8 deletions wrapanapi/systems/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,14 +499,6 @@ def __init__(self, project=None, zone=None, file_type=None, **kwargs):
def _identifying_attrs(self):
return {"project": self._project, "zone": self._zone, "region": self._region}

@property
def can_suspend(self):
return False

@property
def can_pause(self):
return False

def _get_all_buckets(self):
return self._buckets.list(project=self._project).execute()

Expand Down
8 changes: 0 additions & 8 deletions wrapanapi/systems/msazure.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,14 +522,6 @@ def _identifying_attrs(self):
"storage_account": self.storage_account,
}

@property
def can_suspend(self):
return True

@property
def can_pause(self):
return False

def __setattr__(self, key, value):
"""If the subscription_id is changed, invalidate client caches"""
if key in ["credentials", "subscription_id"]:
Expand Down
8 changes: 0 additions & 8 deletions wrapanapi/systems/openstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -635,14 +635,6 @@ def __init__(self, tenant, username, password, auth_url, **kwargs):
def _identifying_attrs(self):
return {"auth_url": self.auth_url, "tenant": self.tenant}

@property
def can_suspend(self):
return True

@property
def can_pause(self):
return True

@property
def session(self):
if not self._session:
Expand Down
8 changes: 0 additions & 8 deletions wrapanapi/systems/rhevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,14 +818,6 @@ def __init__(self, hostname, username, password, **kwargs):
def _identifying_attrs(self):
return {"url": self._api_kwargs["url"]}

@property
def can_suspend(self):
return True

@property
def can_pause(self):
return False

@property
def api(self):
# test() will return false if the connection timeouts, catch it and force it to re-init
Expand Down
8 changes: 0 additions & 8 deletions wrapanapi/systems/scvmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,14 +557,6 @@ def __init__(self, **kwargs):
def _identifying_attrs(self):
return {"hostname": self.host}

@property
def can_suspend(self):
return True

@property
def can_pause(self):
return False

@property
def pre_script(self):
"""Script that ensures we can access the SCVMM.
Expand Down
8 changes: 0 additions & 8 deletions wrapanapi/systems/virtualcenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -940,14 +940,6 @@ def __init__(self, hostname, username, password, **kwargs):
def _identifying_attrs(self):
return {"hostname": self.hostname}

@property
def can_suspend(self):
return True

@property
def can_pause(self):
return False

def _start_keepalive(self):
"""
Send a 'current time' request to vCenter every 10 min as a
Expand Down

0 comments on commit a6c4c23

Please sign in to comment.