Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
afourmy committed Apr 29, 2022
2 parents e4daaa2 + d40dd0f commit 7026c7c
Show file tree
Hide file tree
Showing 8 changed files with 347 additions and 344 deletions.
2 changes: 2 additions & 0 deletions eNMS/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,13 +300,15 @@ def configure_associations(self):
ForeignKey(
f"{model1['foreign_key']}.id", **model1.get("kwargs", {})
),
primary_key=True,
),
Column(
model2["column"],
Integer,
ForeignKey(
f"{model2['foreign_key']}.id", **model2.get("kwargs", {})
),
primary_key=True,
),
),
)
Expand Down
3 changes: 2 additions & 1 deletion eNMS/models/services/unix/unix_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def job(self, run, device=None):
return {"success": False, "result": log}
command = run.sub(run.command, locals())
run.log("info", f"Running UNIX command: {command}", device)
return {"command": command, "result": check_output(command.split()).decode()}
result = check_output(command, shell=True).decode()
return {"command": command, "result": result}


class UnixCommandForm(ServiceForm):
Expand Down
2 changes: 1 addition & 1 deletion eNMS/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,7 @@ def match_dictionary(self, result, match, first=True):
pass
pop_key = not copy[k]
else:
pop_key = copy.get(k) == v
pop_key = k in copy and copy[k] == v
copy.pop(k) if pop_key else self.match_dictionary(v, copy, False)
elif isinstance(result, list):
for item in result:
Expand Down
2 changes: 1 addition & 1 deletion files/migrations/examples/network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
longitude: '0.0'
model: ''
name: Subnetwork 2
networks: [Subnetwork and Teleport Mechanism, Subnetwork 1]
networks: [Subnetwork 1, Subnetwork and Teleport Mechanism]
nodes: [Subnetwork 1, Subnetwork 2 - G1, Subnetwork 2 - G2]
pools: [Everything, All Networks]
positions:
Expand Down
20 changes: 10 additions & 10 deletions files/migrations/examples/pool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@
network_name: .*
network_name_invert: false
network_name_match: regex
networks: [Subnetwork and Teleport Mechanism, Import with Add Connected Nodes and
Links, 'Creation, Edit and Deletion', Loopback and Parallel Links, Layout of
Large Graph, Subsubnetwork and Subsubsubnetwork, L3 Network, Subnetwork 2, Top-level
Devices and Links, L2 Network, Subnetwork 1, Large Network Display, Duplicate
me 2, L1 Network, 'Duplication of Devices, Subnetworks and Top-level Networks']
networks: [Subnetwork 2, L3 Network, Large Network Display, Import with Add Connected
Nodes and Links, Subsubnetwork and Subsubsubnetwork, L1 Network, Loopback and
Parallel Links, Duplicate me 2, Layout of Large Graph, 'Duplication of Devices,
Subnetworks and Top-level Networks', Subnetwork and Teleport Mechanism, Top-level
Devices and Links, L2 Network, Subnetwork 1, 'Creation, Edit and Deletion']
property1: CP
service_access_groups: ''
service_access_groups_invert: false
Expand Down Expand Up @@ -3430,11 +3430,11 @@
network_name: .*
network_name_invert: false
network_name_match: regex
networks: [Subnetwork and Teleport Mechanism, Import with Add Connected Nodes and
Links, 'Creation, Edit and Deletion', Loopback and Parallel Links, Layout of
Large Graph, Subsubnetwork and Subsubsubnetwork, L3 Network, Subnetwork 2, Top-level
Devices and Links, L2 Network, Subnetwork 1, Large Network Display, Duplicate
me 2, L1 Network, 'Duplication of Devices, Subnetworks and Top-level Networks']
networks: [Subnetwork 2, L3 Network, Large Network Display, Import with Add Connected
Nodes and Links, Subsubnetwork and Subsubsubnetwork, L1 Network, Loopback and
Parallel Links, Duplicate me 2, Layout of Large Graph, 'Duplication of Devices,
Subnetworks and Top-level Networks', Subnetwork and Teleport Mechanism, Top-level
Devices and Links, L2 Network, Subnetwork 1, 'Creation, Edit and Deletion']
property1: CP
service_access_groups: ''
service_access_groups_invert: false
Expand Down
654 changes: 327 additions & 327 deletions files/migrations/examples/service.yaml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions files/playbooks/arista_show_running_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
vars:
cli:
host: "{{ ip_address }}"
username: "admin"
password: "admin"
username: "{{ username }}"
password: "{{ password }}"
authorize: true
transport: cli

Expand Down
4 changes: 2 additions & 2 deletions files/playbooks/arista_show_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
vars:
cli:
host: "{{ ip_address }}"
username: "admin"
password: "admin"
username: "{{ username }}"
password: "{{ password }}"
authorize: true
transport: cli

Expand Down

0 comments on commit 7026c7c

Please sign in to comment.