Beispiel #1
0
    def POST(self):
        # Note!!!
        # Because this environment may be changed, use vc ip and name to seek system testbed
        # Currently these should be hardcode
        data = web.input()
        ret = 0
        if data.clusterName == "SC-TB-225/224" and \
            data.clusterVcIp == "10.65.81.5":
            if not utils.is_existing_process('roam_iap225'):
                os.system('cd ~/scalability && nohup ./roam_iap225.sh 3 4 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap225-3-4  &')
                os.system('cd ~/scalability && nohup ./roam_iap225.sh 4 1 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap225-4-1  &')
                os.system('cd ~/scalability && nohup ./roam_iap225.sh 4 2 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap225-4-2  &')
                os.system('cd ~/scalability && nohup ./roam_iap225.sh 4 3 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap225-4-3  &')
                os.system('cd ~/scalability && nohup ./roam_iap225.sh 4 4 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap225-4-4  &')
                ret = 1
        elif data.clusterName == "SC-TB-104/105" and \
            data.clusterVcIp == "10.65.250.5":
            if not utils.is_existing_process('roam_iap10x'):
                os.system('cd ~/scalability && nohup ./roam_iap10x.sh 1 2 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap10x-1-2  &')
                os.system('cd ~/scalability && nohup ./roam_iap10x.sh 1 3 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap10x-1-3  &')
                os.system('cd ~/scalability && nohup ./roam_iap10x.sh 1 4 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap10x-1-4  &')
                os.system('cd ~/scalability && nohup ./roam_iap10x.sh 2 1 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap10x-2-1  &')
                os.system('cd ~/scalability && nohup ./roam_iap10x.sh 2 2 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap10x-2-2  &')
                ret = 1
        elif data.clusterName == "SC-TB-134/135" and \
            data.clusterVcIp == "10.65.249.5":
            if not utils.is_existing_process('roam_iap13x'):
                os.system('cd ~/scalability && nohup ./roam_iap13x.sh 2 3 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap13x-2-3  &')
                os.system('cd ~/scalability && nohup ./roam_iap13x.sh 2 4 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap13x-2-4  &')
                os.system('cd ~/scalability && nohup ./roam_iap13x.sh 3 1 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap13x-3-1  &')
                os.system('cd ~/scalability && nohup ./roam_iap13x.sh 3 2 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap13x-3-2  &')
                os.system('cd ~/scalability && nohup ./roam_iap13x.sh 3 3 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap13x-3-3  &')
                ret = 1
        elif data.clusterName == "SC-TB-205/204" and \
            data.clusterVcIp == "10.65.83.5":
            if not utils.is_existing_process('roam_iap20x'):
                os.system('cd ~/scalability && nohup ./roam_iap20x.sh 1 1 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap205-1-1  &')
                os.system('cd ~/scalability && nohup ./roam_iap20x.sh 1 2 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap205-1-2  &')
                os.system('cd ~/scalability && nohup ./roam_iap20x.sh 1 3 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap205-1-3  &')
                os.system('cd ~/scalability && nohup ./roam_iap20x.sh 1 4 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap205-1-4  &')
                os.system('cd ~/scalability && nohup ./roam_iap20x.sh 2 1 '+data.ssid+' 400 1 100 c_Scalability_ w_Scalability_ '+data.roamingTimes+' > log/roam_iap205-2-1  &')
                ret = 1

        return ret
Beispiel #2
0
    def POST(self):
        # Note!!!
        # Because this environment may be changed, use vc ip and name to seek system testbed
        # Currently these should be hardcode
        data = web.input()
        ret = 0
        if data.clusterName == "SC-TB-225/224" and \
            data.clusterVcIp == "10.65.81.5" and \
            data.clientCounts == "2000":
            if utils.is_existing_process('add_all_iap225') or \
               utils.is_existing_process('rw_dhcp_iap225'):
            	os.system('ps ax|grep add_all_iap225| grep -v grep | awk \'{print $1}\' | xargs kill -9')
            	os.system('ps ax|grep rw_dhcp_iap225| grep -v grep | awk \'{print $1}\' | xargs kill -9')
            os.system('cd ~/scalability && ./add_all_iap225 400 '+data.ssid+' '+data.clientUsername+' '+data.clientPassword+' 100 200')
            ret = 1
        elif data.clusterName == "SC-TB-104/105" and \
            data.clusterVcIp == "10.65.250.5" and \
            data.clientCounts == "2000":
            if utils.is_existing_process('add_all_iap10x') or \
               utils.is_existing_process('rw_dhcp_iap105'):
            	os.system('ps ax|grep add_all_iap10x| grep -v grep | awk \'{print $1}\' | xargs kill -9')
            	os.system('ps ax|grep rw_dhcp_iap105| grep -v grep | awk \'{print $1}\' | xargs kill -9')
            os.system('cd ~/scalability && ./add_all_iap10x 400 '+data.ssid+' '+data.clientUsername+' '+data.clientPassword+' 100 200')
            ret = 1
        elif data.clusterName == "SC-TB-134/135" and \
            data.clusterVcIp == "10.65.249.5" and \
            data.clientCounts == "2000":
            if utils.is_existing_process('add_all_iap13x') or \
               utils.is_existing_process('rw_dhcp_iap135'):
            	os.system('ps ax|grep add_all_iap13x| grep -v grep | awk \'{print $1}\' | xargs kill -9')
            	os.system('ps ax|grep rw_dhcp_iap135| grep -v grep | awk \'{print $1}\' | xargs kill -9')
            os.system('cd ~/scalability && ./add_all_iap13x 400 '+data.ssid+' '+data.clientUsername+' '+data.clientPassword+' 100 200')
            ret = 1
        elif data.clusterName == "SC-TB-205/204" and \
            data.clusterVcIp == "10.65.83.5" and \
            data.clientCounts == "2000":
            if utils.is_existing_process('add_all_iap205') or \
               utils.is_existing_process('rw_dhcp_iap205'):
            	os.system('ps ax|grep add_all_iap205| grep -v grep | awk \'{print $1}\' | xargs kill -9')
            	os.system('ps ax|grep rw_dhcp_iap205| grep -v grep | awk \'{print $1}\' | xargs kill -9')
            os.system('cd ~/scalability && ./add_all_iap205 400 '+data.ssid+' '+data.clientUsername+' '+data.clientPassword+' 100 200')
            ret = 1

        return ret