From c36f96b80c00a23164a194c6c74d7281c9835e12 Mon Sep 17 00:00:00 2001 From: spisarski Date: Tue, 21 Nov 2017 12:09:29 -0700 Subject: Removal of deprecated SNAPS-OO classes. JIRA: SNAPS-202 Change-Id: I115b4927b287a5525f4c1b95128d91f5229c7856 Signed-off-by: spisarski --- functest/opnfv_tests/vnf/ims/cloudify_ims_perf.py | 105 +++++++++++----------- 1 file changed, 53 insertions(+), 52 deletions(-) (limited to 'functest/opnfv_tests/vnf/ims/cloudify_ims_perf.py') diff --git a/functest/opnfv_tests/vnf/ims/cloudify_ims_perf.py b/functest/opnfv_tests/vnf/ims/cloudify_ims_perf.py index 90068525..a1612a52 100644 --- a/functest/opnfv_tests/vnf/ims/cloudify_ims_perf.py +++ b/functest/opnfv_tests/vnf/ims/cloudify_ims_perf.py @@ -25,18 +25,19 @@ from functest.opnfv_tests.openstack.snaps import snaps_utils import functest.opnfv_tests.vnf.ims.cloudify_ims as cloudify_ims from functest.utils.constants import CONST -from snaps.openstack.create_network import (NetworkSettings, SubnetSettings, - OpenStackNetwork, PortSettings) -from snaps.openstack.create_security_group import (SecurityGroupSettings, - SecurityGroupRuleSettings, - Direction, Protocol, - OpenStackSecurityGroup) -from snaps.openstack.create_router import RouterSettings, OpenStackRouter -from snaps.openstack.create_instance import (VmInstanceSettings, - FloatingIpSettings, - OpenStackVmInstance) -from snaps.openstack.create_flavor import FlavorSettings, OpenStackFlavor -from snaps.openstack.create_image import ImageSettings +from snaps.config.flavor import FlavorConfig +from snaps.config.image import ImageConfig +from snaps.config.network import NetworkConfig, PortConfig, SubnetConfig +from snaps.config.router import RouterConfig +from snaps.config.security_group import ( + Direction, Protocol, SecurityGroupConfig, SecurityGroupRuleConfig) +from snaps.config.vm_inst import FloatingIpConfig, VmInstanceConfig + +from snaps.openstack.create_flavor import OpenStackFlavor +from snaps.openstack.create_instance import OpenStackVmInstance +from snaps.openstack.create_network import OpenStackNetwork +from snaps.openstack.create_router import OpenStackRouter +from snaps.openstack.create_security_group import OpenStackSecurityGroup from ixia.utils.IxChassisUtils import ChassisRestAPI import ixia.utils.IxLoadUtils as IxLoadUtils @@ -115,17 +116,17 @@ class CloudifyImsPerf(cloudify_ims.CloudifyIms): ellis_ip = outputs['ellis_ip'] self.__logger.info("Creating full IXIA network ...") - subnet_settings = SubnetSettings(name='ixia_management_subnet', - cidr='10.10.10.0/24') - network_settings = NetworkSettings(name='ixia_management_network', - subnet_settings=[subnet_settings]) + subnet_settings = SubnetConfig(name='ixia_management_subnet', + cidr='10.10.10.0/24') + network_settings = NetworkConfig(name='ixia_management_network', + subnet_settings=[subnet_settings]) network_creator = OpenStackNetwork(self.snaps_creds, network_settings) network_creator.create() self.created_object.append(network_creator) ext_net_name = snaps_utils.get_ext_net_name(self.snaps_creds) router_creator = OpenStackRouter( self.snaps_creds, - RouterSettings( + RouterConfig( name='ixia_management_router', external_gateway=ext_net_name, internal_subnets=[subnet_settings.name])) @@ -136,21 +137,21 @@ class CloudifyImsPerf(cloudify_ims.CloudifyIms): self.__logger.info("Creating security groups for IXIA VMs") sg_rules = list() sg_rules.append( - SecurityGroupRuleSettings(sec_grp_name="ixia_management", - direction=Direction.ingress, - protocol=Protocol.tcp, port_range_min=1, - port_range_max=65535)) + SecurityGroupRuleConfig(sec_grp_name="ixia_management", + direction=Direction.ingress, + protocol=Protocol.tcp, port_range_min=1, + port_range_max=65535)) sg_rules.append( - SecurityGroupRuleSettings(sec_grp_name="ixia_management", - direction=Direction.ingress, - protocol=Protocol.udp, port_range_min=1, - port_range_max=65535)) + SecurityGroupRuleConfig(sec_grp_name="ixia_management", + direction=Direction.ingress, + protocol=Protocol.udp, port_range_min=1, + port_range_max=65535)) sg_rules.append( - SecurityGroupRuleSettings(sec_grp_name="ixia_management", - direction=Direction.ingress, - protocol=Protocol.icmp)) + SecurityGroupRuleConfig(sec_grp_name="ixia_management", + direction=Direction.ingress, + protocol=Protocol.icmp)) - ixia_managment_sg_settings = SecurityGroupSettings( + ixia_managment_sg_settings = SecurityGroupConfig( name="ixia_management", rule_settings=sg_rules) securit_group_creator = OpenStackSecurityGroup( @@ -162,12 +163,12 @@ class CloudifyImsPerf(cloudify_ims.CloudifyIms): sg_rules = list() sg_rules.append( - SecurityGroupRuleSettings(sec_grp_name="ixia_ssh_http", - direction=Direction.ingress, - protocol=Protocol.tcp, port_range_min=1, - port_range_max=65535)) + SecurityGroupRuleConfig(sec_grp_name="ixia_ssh_http", + direction=Direction.ingress, + protocol=Protocol.tcp, port_range_min=1, + port_range_max=65535)) - ixia_ssh_http_sg_settings = SecurityGroupSettings( + ixia_ssh_http_sg_settings = SecurityGroupConfig( name="ixia_ssh_http", rule_settings=sg_rules) securit_group_creator = OpenStackSecurityGroup( @@ -177,7 +178,7 @@ class CloudifyImsPerf(cloudify_ims.CloudifyIms): securit_group_creator.create() self.created_object.append(securit_group_creator) - chassis_flavor_settings = FlavorSettings( + chassis_flavor_settings = FlavorConfig( name="ixia_vChassis", ram=4096, disk=40, @@ -187,7 +188,7 @@ class CloudifyImsPerf(cloudify_ims.CloudifyIms): flavor_creator.create() self.created_object.append(flavor_creator) - card_flavor_settings = FlavorSettings( + card_flavor_settings = FlavorConfig( name="ixia_vCard", ram=4096, disk=4, @@ -197,7 +198,7 @@ class CloudifyImsPerf(cloudify_ims.CloudifyIms): flavor_creator.create() self.created_object.append(flavor_creator) - load_flavor_settings = FlavorSettings( + load_flavor_settings = FlavorConfig( name="ixia_vLoad", ram=8192, disk=100, @@ -207,52 +208,52 @@ class CloudifyImsPerf(cloudify_ims.CloudifyIms): flavor_creator.create() self.created_object.append(flavor_creator) - chassis_image_settings = ImageSettings( + chassis_image_settings = ImageConfig( name=self.test['requirements']['chassis']['image'], image_user='admin', exists=True) - card_image_settings = ImageSettings( + card_image_settings = ImageConfig( name=self.test['requirements']['card']['image'], image_user='admin', exists=True) - load_image_settings = ImageSettings( + load_image_settings = ImageConfig( name=self.test['requirements']['load']['image'], image_user='admin', exists=True) - chassis_port_settings = PortSettings( + chassis_port_settings = PortConfig( name='ixia_chassis_port', network_name=network_settings.name) - card1_port1_settings = PortSettings( + card1_port1_settings = PortConfig( name='ixia_card1_port1', network_name=network_settings.name) - card2_port1_settings = PortSettings( + card2_port1_settings = PortConfig( name='ixia_card2_port1', network_name=network_settings.name) - card1_port2_settings = PortSettings( + card1_port2_settings = PortConfig( name='ixia_card1_port2', network_name="cloudify_ims_network") - card2_port2_settings = PortSettings( + card2_port2_settings = PortConfig( name='ixia_card2_port2', network_name="cloudify_ims_network") - load_port_settings = PortSettings( + load_port_settings = PortConfig( name='ixia_load_port', network_name=network_settings.name) - chassis_settings = VmInstanceSettings( + chassis_settings = VmInstanceConfig( name='ixia_vChassis', flavor=chassis_flavor_settings.name, port_settings=[chassis_port_settings], security_group_names=[ixia_ssh_http_sg_settings.name, ixia_managment_sg_settings.name], - floating_ip_settings=[FloatingIpSettings( + floating_ip_settings=[FloatingIpConfig( name='ixia_vChassis_fip', port_name=chassis_port_settings.name, router_name=router_creator.router_settings.name)]) @@ -266,7 +267,7 @@ class CloudifyImsPerf(cloudify_ims.CloudifyIms): fip_chassis = vm_creator.get_floating_ip().ip self.created_object.append(vm_creator) - card1_settings = VmInstanceSettings( + card1_settings = VmInstanceConfig( name='ixia_vCard1', flavor=card_flavor_settings.name, port_settings=[card1_port1_settings, card1_port2_settings], @@ -284,7 +285,7 @@ class CloudifyImsPerf(cloudify_ims.CloudifyIms): vcard_ips_p2.append(vm_creator.get_port_ip('ixia_card1_port2')) self.created_object.append(vm_creator) - card2_settings = VmInstanceSettings( + card2_settings = VmInstanceConfig( name='ixia_vCard2', flavor=card_flavor_settings.name, port_settings=[card2_port1_settings, card2_port2_settings], @@ -300,13 +301,13 @@ class CloudifyImsPerf(cloudify_ims.CloudifyIms): vcard_ips_p2.append(vm_creator.get_port_ip('ixia_card2_port2')) self.created_object.append(vm_creator) - load_settings = VmInstanceSettings( + load_settings = VmInstanceConfig( name='ixia_vLoad', flavor=load_flavor_settings.name, port_settings=[load_port_settings], security_group_names=[ixia_ssh_http_sg_settings.name, ixia_managment_sg_settings.name], - floating_ip_settings=[FloatingIpSettings( + floating_ip_settings=[FloatingIpConfig( name='ixia_vLoad_fip', port_name=load_port_settings.name, router_name=router_creator.router_settings.name)]) -- cgit 1.2.3-korg hlight .nv { color: #f8f8f2 } /* Name.Variable */ .highlight .ow { color: #f92672 } /* Operator.Word */ .highlight .w { color: #f8f8f2 } /* Text.Whitespace */ .highlight .mb { color: #ae81ff } /* Literal.Number.Bin */ .highlight .mf { color: #ae81ff } /* Literal.Number.Float */ .highlight .mh { color: #ae81ff } /* Literal.Number.Hex */ .highlight .mi { color: #ae81ff } /* Literal.Number.Integer */ .highlight .mo { color: #ae81ff } /* Literal.Number.Oct */ .highlight .sa { color: #e6db74 } /* Literal.String.Affix */ .highlight .sb { color: #e6db74 } /* Literal.String.Backtick */ .highlight .sc { color: #e6db74 } /* Literal.String.Char */ .highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */ .highlight .sd { color: #e6db74 } /* Literal.String.Doc */ .highlight .s2 { color: #e6db74 } /* Literal.String.Double */ .highlight .se { color: #ae81ff } /* Literal.String.Escape */ .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ .highlight .si { color: #e6db74 } /* Literal.String.Interpol */ .highlight .sx { color: #e6db74 } /* Literal.String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #a6e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
#!/usr/bin/env bash
# Utility script used to interact with a deployment
# @author Tim Rozet (trozet@redhat.com)

VALID_CMDS="undercloud overcloud opendaylight debug-stack mock-detached -h --help"
SSH_OPTIONS=(-o StrictHostKeyChecking=no -o GlobalKnownHostsFile=/dev/null -o UserKnownHostsFile=/dev/null -o LogLevel=error)

##connects to undercloud
##params: user to login with, command to execute on undercloud (optional)
function undercloud_connect {
  local user=$1

  if [ -z "$1" ]; then
    echo "Missing required argument: user to login as to undercloud"
    return 1
  fi

  if [ -z "$2" ]; then
    ssh ${SSH_OPTIONS[@]} ${user}@$(get_undercloud_ip)
  else
    ssh ${SSH_OPTIONS[@]} -T ${user}@$(get_undercloud_ip) "$2"
  fi
}

##outputs the Undercloud's IP address
##params: none
function get_undercloud_ip {
  echo $(arp -an | grep $(virsh domiflist undercloud | grep default |\
    awk '{print $5}') | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")
}

##connects to overcloud nodes
##params: node to login to, command to execute on overcloud (optional)
function overcloud_connect {
  local node
  local node_output
  local node_ip

  if [ -z "$1" ]; then
    echo "Missing required argument: overcloud node to login to"
    return 1
  elif ! echo "$1" | grep -E "(controller|compute)[0-9]+" > /dev/null; then
    echo "Invalid argument: overcloud node to login to must be in the format: \
controller<number> or compute<number>"
    return 1
  fi

  node_output=$(undercloud_connect "stack" "source stackrc; nova list")
  node=$(echo "$1" | sed -E 's/([a-zA-Z]+)([0-9]+)/\1-\2/')

  node_ip=$(echo "$node_output" | grep "$node" | grep -Eo "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")

  if [ "$node_ip" == "" ]; then
    echo -e "Unable to find IP for ${node} in \n${node_output}"
    return 1
  fi

  if [ -z "$2" ]; then
    ssh ${SSH_OPTIONS[@]} heat-admin@${node_ip}
  else
    ssh ${SSH_OPTIONS[@]} -T heat-admin@${node_ip} "$2"
  fi
}

##connects to opendaylight karaf console
##params: None
function opendaylight_connect {
  local opendaylight_ip
  opendaylight_ip=$(undercloud_connect "stack" "cat overcloudrc | grep SDN_CONTROLLER_IP | grep -Eo [0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")

  if [ "$opendaylight_ip" == "" ]; then
    echo -e "Unable to find IP for OpenDaylight in overcloudrc"
    return 1
  else
    echo -e "Connecting to ODL Karaf console.  Default password is 'karaf'"
  fi

  ssh -p 8101 ${SSH_OPTIONS[@]} karaf@${opendaylight_ip}
}

##outputs heat stack deployment failures
##params: none
function debug_stack {
  source ~/stackrc
  openstack stack failures list overcloud --long
}

resolve_cmd() {
  local given=$1
  shift
  local list=($*)
  local inv=(${list[*]##${given}*})
  local OIFS=$IFS; IFS='|'; local pat="${inv[*]}"; IFS=$OIFS
  shopt -s extglob
  echo "${list[*]##+($pat)}"
  shopt -u extglob
}

display_usage() {
  echo -e "Usage:\n$0 subcommand [ arguments ]\n"
  echo -e "Arguments:\n"
  echo -e "   undercloud [ user [ command ] ]   Connect to Undercloud VM as user and optionally execute a command"
  echo -e "                                     user    Optional: Defaults to 'stack'"
  echo -e "                                     command Optional: Defaults to none"
  echo -e ""
  echo -e "   opendaylight                      Connect to OpenDaylight Karaf console"
  echo -e ""
  echo -e "   overcloud  [ node [ command ] ]   Connect to an Overcloud node and optionally execute a command"
  echo -e "                                     node    Required: in format controller|compute<number>.  Example: controller0"
  echo -e "                                     command Optional: Defaults to none"
  echo -e ""
  echo -e "   debug-stack                       Print parsed deployment failures to stdout"
  echo -e ""
  echo -e "   mock-detached on | off            Add firewall rules to the jump host to mock a detached deployment\n"
}

##translates the command line argument
##params: $@ the entire command line is passed
##usage: parse_cmd_line() "$@"
parse_cmdline() {
  local match

  match=($(resolve_cmd $1 $VALID_CMDS))
  if [ ${#match[*]} -gt 1 ]; then
    echo "$1 is ambiguous, possible matches: ${match[*]}" >&2
    exit 1
  elif [ ${#match[*]} -lt 1 ]; then
    echo "$1 is not a recognized command.  Use -h to see acceptable list" >&2
    exit 1
  else
    match=$(echo $match | tr -d ' ')
  fi

  case "$match" in
        -h|--help)
                display_usage
                exit 0
            ;;
        undercloud)
                if [ -z "$2" ]; then
                  # connect as stack by default
                  undercloud_connect stack
                elif [ -z "$3" ]; then
                  undercloud_connect "$2"
                else
                  undercloud_connect "$2" "$3"
                fi
                exit 0
            ;;
        overcloud)
                if [ -z "$2" ]; then
                  overcloud_connect
                elif [ -z "$3" ]; then
                  overcloud_connect "$2"
                else
                  overcloud_connect "$2" "$3"
                fi
                exit 0
            ;;
        opendaylight)
                opendaylight_connect
                exit 0
            ;;
        debug-stack)
                undercloud_connect stack "$(typeset -f debug_stack); debug_stack"
                exit 0
            ;;
        mock-detached)
                if [ "$2" == "on" ]; then
                    echo "Ensuring we can talk to gerrit.opnfv.org"
                    iptables -A OUTPUT -p tcp -d gerrit.opnfv.org --dport 443 -j ACCEPT
                    echo "Blocking output http (80) traffic"
                    iptables -A OUTPUT -p tcp --dport 80 -j REJECT
                    iptables -A FORWARD -p tcp --dport 80 -j REJECT
                    echo "Blocking output https (443) traffic"
                    iptables -A OUTPUT -p tcp --dport 443 -j REJECT
                    iptables -A FORWARD -p tcp --dport 443 -j REJECT
                    echo "Blocking output dns (53) traffic"
                    iptables -A FORWARD -p tcp --dport 53 -j REJECT
                elif [ "$2" == "off" ]; then
                    echo "Cleaning gerrit.opnfv.org specific rule"
                    iptables -D OUTPUT -p tcp -d gerrit.opnfv.org --dport 443 -j ACCEPT
                    echo "Allowing output http (80) traffic"
                    iptables -D OUTPUT -p tcp --dport 80 -j REJECT
                    iptables -D FORWARD -p tcp --dport 80 -j REJECT
                    echo "Allowing output https (443) traffic"
                    iptables -D OUTPUT -p tcp --dport 443 -j REJECT
                    iptables -D FORWARD -p tcp --dport 443 -j REJECT
                    echo "Allowing output dns (53) traffic"
                    iptables -D OUTPUT -p tcp --dport 53 -j REJECT
                    iptables -D FORWARD -p tcp --dport 53 -j REJECT
                else
                    display_usage
                fi
                exit 0
            ;;
        *)
                echo -e "\n\nThis script is used to interact with Apex deployments\n\n"
                echo "Use -h to display help"
                exit 1
            ;;
  esac
}


main() {
  parse_cmdline "$@"
}

main "$@"