nicer
[tests.git] / system / TestPlc.py
index c378af6..629986c 100644 (file)
@@ -308,7 +308,7 @@ class TestPlc:
     def host_to_guest(self, command):
         vservername = self.vservername
         personality = self.options.personality
-        raw = "{personality} virsh -c lxc:/// lxc-enter-namespace {vservername}".format(**locals())
+        raw = "{personality} virsh -c lxc:/// lxc-enter-namespace --noseclabel {vservername}".format(**locals())
         # f14 still needs some extra help
         if self.options.fcdistro == 'f14':
             raw +=" -- /usr/bin/env PATH=/bin:/sbin:/usr/bin:/usr/sbin {command}".format(**locals())
@@ -897,7 +897,7 @@ class TestPlc:
     @staticmethod
     def translate_timestamp(start, grain, timestamp):
         if timestamp < TestPlc.YEAR:
-            return start+timestamp*grain
+            return start + timestamp*grain
         else:
             return timestamp
 
@@ -910,7 +910,7 @@ class TestPlc:
         now = int(time.time())
         grain = self.apiserver.GetLeaseGranularity(self.auth_root())
         print('API answered grain=', grain)
-        start = (now/grain)*grain
+        start = (now//grain)*grain
         start += grain
         # find out all nodes that are reservable
         nodes = self.all_reservable_nodenames()
@@ -927,7 +927,7 @@ class TestPlc:
             lease_spec['t_from']  = TestPlc.translate_timestamp(start, grain, lease_spec['t_from'])
             lease_spec['t_until'] = TestPlc.translate_timestamp(start, grain, lease_spec['t_until'])
             lease_addition = self.apiserver.AddLeases(self.auth_root(), nodes, lease_spec['slice'],
-                                                      lease_spec['t_from'],lease_spec['t_until'])
+                                                      lease_spec['t_from'], lease_spec['t_until'])
             if lease_addition['errors']:
                 utils.header("Cannot create leases, {}".format(lease_addition['errors']))
                 ok = False