/usr/lib/python2.6/site-packages/openstackclient/tests/compute/v2
NameSizeModeActions
fakes.py35900644editdlrm
fakes.pyc37490644editdlrm
test_aggregate.py124450644editdlrm
test_aggregate.pyc142320644editdlrm
test_flavor.py88130644editdlrm
test_flavor.pyc88570644editdlrm
test_host.py22830644editdlrm
test_host.pyc27100644editdlrm
test_hypervisor.py71130644editdlrm
test_hypervisor.pyc58240644editdlrm
test_hypervisor_stats.py23490644editdlrm
test_hypervisor_stats.pyc26120644editdlrm
test_keypair.py72450644editdlrm
test_keypair.pyc75570644editdlrm
test_security_group.py58010644editdlrm
test_security_group.pyc55430644editdlrm
test_security_group_rule.py93900644editdlrm
test_security_group_rule.pyc75360644editdlrm
test_server.py209190644editdlrm
test_server.pyc159110644editdlrm
test_service.py83980644editdlrm
test_service.pyc77650644editdlrm
__init__.py00644editdlrm
__init__.pyc1760644editdlrm
Edit: /usr/lib/python2.6/site-packages/openstackclient/tests/compute/v2/test_server.pyc (15911B)
Ñò ;vVc @s"ddkZddkZddkZddklZddklZddklZddk l Z ddk l Z ddk l Zddk lZde ifd„ƒYZdefd „ƒYZd efd „ƒYZd efd „ƒYZdefd„ƒYZdeifd„ƒYZdS(iÿÿÿÿN(t exceptions(tutils(tserver(tfakest TestServercBseZd„ZRS(cCsŸtt|ƒiƒ|iiii|_|iiƒ|iiii |_ |i iƒ|iiii |_ |i iƒ|iii i |_|iiƒdS(N(tsuperRtsetUptapptclient_managertcomputetserverst servers_mockt reset_mocktimagest cimages_mocktflavorst flavors_mocktimaget images_mock(tself((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyRs   (t__name__t __module__R(((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyRstTestServerCreatecBsDeZd„Zd„Zd„Zd„Zeidƒd„ƒZRS(cCstt|ƒiƒtidtiti ƒdt ƒ|i i _ tidtiti ƒdt ƒ}h|id<||i i_ tidtitiƒdt ƒ|_|i|ii_ tidtitiƒdt ƒ|_|i|ii_ ti|idƒ|_dS(Ntloadedtnetworks(RRRRt FakeResourcetNonetcopytdeepcopyt compute_fakestSERVERtTrueR tcreatet return_valuet__dict__tgett image_fakestIMAGERRtFLAVORtflavorRRt CreateServerRtcmd(Rt new_server((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyR5s,    cCsUtig}dtifg}y|i|i||ƒWntij onXdS(Nt server_name(Rt server_idt check_parserR)RtParserException(Rtarglistt verifylist((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyttest_server_create_no_optionsVs  c Cs*ddddtig}dddtfdtifg}|i|i||ƒ}|ii|ƒ\}}td dd hd dd d dd dgdddddddhdgdhddƒ }|ii i ti|i |i |d}|i ||ƒddtitidf}|i ||ƒdS(Ns--imagetimage1s--flavortflavor1RR't config_driveR+tmetatfilestreservation_idt min_countit max_counttsecurity_groupstuserdatatkey_nametavailability_zonetblock_device_mappingtnicstscheduler_hintst addressestidtnamet propertiestsLarge ()(simageR2(sflavorR3(s addressessflavorsidsnameRD(RR,tFalseR-R)t take_actiontdictRR R tassert_called_withRR't assertEqualR+( RR/R0t parsed_argstcolumnstdatatkwargstcollisttdatalist((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyttest_server_create_minimalcsH     c CsQddddddddtig }d)d*d ddgfd tfd tifg}|i|i||ƒ}tiƒ}hgd 6|_tiƒ|ii _ tiƒ|ii i _ ||ii i i _ tiƒ}tiƒ}||ii i _||ii i _hhdd6gd6|_hhdd6gd6|_|ii|ƒ\}}tdddhdddddddgdddddddhdhdd6d d!6d d"6d d#6hd d6d d!6d d"6dd#6gd$hd dƒ } |iiiti|i|i| d+} |i| |ƒd d(titid f} |i| |ƒdS(,Ns--imageR2s--flavorR3s--nics net-id=net1s port-id=port1RR'tnicR4R+tnetworkt net1_uuidRBRt port1_uuidtportsR5R6R7R8iR9R:R;R<R=R>R?snet-idREs v4-fixed-ips v6-fixed-ipsport-idR@RARCRDsLarge ()(simagesimage1(sflavorsflavor1(s addressessflavorsidsnames properties(RR,RFR-R)tmocktMockR!RRtauth_reftservice_catalogt get_endpointsRSt list_networkst list_portsRGRHRR R RIRR'RJR+( RR/R0RKR[R\R]RLRMRNRORP((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyttest_server_create_with_network—sr           s)openstackclient.compute.v2.server.io.openc Csttiddƒ}||_d|i_dddddd tig}d!d"d#d tfdtifg}|i|i||ƒ}|ii |ƒ\}}|i d ƒ|i i ƒt dddhdddddddgd|dddddhdgdhd dƒ }|iii ti|i|i|d$} |i| |ƒdd titidf} |i| |ƒdS(%NRCtFiles #!/bin/shs--imageR2s--flavorR3s --user-datas userdata.shRR't user_dataR4R+R5R6R7R8iR9R:R;R<R=R>R?R@RARBRDREsLarge ()(simagesimage1(sflavorsflavor1(R`s userdata.sh(s addressessflavorsidRCs properties(RWt MagicMockR!treadRR,RFR-R)RGRItcloseRHRR R RR'RJR+( Rt mock_opent mock_fileR/R0RKRLRMRNRORP((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyttest_server_create_userdataãsV         ( RRRR1RQR^RWtpatchRf(((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyR3s  ! 4 LtTestServerDeletecBsbeZd„Zd„Zeiieddeƒd„ƒZ eiiedde ƒd„ƒZ RS(cCsktt|ƒiƒtidtiti ƒdt ƒ|i i _ d|i i_ ti|idƒ|_dS(NR(RRhRRRRRRRRRR R#R!tdeleteRt DeleteServerRR)(R((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyR'scCsctig}dtigfg}|i|i||ƒ}|ii|ƒ|iiitiƒdS(NR (RR,R-R)RGR RiRI(RR/R0RK((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyttest_server_delete_no_options5s   twait_for_deleteR!cCs…tidg}dtigfg}|i|i||ƒ}|ii|ƒ|iiitiƒ|i|itidt i ƒdS(Ns--waitR tcallback( RR,R-R)RGR RiRItassert_called_once_withRt_show_progress(Rtmock_wait_for_deleteR/R0RK((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyttest_server_delete_wait_okEs   cCsŽtidg}dtigfg}|i|i||ƒ}|it|ii|ƒ|iii tiƒ|i |itidt i ƒdS(Ns--waitR Rm( RR,R-R)t assertRaisest SystemExitRGR RiRIRnRRo(RRpR/R0RK((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyttest_server_delete_wait_fails\s   ( RRRRkRWRgtobjectt common_utilsRRqRFRt(((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyRh%s  $tTestServerImageCreatecBs#eZd„Zd„Zd„ZRS(cCs›tt|ƒiƒtidtiti ƒdt ƒ|i i _ ti|i i_ tidtitiƒdt ƒ|ii _ ti|idƒ|_dS(NR(RRwRRRRRRRRRR R#R!R$timage_idt create_imageR%RRtCreateServerImageRR)(R((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyRvscCs¾tig}dtifg}|i|i||ƒ}|ii|ƒ\}}|iii|iii ti ƒd}|i ||ƒt i t it it it if}|i ||ƒdS(NRRBRCtownert protectedt visibility(sidsnamesownerR|R}(RR,R-R)RGR RyRIR#R!R+RJR$Rxt image_namet image_ownertimage_protectedtimage_visibility(RR/R0RKRLRMRORP((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyt#test_server_image_create_no_options‹s     cCsÄddtig}d dtifg}|i|i||ƒ}|ii|ƒ\}}|iii|iii dƒd }|i ||ƒt i t i t it it if}|i ||ƒdS( Ns--namesimg-namRCRRBR{R|R}(snamesimg-nam(sidsnamesowners protecteds visibility(RR,R-R)RGR RyRIR#R!RJR$RxR~RR€R(RR/R0RKRLRMRORP((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyttest_server_image_create_name¨s"    (RRRR‚Rƒ(((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyRwts  tTestServerResizecBs5eZd„Zd„Zd„Zd„Zd„ZRS(cCsÎtt|ƒiƒtidtiti ƒdt ƒ|_ |i |i i _d|i i_d|i i_d|i i_tidtitiƒdt ƒ|_|i|ii _ti|idƒ|_dS(NR(RR„RRRRRRRRRtservers_get_return_valueR R#R!tresizetconfirm_resizet revert_resizeR&tflavors_get_return_valueRRt ResizeServerRR)(R((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyRÊs  cCs«tig}dtfdtfdtifg}|i|i||ƒ}|ii|ƒ|iiitiƒ|i |ii ƒ|i |ii ƒ|i |ii ƒdS(NtconfirmtrevertR( RR,RFR-R)RGR R#RItassertNotCalledR†R‡Rˆ(RR/R0RK((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyttest_server_resize_no_optionsäs     cCsßdtitig}dtifdtfdtfdtifg}|i|i||ƒ}|ii|ƒ|iii tiƒ|i ii tiƒ|ii i |i |i ƒ|i|iiƒ|i|iiƒdS(Ns--flavorR'R‹RŒR(Rt flavor_idR,RFR-R)RGR R#RIRR†R…R‰RR‡Rˆ(RR/R0RK((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyttest_server_resizeús"           cCs±dtig}dtfdtfdtifg}|i|i||ƒ}|ii|ƒ|iii tiƒ|i |ii ƒ|ii i |i ƒ|i |iiƒdS(Ns --confirmR‹RŒR(RR,RRFR-R)RGR R#RIRR†R‡R…Rˆ(RR/R0RK((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyttest_server_resize_confirms       cCs±dtig}dtfdtfdtifg}|i|i||ƒ}|ii|ƒ|iii tiƒ|i |ii ƒ|i |ii ƒ|ii i |iƒdS(Ns--revertR‹RŒR(RR,RFRR-R)RGR R#RIRR†R‡RˆR…(RR/R0RK((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyttest_server_resize_revert1s      (RRRRŽRR‘R’(((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyR„Ès     tTestServerGeneralcBseZhhdd6dd6gd6Zhhdd6dd6dd6dd 6hd d6d d6d d6d d 6gd6Zhddgd6Zd„ZRS(s 192.168.0.3taddritversiontprivatesfa:16:3e:93:b3:01sOS-EXT-IPS-MAC:mac_addrs 10.10.1.2tfixedsOS-EXT-IPS:typesfa:16:3e:93:b3:02is0:0:0:0:0:ffff:a0a:103tfloatingtfoos 10.3.3.18s 124.12.125.4tjenkinscCs­|idti|idddgƒƒ|idti|idddgƒƒ|idti|idddgƒƒ|idti|iddgƒƒ|idti|id dgƒƒ|id ti|idddgƒƒ|id ti|idddgƒƒ|ititi|iddgƒ|ititi|id dgƒ|ititi|idddgƒ|ititi|iddgƒdS( Ns 192.168.0.3R–iis 10.10.1.2R—s0:0:0:0:0:ffff:a0a:103tpublicR˜s 124.12.125.4s 10.3.3.18tadmin( RJRt_get_ip_addresstOLDtNEWtODDRrRt CommandError(R((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyttest_get_ip_addressfs,           (RRRžRŸR R¢(((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyR“Ks"(RRWt testtoolstopenstackclient.commonRRRvtopenstackclient.compute.v2Rt openstackclient.tests.compute.v2RRtopenstackclient.teststopenstackclient.tests.image.v2R$t TestComputev2RRRhRwR„tTestCaseR“(((s\/tmp/pip-build-cD3xZi/python-openstackclient/openstackclient/tests/compute/v2/test_server.pyts   òOTƒ