Skip to content

Commit

Permalink
Make storage account optional (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
anpaz authored Jun 20, 2020
1 parent 000e8c4 commit a5eb2e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 0 additions & 5 deletions src/quantum/azext_quantum/_validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,3 @@ def validate_workspace_and_target_info(cmd, namespace):
"""
validate_workspace_info(cmd, namespace)
validate_target_info(cmd, namespace)

# For the time being (Private Preview), we also need the AZURE_QUANTUM_STORAGE env variable populated
# with the Azure Storage connection string to use to upload the program.
if 'AZURE_QUANTUM_STORAGE' not in os.environ:
raise ValueError(f"Please set the AZURE_QUANTUM_STORAGE environment variable with an Azure Storage's connection string.")
5 changes: 3 additions & 2 deletions src/quantum/azext_quantum/operations/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ def _generate_submit_args(program_args, ws, target, token, project, job_name, sh
args.append("--output")
args.append("Id")

args.append("--storage")
args.append(os.environ['AZURE_QUANTUM_STORAGE'])
if 'AZURE_QUANTUM_STORAGE' in os.environ:
args.append("--storage")
args.append(os.environ['AZURE_QUANTUM_STORAGE'])

args.append("--aad-token")
args.append(token)
Expand Down

0 comments on commit a5eb2e1

Please sign in to comment.