diff --git a/mcc/cldcnct.py b/mcc/cldcnct.py index acfff6a..e5a7970 100644 --- a/mcc/cldcnct.py +++ b/mcc/cldcnct.py @@ -39,7 +39,7 @@ def get_conns(cred, providers): - """Collect node data asyncronously using gevent lib.""" + """Collect node data asynchronously using gevent lib.""" cld_svc_map = {"aws": conn_aws, "azure": conn_az, "gcp": conn_gcp} @@ -57,7 +57,7 @@ def get_conns(cred, providers): conn_objs.update(item) busy_disp_off(dobj=busy_obj) sys.stdout.write("\r \r") - sys.stdout.write("\033[?25h") # cusor back on + sys.stdout.write("\033[?25h") # cursor back on sys.stdout.flush() return conn_objs @@ -78,7 +78,7 @@ def get_data(conn_objs, providers): ngroup.join() busy_disp_off(dobj=busy_obj) sys.stdout.write("\r \r") - sys.stdout.write("\033[?25h") # cusor back on + sys.stdout.write("\033[?25h") # cursor back on sys.stdout.flush() return node_list @@ -155,7 +155,7 @@ def nodes_aws(c_obj): def adj_nodes_aws(aws_nodes): - """Retreive details specific to AWS.""" + """Retrieve details specific to AWS.""" for node in aws_nodes: node.cloud = "aws" node.cloud_disp = "AWS" @@ -194,7 +194,7 @@ def nodes_az(c_obj): def adj_nodes_az(az_nodes): - """Retreive details specific to Azure.""" + """Retrieve details specific to Azure.""" for node in az_nodes: node.cloud = "azure" node.cloud_disp = "Azure" @@ -248,7 +248,7 @@ def nodes_gcp(c_obj): def adj_nodes_gcp(gcp_nodes): - """Retreive details specific to GCP.""" + """Retrieve details specific to GCP.""" for node in gcp_nodes: node.cloud = "gcp" node.cloud_disp = "GCP" diff --git a/mcc/colors.py b/mcc/colors.py index 760c619..76603d1 100644 --- a/mcc/colors.py +++ b/mcc/colors.py @@ -46,15 +46,15 @@ C_GOOD = GREEN C_WARN = YELLOW C_ERR = RED -"""Functionally titled vars as a psuedo color theme. +"""Functionally titled vars as a pseudo color theme. -It's intended that modules will import and use these functionaly-named +It's intended that modules will import and use these functionally-named vars instead of the color named vars. This simplifies changing colors in the module using them. To change a color, the corresponding functional var only needs to be changed to a different color here. If direct color names are used, changes -require replacing all occurences of the color var being changed. +require replacing all occurrences of the color var being changed. """ diff --git a/mcc/core.py b/mcc/core.py index 3512029..4b91f8b 100755 --- a/mcc/core.py +++ b/mcc/core.py @@ -32,11 +32,11 @@ import os import sys -__version__ = "0.1.1" +__version__ = "0.9.1" def main(): - """Retreive and display instance data then process commands.""" + """Retrieve and display instance data then process commands.""" (cred, providers) = config_read() cmd_mode = True conn_objs = cld.get_conns(cred, providers) @@ -49,7 +49,7 @@ def main(): def list_only(): - """Retreive and display instance data then exit.""" + """Retrieve and display instance data then exit.""" (cred, providers) = config_read() conn_objs = cld.get_conns(cred, providers) nodes = cld.get_data(conn_objs, providers) @@ -94,10 +94,10 @@ def config_read(): providers = config_prov(config) # Read credentials for listed providers (cred, to_remove) = config_cred(config, providers) - # remove unsupported and credentialess providers + # remove unsupported and credential-less providers for item in to_remove: providers.remove(item) - return (cred, providers) + return cred, providers def config_prov(config): @@ -129,7 +129,7 @@ def config_cred(config, providers): print("Unsupported provider: '{}' listed in config - ignoring" .format(item)) to_remove.append(item) - return (cred, to_remove) + return cred, to_remove def config_make(config_file): diff --git a/mcc/uimode.py b/mcc/uimode.py index 433609c..b9000d0 100755 --- a/mcc/uimode.py +++ b/mcc/uimode.py @@ -140,7 +140,7 @@ def node_validate(node_dict, node_num, cmd_name): False: req_lu[cmd_name][1]} node_valid = bool(req_lu[cmd_name][0] == node_dict[node_num].state) node_info = tm[node_valid] - return (node_valid, node_info) + return node_valid, node_info def cmd_startstop(node, cmd_name, node_info): @@ -234,7 +234,7 @@ def ssh_get_info(node): keyname = items['key' == 'ssh-keys'].get('value', "") pos = keyname.find(":") ssh_user = keyname[0:pos] - return (ssh_user, ssh_key) + return ssh_user, ssh_key def ssh_calc_aws(node): @@ -252,7 +252,7 @@ def ssh_calc_aws(node): def ui_print(to_print): - """Print text without charrage return.""" + """Print text without carriage return.""" sys.stdout.write(to_print) sys.stdout.flush() @@ -271,7 +271,7 @@ def ui_cmd_title(cmd_title): def ui_cmd_bar(): """Display Command Bar.""" cmd_bar = ("\rSELECT COMMAND - {2}(R){1}un {0}(C){1}onnect " - "{3}(S){1}top {0}(U){1}pdate Info" + "{3}(S){1}top {0}(U){1}pdate" " {0}(Q){1}uit: ". format(C_TI, C_NORM, C_GOOD, C_ERR)) # FUTURE - TO BE USED WHEN DETAILS IMPLEMENTED @@ -315,7 +315,7 @@ def input_flush(): def input_by_key(): - """Get user input using inkey to prevent /n printing at end.""" + """Get user input using term.inkey to prevent /n printing at end.""" usr_inp = '' input_valid = True input_flush() diff --git a/setup.py b/setup.py index 1e9d5cf..6752ccc 100755 --- a/setup.py +++ b/setup.py @@ -64,13 +64,13 @@ package_data={'mcc': ['config.ini']}, entry_points={'console_scripts': ['mcc=mcc.core:main', 'mccl=mcc.core:list_only']}, - version='0.1.1', + version='0.9.1', author="Robert Peteuil", author_email="robert.s.peteuil@gmail.com", url='https://github.com/robertpeteuil/multi-cloud-control', download_url='https://pypi.python.org/pypi/mcc', license='GNU General Public License v3 (GPLv3)', - description='Unified VM-Instance Management Utility across AWS, Azure and GCP Platforms', + description='Unified Instance Management Utility across AWS, Azure and GCP Platforms', keywords='aws-ec2 gcp-compute azure-vm utility control ssh start stop connect', install_requires=INSTALL_REQUIRES, extras_require=EXTRAS_REQUIRE,