Remove the "param self" from docstrings

The "param self" and "type self" lines in the docstrings are not very
useful and just pad out the code.  They also tend to be implied.  This
patch removes them from the charm code and brings it inline with other
charms.

Change-Id: Ib653070abcb03ea1ace0e54ade9ca9427b977e49
This commit is contained in:
Alex Kavanagh 2021-01-11 11:49:06 +00:00
parent 7792a6bdf0
commit ba71b5ecbb
1 changed files with 0 additions and 82 deletions

View File

@ -201,8 +201,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def mysqlsh_bin(self):
"""Determine binary path for MySQL Shell.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Path to binary mysqlsh
:rtype: str
"""
@ -219,8 +217,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def mysqlsh_common_dir(self):
"""Determine snap common dir for mysqlsh
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Path to common dir
:rtype: str
"""
@ -230,8 +226,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def mysql_password(self):
"""Determine or set primary MySQL password.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: MySQL password
:rtype: str
"""
@ -241,8 +235,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def cluster_name(self):
"""Determine the MySQL InnoDB Cluster name.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Cluster name
:rtype: str
"""
@ -252,8 +244,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def cluster_password(self):
"""Determine or set password for the cluster user.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Cluster password
:rtype: str
"""
@ -265,8 +255,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Using the class method determine this unit's cluster address.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Address
:rtype: str
"""
@ -278,8 +266,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Using the class method determine this unit's cluster address.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Port
:rtype: str
"""
@ -289,8 +275,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def cluster_user(self):
"""Determine the cluster username.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Cluster username
:rtype: str
"""
@ -300,8 +284,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def cluster_relation_endpoint(self):
"""Determine the cluster username.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Cluster username
:rtype: str
"""
@ -314,8 +296,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Using the class method determine this unit's address for the Shared-DB
relation.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Address
:rtype: str
"""
@ -328,8 +308,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Using the class method determine this unit's address for the DB-Router
relation.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Address
:rtype: str
"""
@ -339,8 +317,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def ssl_ca(self):
"""Return the SSL Certificate Authority
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Cluster username
:rtype: str
"""
@ -367,8 +343,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Once set, it cannot be changed.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param key: Named password or None if unable to retrieve at this point
in time
:type key: str
@ -388,8 +362,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Prior to installation set the root-password for the MySQL server
package(s).
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:side effect: Executes debconf
:returns: This function is called for its side effect
:rtype: None
@ -411,8 +383,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def install(self):
"""Custom install function.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:side effect: Executes other functions
:returns: This function is called for its side effect
:rtype: None
@ -435,8 +405,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def get_db_helper(self):
"""Get an instance of the MySQLDB8Helper class.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Instance of MySQLDB8Helper class
:rtype: MySQLDB8Helper instance
"""
@ -454,8 +422,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Connect to the RW cluster primary node and return a DB helper.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Instance of MySQLDB8Helper class
:rtype: Union[None, MySQLDB8Helper]
"""
@ -482,8 +448,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
The grants are specfic to cluster creation and management as documented
upstream.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param cluster_address: Cluster user's address
:type cluster_address: str
:param cluster_user: Cluster user's username
@ -552,8 +516,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def configure_instance(self, address):
"""Configure MySQL instance for clustering.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param address: Address of the MySQL instance to be configured
:type address: str
:side effect: Calls self.run_mysqlsh_script
@ -600,8 +562,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Creates the MySQL InnoDB cluster using self.cluster_name.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:side effect: Calls self.run_mysqlsh_script
:returns: This function is called for its side effect
:rtype: None
@ -647,8 +607,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def set_cluster_option(self, key, value):
"""Set an option on the cluster
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param key: Option name
:type key: str
:param value: Option value
@ -680,8 +638,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def add_instance_to_cluster(self, address):
"""Add MySQL instance to the cluster.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param address: Address of the MySQL instance to be clustered
:type address: str
:side effect: Calls self.run_mysqlsh_script
@ -725,8 +681,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def restart_instance(self, address):
"""Restart instance
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param address: Address of the MySQL instance to be configured
:type address: str
:side effect: Calls self.run_mysqlsh_script
@ -770,8 +724,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
This will rebootstrap the cluster and join this instance to the
previously existing cluster.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:side effect: Calls self.run_mysqlsh_script
:returns: This function is called for its side effect
:rtype: None
@ -803,8 +755,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Execute the cluster.rejoin_instance(address) to rejoin the specified
instance to the cluster.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:side effect: Calls self.run_mysqlsh_script
:returns: This function is called for its side effect
:rtype: None
@ -840,8 +790,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Execute the cluster.remove_instance(address) to remove an instance from
the cluster.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:side effect: Calls self.run_mysqlsh_script
:returns: This function is called for its side effect
:rtype: None
@ -876,8 +824,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Execute the cluster.rescan() to cleanup metadata.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:side effect: Calls self.run_mysqlsh_script
:returns: This function is called for its side effect
:rtype: None
@ -911,8 +857,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
If an instance was not able to be joined to the cluster this method
will make sure it is configured and add it to the cluster.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:side effect: Calls self.create_user, self.configure_instance and
self.add_instance_to_cluster.
:returns: This function is called for its side effects
@ -944,8 +888,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
not explicity avoided with the nocache parameter, avoid the expensive
DB query.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param nocache: Do not return cached data
:type nocache: Boolean
:side effect: Calls self.check_mysql_connection
@ -998,8 +940,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
primary R/W node in the cluster. This node is safe to use for writes
to the cluster.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param nocache: Do not return cached data
:type nocache: Boolean
:side effect: Calls self.get_cluster_status
@ -1025,8 +965,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
explicity avoided with the nocache parameter, avoid the call to
self.get_cluster_status.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param nocache: Do not return cached data
:type nocache: Boolean
:side effect: Calls self.get_cluster_status
@ -1049,8 +987,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
exists and is not explicity avoided with the nocache parameter, avoid
the call to self.get_cluster_status.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param nocache: Do not return cached data
:type nocache: Boolean
:side effect: Calls self.get_cluster_status
@ -1073,8 +1009,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
If cached data exists and is not explicity avoided with the nocache
parameter, avoid the call to self.get_cluster_status.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param nocache: Do not return cached data
:type nocache: Boolean
:side effect: Calls self.get_cluster_status
@ -1099,8 +1033,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Call MySQL8Helper.get_allowed_units and return space delimited list of
allowed unit names.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param database: Database name
:type database: str
:param username: Username
@ -1129,8 +1061,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Take an Endpoint interface and create databases and users based on the
requests on the relation.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param interface: Interface Object (shared-db or db-router)
:type interface: reactive.relations.Endpoint object
:side effect: interface.set_db_connection_info is executed
@ -1206,8 +1136,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Create and configure database and user with full access permissions
from host(s).
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param hosts: Hosts may be a json-encoded list of hosts or a single
hostname.
:type hosts: Union[str, Json list]
@ -1264,8 +1192,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
Create and configure MySQL Router user with mysql router specific
permissions from host(s).
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param hosts: Hosts may be a json-encoded list of hosts or a single
hostname.
:type hosts: Union[str, Json list]
@ -1322,8 +1248,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
of the relations passed, along with error messages and new status
conditions.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:param required_relations: List of relations which overrides
self.relations
:type required_relations: list of strings
@ -1363,8 +1287,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
MySQL instance, checks the health of the cluster and reports this
unit's cluster mode. i.e. R/W or R/O.
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:side effect: Calls status_set
:returns: This function is called for its side effect
:rtype: None
@ -1615,8 +1537,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def cluster_peer_addresses(self):
"""Cluster peer addresses
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Cluster peer addresses
:rtype: list
"""
@ -1629,8 +1549,6 @@ class MySQLInnoDBClusterCharm(charms_openstack.charm.OpenStackCharm):
def mysql_server_bindings(self):
"""MySQL Server Bindings
:param self: Self
:type self: MySQLInnoDBClusterCharm instance
:returns: Bindings where MySQL is listening
:rtype: list
"""