From 2c13cf330273543d6843c0aab6b5085bff3cabf5 Mon Sep 17 00:00:00 2001 From: Nitin Madhok Date: Mon, 18 May 2015 12:39:49 -0400 Subject: [PATCH] Fixing more sphinx errors and warnings --- doc/glossary.rst | 3 ++- salt/auth/mysql.py | 34 +++++++++++++++++----------------- salt/beacons/diskusage.py | 2 +- salt/beacons/network_info.py | 4 ++-- salt/modules/boto_cfn.py | 14 +++++++------- salt/modules/boto_vpc.py | 4 ++-- 6 files changed, 31 insertions(+), 30 deletions(-) diff --git a/doc/glossary.rst b/doc/glossary.rst index 7c5903faef..3d2b3784cf 100644 --- a/doc/glossary.rst +++ b/doc/glossary.rst @@ -253,4 +253,5 @@ Glossary for a module are available, such as external libraries. Worker A master process which can send notices and receive replies from - minions. *See also*: :conf_master:`worker_threads`. + minions. *See also*: + :conf_master:`worker_threads`. diff --git a/salt/auth/mysql.py b/salt/auth/mysql.py index 695d8f83cc..be367a374f 100644 --- a/salt/auth/mysql.py +++ b/salt/auth/mysql.py @@ -9,29 +9,29 @@ use an existing table that has a username and a password column. To get started, create a simple table that holds just a username and a password. The password field will hold a SHA256 checksum. - .. code-block:: sql +.. code-block:: sql - CREATE TABLE `users` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `username` varchar(25) DEFAULT NULL, - `password` varchar(70) DEFAULT NULL, - PRIMARY KEY (`id`) - ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; + CREATE TABLE `users` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `username` varchar(25) DEFAULT NULL, + `password` varchar(70) DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; To create a user within MySQL, execute the following statement. - .. code-block:: sql +.. code-block:: sql - INSERT INTO users VALUES (NULL, 'diana', SHA2('secret', 256)) + INSERT INTO users VALUES (NULL, 'diana', SHA2('secret', 256)) - .. code-block:: yaml +.. code-block:: yaml - mysql_auth: - hostname: localhost - database: SaltStack - username: root - password: letmein - auth_sql: 'SELECT username FROM users WHERE username = "{0}" AND password = SHA2("{1}", 256)' + mysql_auth: + hostname: localhost + database: SaltStack + username: root + password: letmein + auth_sql: 'SELECT username FROM users WHERE username = "{0}" AND password = SHA2("{1}", 256)' The `auth_sql` contains the SQL that will validate a user to ensure they are correctly authenticated. This is where you can specify other SQL queries to @@ -39,7 +39,7 @@ authenticate users. Enable MySQL authentication. - .. code-block:: yaml +.. code-block:: yaml external_auth: mysql: diff --git a/salt/beacons/diskusage.py b/salt/beacons/diskusage.py index e281d10a96..a9f84481b2 100644 --- a/salt/beacons/diskusage.py +++ b/salt/beacons/diskusage.py @@ -45,7 +45,7 @@ def beacon(config): and only emit a beacon if any of them are exceeded. - .. code_block:: yaml + .. code-block:: yaml beacons: diskusage: diff --git a/salt/beacons/network_info.py b/salt/beacons/network_info.py index 895552f7e3..feb29fe83c 100644 --- a/salt/beacons/network_info.py +++ b/salt/beacons/network_info.py @@ -75,7 +75,7 @@ def beacon(config): Emit beacon when any values are equal to configured values. - .. code_block:: yaml + .. code-block:: yaml beacons: network_info: @@ -93,7 +93,7 @@ def beacon(config): Emit beacon when any values are greater than to configured values. - .. code_block:: yaml + .. code-block:: yaml beacons: network_info: diff --git a/salt/modules/boto_cfn.py b/salt/modules/boto_cfn.py index 348535e254..7a8ac57362 100644 --- a/salt/modules/boto_cfn.py +++ b/salt/modules/boto_cfn.py @@ -1,17 +1,17 @@ # -*- coding: utf-8 -*- ''' - Connection module for Amazon Cloud Formation +Connection module for Amazon Cloud Formation - .. versionadded:: Beryllium +.. versionadded:: Beryllium - :configuration: This module accepts explicit AWS credentials but can also utilize - IAM roles assigned to the instance trough Instance Profiles. Dynamic - credentials are then automatically obtained from AWS API and no further - configuration is necessary. More Information available at: +:configuration: This module accepts explicit AWS credentials but can also utilize +IAM roles assigned to the instance trough Instance Profiles. Dynamic +credentials are then automatically obtained from AWS API and no further +configuration is necessary. More Information available at: .. code-block:: text - http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html + http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html If IAM roles are not used you need to specify them either in a pillar or in the minion's config file: diff --git a/salt/modules/boto_vpc.py b/salt/modules/boto_vpc.py index 99657eb7e3..80b575a72f 100644 --- a/salt/modules/boto_vpc.py +++ b/salt/modules/boto_vpc.py @@ -1276,7 +1276,7 @@ def associate_new_dhcp_options_to_vpc(vpc_id, domain_name=None, domain_name_serv ''' ..deprecated:: Beryllium This function has been deprecated in favor of - :py:func:`boto_vpc.create_dhcp_options ', + :py:func:`boto_vpc.create_dhcp_options `, which now takes vpc_id or vpc_name as kwargs. This function will be removed in a future release. @@ -1501,7 +1501,7 @@ def associate_new_network_acl_to_subnet(vpc_id, subnet_id, network_acl_name=None ''' ..deprecated:: Beryllium This function has been deprecated in favor of - :py:func:`boto_vpc.create_network_acl ', + :py:func:`boto_vpc.create_network_acl `, which now takes subnet_id or subnet_name as kwargs. This function will be removed in a future release.