trying to set up assignment of create operation

This commit is contained in:
2021-01-03 19:17:30 -06:00
parent 42a8e0c886
commit d9c30e1ef8
6 changed files with 86 additions and 17 deletions

View File

@ -64,7 +64,8 @@ class CapsulFlaskHub(VirtualizationInterface):
def generic_operation(self, hosts: List[OnlineHost], payload: str, immediate_mode: bool) -> Tuple[int, List[HTTPResult]]:
operation_id = get_model().create_operation(hosts, payload)
results = current_app.config["HTTP_CLIENT"].make_requests_sync(hosts, payload)
authorization_header = f"Bearer {current_app.config['HUB_TOKEN']}"
results = current_app.config["HTTP_CLIENT"].make_requests_sync(hosts, payload, authorization_header=authorization_header)
for i in range(len(hosts)):
host = hosts[i]
result = results[i]