<commit_before>echo "Running: $0 $@"
dir_path=$(dirname $0)
node_type=`bash $dir_path/util/detect-nodetype.sh`
echo "Node Type detected as: $node_type"

if [ "$node_type" == "allinone" ] || [ "$node_type" == "controller" ] 
	then
		echo -n "Do you want to enable Web based access to Logs? [y/n]: "
		read enable_web_log_view
		if [ "$enable_web_log_view" == "y" ]
		then
			mkdir /var/www/html/oslogs
			chmod a+rx /var/log/nova
			chmod a+rx /var/log/neutron
			chmod a+rx /var/log/apache2
			chmod a+rx /var/log/keystone
			ln -s /var/log/nova /var/www/html/oslogs/nova
			ln -s /var/log/neutron /var/www/html/oslogs/neutron
			ln -s /var/log/apache2 /var/www/html/oslogs/apache2
			ln -s /var/log/keystone /var/www/html/oslogs/keystone
			echo "Visit http://<controller_ip>/oslogs"
		fi
		echo -n "Do you want to setup Cirros Image? [y/n]: "
		read setup_cirros_image
		if [ "$setup_cirros_image" == "y" ]
		then
			sleep 2
			bash $dir_path/lib/setup-cirros-image.sh Cirros
		fi
		sleep 3
		echo -n "Do you want to setup OpenStack Network and Subnet? [y/n]: "
		read setup_openstack_network
		if [ "$setup_openstack_network" == "y" ]
		then
			source $dir_path/lib/admin_openrc.sh
			echo "About to execute OpenStack commands for some basic Network/Subnet etc"
			neutron net-create network1
			sleep 2
			neutron subnet-create network1 20.20.20.0/24 --name subnet1
			sleep 2
			neutron net-create network2
			sleep 2
			neutron subnet-create network2 192.168.150.0/24 --name subnet2
		fi
else
        echo "This command works only on the controller"
	exit 1
fi
<commit_msg>Newton release does not ship with default Flavors. As a post config action supporting the creation of a flavor<commit_after>echo "Running: $0 $@"
dir_path=$(dirname $0)
node_type=`bash $dir_path/util/detect-nodetype.sh`
echo "Node Type detected as: $node_type"

if [ "$node_type" == "allinone" ] || [ "$node_type" == "controller" ] 
	then
		echo -n "Do you want to enable Web based access to Logs? [y/n]: "
		read enable_web_log_view
		if [ "$enable_web_log_view" == "y" ]
		then
			mkdir /var/www/html/oslogs
			chmod a+rx /var/log/nova
			chmod a+rx /var/log/neutron
			chmod a+rx /var/log/apache2
			chmod a+rx /var/log/keystone
			ln -s /var/log/nova /var/www/html/oslogs/nova
			ln -s /var/log/neutron /var/www/html/oslogs/neutron
			ln -s /var/log/apache2 /var/www/html/oslogs/apache2
			ln -s /var/log/keystone /var/www/html/oslogs/keystone
			echo "Visit http://<controller_ip>/oslogs"
		fi
		echo -n "Do you want to setup Cirros Image? [y/n]: "
		read setup_cirros_image
		if [ "$setup_cirros_image" == "y" ]
		then
			sleep 2
			bash $dir_path/lib/setup-cirros-image.sh Cirros
			sleep 2
		fi
		echo -n "Do you want to setup a Flavor to start instances? [y/n]: "
		read setup_flavor
		if [ "$setup_flavor" == "y" ]
		then
			source $dir_path/lib/admin_openrc.sh
			echo "Setting up Flavor called 'myflavor' with 1 vCPU, 256MB RAM and 500MB disk"
			sleep 1
			openstack flavor create --public myflavor --id auto --ram 256 --disk 1 --vcpus 1 --rxtx-factor 1
			sleep 1

		fi
		echo -n "Do you want to setup OpenStack Network and Subnet? [y/n]: "
		read setup_openstack_network
		if [ "$setup_openstack_network" == "y" ]
		then
			source $dir_path/lib/admin_openrc.sh
			echo "About to execute OpenStack commands for some basic Network/Subnet etc"
			neutron net-create network1
			sleep 2
			neutron subnet-create network1 20.20.20.0/24 --name subnet1
			sleep 2
			neutron net-create network2
			sleep 2
			neutron subnet-create network2 192.168.150.0/24 --name subnet2
		fi
else
        echo "This command works only on the controller"
	exit 1
fi

{'fraction_non_alphanumeric': 0.1165795985702502, 'fraction_numerical': 0.02502062139125653, 'mean_word_length': 3.106094808126411, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 10, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3182053', 'n_tokens_mistral': 1560, 'n_tokens_neox': 1350, 'n_words': 401}