A collection of Bash and Python scripts designed to automate and manage various OpenStack tasks. These scripts are intended to streamline the management of OpenStack environments, including instance operations, port security, and security group transformations.
This repository contains a set of scripts written in Bash and Python to assist with the administration of OpenStack environments. The scripts are aimed at automating repetitive tasks and facilitating faster management of OpenStack instances, security groups, and ports.
Before using the scripts, ensure the following:
- An OpenStack environment is set up and configured.
 - The OpenStack RC file (credentials) is sourced.
 - You have necessary privileges to manage instances, security groups, and ports in the OpenStack environment.
 
- 
disableportsec.sh
Disables port security on specified ports in OpenStack.Usage:
bash disableportsec.sh <port-id> - 
startandstop_host_instances.sh
Starts and stops instances running on a specific host in OpenStack.Usage:
bash startandstop_host_instances.sh <host-name> <start/stop> - 
transformsecgroup.sh
Transforms security groups for specified instances to ensure appropriate security settings.Usage:
bash transformsecgroup.sh <instance-id> <security-group-id> - 
unlock_unpause.sh
Unlocks and unpauses a specified instance, resuming its operation.Usage:
bash unlock_unpause.sh <instance-id> 
- 
pauseanlock.py
Pauses and locks a specified instance in OpenStack.Usage:
python pauseanlock.py <instance-id> - 
unpauseunlock.py
Unpauses and unlocks a specified instance to resume its normal state.Usage:
python unpauseunlock.py <instance-id> 
- 
Set up OpenStack credentials
Ensure that you source your OpenStack RC file before executing any scripts:source <your-openstack-rc-file>
 - 
Execute the desired script
Choose the appropriate script based on the task you want to perform, and execute it with the necessary parameters. 
Contributions to this repository are welcome. If you would like to improve or add new features, please follow these steps:
- Fork this repository.
 - Create a new branch (
git checkout -b feature-name). - Commit your changes (
git commit -am 'Add new feature'). - Push to the branch (
git push origin feature-name). - Create a new Pull Request.
 
This repository is licensed under the MIT License. See LICENSE for more details.