<s> from basetest import BaseToscaTest <EOL> from core . models import Instance , Slice <EOL> class ComputeTest ( BaseToscaTest ) : <EOL> tests = [ <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> "<STR_LIT>" , <EOL> ] <EOL> def cleanup ( self ) : <EOL> self . try_to_delete ( Instance , name = "<STR_LIT>" ) <EOL> self . try_to_delete ( Instance , name = "<STR_LIT>" ) <EOL> self . try_to_delete ( Instance , name = "<STR_LIT>" ) <EOL> self . try_to_delete ( Instance , name = "<STR_LIT>" ) <EOL> self . try_to_delete ( Instance , name = "<STR_LIT>" ) <EOL> self . try_to_delete ( Slice , name = "<STR_LIT>" ) <EOL> def get_base_templates ( self ) : <EOL> return self . make_nodetemplate ( "<STR_LIT>" , "<STR_LIT>" ) + self . make_nodetemplate ( "<STR_LIT>" , "<STR_LIT>" , reqs = [ ( "<STR_LIT>" , "<STR_LIT>" ) ] ) <EOL> def create_compute_m1_tiny ( self ) : <EOL> self . assert_noobj ( Instance , "<STR_LIT>" ) <EOL> self . execute ( self . get_base_templates ( ) + <EOL> self . make_compute ( "<STR_LIT>" , "<STR_LIT>" , disk_size = "<STR_LIT>" , mem_size = "<STR_LIT>" ) ) <EOL> instance = self . assert_obj ( Instance , "<STR_LIT>" ) <EOL> assert ( instance . flavor . name == "<STR_LIT>" ) <EOL> def create_compute_m1_small ( self ) : <EOL> self . assert_noobj ( Instance , "<STR_LIT>" ) <EOL> self . execute ( self . get_base_templates ( ) + <EOL> self . make_compute ( "<STR_LIT>" , "<STR_LIT>" , disk_size = "<STR_LIT>" , mem_size = "<STR_LIT>" ) ) <EOL> instance = self . assert_obj ( Instance , "<STR_LIT>" ) <EOL> assert ( instance . flavor . name == "<STR_LIT>" ) <EOL> def create_compute_m1_large_8192MB ( self ) : <EOL> self . assert_noobj ( Instance , "<STR_LIT>" ) <EOL> self . execute ( self . get_base_templates ( ) + <EOL> self . make_compute ( "<STR_LIT>" , "<STR_LIT>" , mem_size = "<STR_LIT>" ) ) <EOL> instance = self . assert_obj ( Instance , "<STR_LIT>" ) <EOL> assert ( instance . flavor . name == "<STR_LIT>" ) <EOL> def create_compute_m1_large_8GB ( self ) : <EOL> self . assert_noobj ( Instance , "<STR_LIT>" ) <EOL> self . execute ( self . get_base_templates ( ) + <EOL> self . make_compute ( "<STR_LIT>" , "<STR_LIT>" , mem_size = "<STR_LIT>" ) ) <EOL> instance = self . assert_obj ( Instance , "<STR_LIT>" ) <EOL> assert ( instance . flavor . name == "<STR_LIT>" ) <EOL> def destroy_compute ( self ) : <EOL> self . execute ( self . get_base_templates ( ) + <EOL> self . make_compute ( "<STR_LIT>" , "<STR_LIT>" ) ) <EOL> self . assert_obj ( Instance , "<STR_LIT>" ) <EOL> self . destroy ( self . get_base_templates ( ) + <EOL> self . make_compute ( "<STR_LIT>" , "<STR_LIT>" ) ) <EOL> self . assert_noobj ( Instance , "<STR_LIT>" ) <EOL> def create_compute_scalable ( self ) : <EOL> self . assert_noobj ( Instance , "<STR_LIT>" ) <EOL> self . assert_noobj ( Instance , "<STR_LIT>" ) <EOL> self . assert_noobj ( Instance , "<STR_LIT>" ) <EOL> self . execute ( self . get_base_templates ( ) + <EOL> self . make_compute ( "<STR_LIT>" , "<STR_LIT>" , mem_size = "<STR_LIT>" , <EOL> caps = { "<STR_LIT>" : { "<STR_LIT>" : <NUM_LIT:2> , "<STR_LIT>" : <NUM_LIT:3> , "<STR_LIT>" : <NUM_LIT:2> } } ) ) <EOL> instance0 = self . assert_obj ( Instance , "<STR_LIT>" ) <EOL> instance1 = self . assert_obj ( Instance , "<STR_LIT>" ) <EOL> self . assert_noobj ( Instance , "<STR_LIT>" ) <EOL> def destroy_compute_scalable ( self ) : <EOL> self . assert_noobj ( Instance , "<STR_LIT>" ) <EOL> self . assert_noobj ( Instance , "<STR_LIT>" ) <EOL> self . assert_noobj ( Instance , "<STR_LIT>" ) <EOL> self . execute ( self . get_base_templates ( ) + <EOL> self . make_compute ( "<STR_LIT>" , "<STR_LIT>" , mem_size = "<STR_LIT>" , <EOL> caps = { "<STR_LIT>" : { "<STR_LIT>" : <NUM_LIT:2> , "<STR_LIT>" : <NUM_LIT:3> , "<STR_LIT>" : <NUM_LIT:2> } } ) ) <EOL> instance0 = self . assert_obj ( Instance , "<STR_LIT>" ) <EOL> instance1 = self . assert_obj ( Instance , "<STR_LIT>" ) <EOL> self . destroy ( self . get_base_templates ( ) + <EOL> self . make_compute ( "<STR_LIT>" , "<STR_LIT>" , mem_size = "<STR_LIT>" , <EOL> caps = { "<STR_LIT>" : { "<STR_LIT>" : <NUM_LIT:2> , "<STR_LIT>" : <NUM_LIT:3> , "<STR_LIT>" : <NUM_LIT:2> } } ) ) <EOL> self . assert_noobj ( Instance , "<STR_LIT>" ) <EOL> self . assert_noobj ( Instance , "<STR_LIT>" ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> ComputeTest ( ) </s>
