diff --git a/library/net_infrastructure/arista_l2interface b/library/net_infrastructure/arista_l2interface index fa33aff3bc2..1f36925c485 100644 --- a/library/net_infrastructure/arista_l2interface +++ b/library/net_infrastructure/arista_l2interface @@ -278,7 +278,7 @@ class AristaL2Interface(object): """ (rc, out, err) = self.run_command("netdev l2interface list") collection = json.loads(out) - return collection.get('result').has_key(self.interface_id) + return self.interface_id in collection.get('result') def main():