Esempio n. 1
0
 def reserve_vms(self, slice_urn, reservation, expiration=None):
     resources = list()
     for i in range(0,2):
         r = ResourceMocker()
         r.set_component_id("this_is_a_urn_%d" %i)
         resources.append(r)
     return resources
Esempio n. 2
0
 def get_all_servers(self):
     resources = list()
     for i in range(0,5):
         r = ResourceMocker()
         r.set_component_id("this_is_a_urn_%d" %i)
         resources.append(r)
     return resources
Esempio n. 3
0
 def create_vms(self, urn):
     resources = list()
     for i in range(0,2):
         r = ResourceMocker()
         r.set_component_id("this_is_a_urn_%d" %i)
         r.set_operational_state = "geni_notready"
         resources.append(r)
     return resources
Esempio n. 4
0
 def get_specific_server_and_vms(self, urn):
     resources = list()
     for i in range(0,10):
         r = ResourceMocker()
         r.set_component_id("this_is_a_urn_WITH_SLIVER_%d" %i)
         if i > 5:
             r.set_operational_state("geni_ready")
         else:
             r.set_operational_state("geni_failed")
         resources.append(r)
     return resources    
Esempio n. 5
0
 def get_default_resource_to_reserve(self):
     resource = ResourceMocker()
     resource.set_component_id( "urn:publicid:IDN+ocf:i2cat:vtam+node+Verdaguer")
     return resource
Esempio n. 6
0
 def renew_vms(self, expiration, urn):
     r = ResourceMocker()
     r.set_operational_state("geni_ready")
     return r
Esempio n. 7
0
 def delete_vm(self, urn):
     r = ResourceMocker()
     r.set_operational_state("geni_notready")
     return r
Esempio n. 8
0
 def reboot_vm(self, urn):
     r = ResourceMocker()
     r.set_operational_state("geni_ready")
     return r