Merge branch 'master' into cleanup/codacy-cleanup
This commit is contained in:
commit
a7bc7500fb
7 changed files with 53 additions and 63 deletions
|
@ -583,7 +583,8 @@ class EmuSession(Session):
|
|||
x, y, _ = self.location.getxyz(lat, lon, alt)
|
||||
|
||||
# set position and broadcast
|
||||
node.setposition(x, y, None)
|
||||
if None not in [x, y]:
|
||||
node.setposition(x, y, None)
|
||||
|
||||
# broadcast updated location when using lat/lon/alt
|
||||
if using_lat_lon_alt:
|
||||
|
|
|
@ -228,8 +228,8 @@ UseDNS no
|
|||
class DhcpService(UtilService):
|
||||
name = "DHCP"
|
||||
configs = ("/etc/dhcp/dhcpd.conf",)
|
||||
dirs = ("/etc/dhcp",)
|
||||
startup = ("dhcpd",)
|
||||
dirs = ("/etc/dhcp","/var/lib/dhcp")
|
||||
startup = ("touch /var/lib/dhcp/dhcpd.leases","dhcpd")
|
||||
shutdown = ("killall dhcpd",)
|
||||
validate = ("pidof dhcpd",)
|
||||
|
||||
|
|
|
@ -377,8 +377,6 @@ class CoreXmlWriter(object):
|
|||
|
||||
links = []
|
||||
for node in self.session.objects.itervalues():
|
||||
logger.info("writer adding node(%s)", node.name)
|
||||
|
||||
# network node
|
||||
if isinstance(node, coreobj.PyCoreNet) and not nodeutils.is_node(node, NodeTypes.CONTROL_NET):
|
||||
self.write_network(node)
|
||||
|
|
|
@ -87,13 +87,11 @@ class CoreXmlDeployment(object):
|
|||
|
||||
def find_device(self, name):
|
||||
device = self.scenario.find("devices/device[@name='%s']" % name)
|
||||
logger.info("specific found scenario device: %s", device)
|
||||
return device
|
||||
|
||||
def find_interface(self, device, name):
|
||||
interface = self.scenario.find("devices/device[@name='%s']/interfaces/interface[@name='%s']" % (
|
||||
device.name, name))
|
||||
logger.info("specific found scenario interface: %s", interface)
|
||||
return interface
|
||||
|
||||
def add_deployment(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue