diff options
author | randyl <r.levensalor@cablelabs.com> | 2017-03-29 14:25:06 -0600 |
---|---|---|
committer | randyl <r.levensalor@cablelabs.com> | 2017-03-29 14:25:06 -0600 |
commit | c75f6807b6f2182b9a093407a5ed97bd79e81245 (patch) | |
tree | b16a8b6c58c78e182f719ce7321ce52a2d442c27 /docs/how-to-use | |
parent | b13ca832ffc24920a7c8ca637f7c468c1306a374 (diff) |
Correcting minor issues with the documentation
Correcting some formatting and minor content changes.
Change-Id: Idf75e8c6985bae9a2df26c54c559a20d46b6ac1f
Signed-off-by: randyl <r.levensalor@cablelabs.com>
Diffstat (limited to 'docs/how-to-use')
-rw-r--r-- | docs/how-to-use/InstallSnaps.rst | 6 | ||||
-rw-r--r-- | docs/how-to-use/LibraryUsage.rst | 27 | ||||
-rw-r--r-- | docs/how-to-use/Testing.rst | 4 | ||||
-rw-r--r-- | docs/how-to-use/VirtEnvDeploy.rst | 6 |
4 files changed, 20 insertions, 23 deletions
diff --git a/docs/how-to-use/InstallSnaps.rst b/docs/how-to-use/InstallSnaps.rst index 9412579..cce06a0 100644 --- a/docs/how-to-use/InstallSnaps.rst +++ b/docs/how-to-use/InstallSnaps.rst @@ -17,13 +17,13 @@ CentOS 7 :: - # yum install -7 git gcc python-pip python-devel openssl-devel + sudo yum install -7 git gcc python-pip python-devel openssl-devel Ubuntu ------ :: - # apt-get install git python2.7-dev libssl-dev + sudo apt-get install git python2.7-dev libssl-dev Optional: Setup a Python virtual environment -------------------------------------------- @@ -39,6 +39,6 @@ The "pip" command below needs to be executed as root, if you are not using a vir :: - # pip install -e <path to repo>/snaps/ + sudo pip install -e <path to repo>/snaps/ The install should now be complete and you can start using the SNAPS-OO libraries. diff --git a/docs/how-to-use/LibraryUsage.rst b/docs/how-to-use/LibraryUsage.rst index 6c84afd..31d003a 100644 --- a/docs/how-to-use/LibraryUsage.rst +++ b/docs/how-to-use/LibraryUsage.rst @@ -49,8 +49,8 @@ Create OS Credentials Object .. code:: python from snaps.openstack.os_credentials import OSCreds - os_creds=OSCreds(username='admin', password`='admin' - auth_url='http://localhost:5000/v3, project_name='admin', + os_creds=OSCreds(username='admin', password='admin', + auth_url='http://localhost:5000/v3', project_name='admin', identity_api_version=3) SNAPS Object Creators @@ -84,7 +84,7 @@ Create User .. code:: python from snaps.openstack.create_user import UserSettings, OpenStackUser - user_settings = UserSettings(name='username', password='password) + user_settings = UserSettings(name='username', password='password') user_creator = OpenStackUser(os_creds, user_settings) user_creator.create() @@ -109,10 +109,11 @@ Create Project - enables - flag to determine whether or not the project should be enabled (default=True) + .. code:: python from snaps.openstack.create_project import ProjectSettings, OpenStackProject - project_settings = ProjectSettings(name='username', password='password) + project_settings = ProjectSettings(name='username', password='password') project_creator = OpenStackProject(os_creds, project_settings) project_creator.create() @@ -311,8 +312,7 @@ Create Security Group .. code:: python - from snaps.openstack.create_security_group import SecurityGroupSettings, SecurityGroupRuleSettings, Direction, - OpenStackSecurityGroup + from snaps.openstack.create_security_group import SecurityGroupSettings, SecurityGroupRuleSettings, Direction, OpenStackSecurityGroup rule_settings = SubnetSettings(name='subnet-name', cidr='10.0.0.0/24') network_settings = NetworkSettings(name='network-name', subnet_settings=[subnet_settings]) @@ -437,9 +437,9 @@ Create VM Instance from snaps.openstack.create_network import PortSettings port_settings = PortSettings(name='port-name', network_name=network_settings.name) - floating_ip_settings = FloatingIpSettings(name='fip1', port_name=port_settings.name, router_name=router_settings.name - instance_settings = VmInstanceSettings(name='vm-name', flavor='flavor_settings.name, port_settings=[port_settings], - floating_ip_settings=[floating_ip_settings] + floating_ip_settings = FloatingIpSettings(name='fip1', port_name=port_settings.name, router_name=router_settings.name) + instance_settings = VmInstanceSettings(name='vm-name', flavor='flavor_settings.name', port_settings=[port_settings], + floating_ip_settings=[floating_ip_settings]) instance_creator = OpenStackVmInstance(os_creds, instance_settings, image_settings, kepair_settings) instance_creator.create() @@ -480,14 +480,11 @@ Apply Ansible Playbook Utility from snaps.provisioning import ansible_utils - ansible_utils.apply_playbook(playbook_path='/tmp/playbook.yml', - hosts_inv=[instance_creator.get_port_ip(instance_settings.port_settings[0].name, - host_user=instance_creator.get_image_user(), - ssh_priv_key_file_path=instance_creator.keypair_settings.private_filepath) - + ansible_utils.apply_playbook('provisioning/tests/playbooks/simple_playbook.yml', [ip], user, priv_key, + proxy_setting=self.os_creds.proxy_settings) OpenStack Utilities -======================================= +=================== For those who do like working procedurally, SNAPS-OO also leverages utilitarian functions for nearly every query or request made to diff --git a/docs/how-to-use/Testing.rst b/docs/how-to-use/Testing.rst index 7627927..66b8e5d 100644 --- a/docs/how-to-use/Testing.rst +++ b/docs/how-to-use/Testing.rst @@ -6,8 +6,8 @@ Execute the tests :: -cd <path to repo> -python snaps/unit_test_suite.py -e <path to RC file> -n <external network name> + cd <path to repo> + python snaps/unit_test_suite.py -e <path to RC file> -n <external network name> | \* All Supported Arguments | \* -e [required - The path to the OpenStack RC file] diff --git a/docs/how-to-use/VirtEnvDeploy.rst b/docs/how-to-use/VirtEnvDeploy.rst index 58a33d5..f8a1e3c 100644 --- a/docs/how-to-use/VirtEnvDeploy.rst +++ b/docs/how-to-use/VirtEnvDeploy.rst @@ -23,19 +23,19 @@ Use launcher.py to deploy and clean up example environments. These examples are :: - cd <snaps repo>/examples/ + cd <snaps repo>/examples/ #. Deploy the launcher. :: - $ python launcher.py -e ./complex-network/deploy-complex-network.yaml -d + python launch.py -e ./complex-network/deploy-complex-network.yaml -d #. Clean the deployment. :: - $ python launcher.py -e ./complex-network/deploy-complex-network.yaml -c + python launch.py -e ./complex-network/deploy-complex-network.yaml -c #. Customize the deployment by changing the yaml file. |