Repository: iterative/dvc

Issue:
azure: support external dependencies and outputs
As the title says, we currently do not support external dependencies and outputs from azure. So, 
`dvc import-url` and friends don't work.

#### Implementation
It should be trivial to implement.  `dvc` uses etag to ensure that it's same file. So, just need to implement following methods in [dvc/remote/azure.py](https://github.com/iterative/dvc/blob/master/dvc/remote/azure.py) similar to one in [dvc/remote/s3.py](https://github.com/iterative/dvc/blob/master/dvc/remote/s3.py):

https://github.com/iterative/dvc/blob/a1fe6c6f44777463876ad24ee0d162173999f9d3/dvc/remote/s3.py#L78-L79

> From Ruslan's reply on Discord: https://discordapp.com/channels/485586884165107732/485596304961962003/691327678271193160


Then:
- Implement a `DependencyAzure` and `OutputAzure` classes. Refer [DependencyS3](https://github.com/iterative/dvc/blob/master/dvc/dependency/s3.py) and [OutputS3](https://github.com/iterative/dvc/blob/master/dvc/output/s3.py) for the example.

- Add `OutputAzure` on [OUTS](https://github.com/iterative/dvc/blob/02f92b3ac85532d24ae94727a6071376dbf35452/dvc/output/__init__.py#L16), [OUTS_MAP](https://github.com/iterative/dvc/blob/02f92b3ac85532d24ae94727a6071376dbf35452/dvc/output/__init__.py#L24) and [CHECKSUMS_SCHEMA](https://github.com/iterative/dvc/blob/02f92b3ac85532d24ae94727a6071376dbf35452/dvc/output/__init__.py#L46) on [dvc/output/__init__.py](https://github.com/iterative/dvc/blob/master/dvc/output/__init__.py)

- Also `DependencyAzure` needs to be added on [DEPS](https://github.com/iterative/dvc/blob/02f92b3ac85532d24ae94727a6071376dbf35452/dvc/dependency/__init__.py#L19) and [DEPS_MAP](https://github.com/iterative/dvc/blob/02f92b3ac85532d24ae94727a6071376dbf35452/dvc/dependency/__init__.py#L29) on [dvc/dependency/__init__.py](https://github.com/iterative/dvc/blob/master/dvc/dependency/__init__.py).

P.S. I could be missing a few things though. :( 

#### Discord Context https://discordapp.com/channels/485586884165107732/485596304961962003/691283402413834290




Discussion:

Resolving patch:
diff --git a/dvc/dependency/__init__.py b/dvc/dependency/__init__.py
--- a/dvc/dependency/__init__.py
+++ b/dvc/dependency/__init__.py
@@ -2,6 +2,7 @@
 from urllib.parse import urlparse
 
 import dvc.output as output
+from dvc.dependency.azure import AzureDependency
 from dvc.dependency.gs import GSDependency
 from dvc.dependency.hdfs import HDFSDependency
 from dvc.dependency.http import HTTPDependency
@@ -17,6 +18,7 @@
 from .repo import RepoDependency
 
 DEPS = [
+    AzureDependency,
     GSDependency,
     HDFSDependency,
     HTTPDependency,
@@ -30,6 +32,7 @@
     Schemes.LOCAL: LocalDependency,
     Schemes.SSH: SSHDependency,
     Schemes.S3: S3Dependency,
+    Schemes.AZURE: AzureDependency,
     Schemes.GS: GSDependency,
     Schemes.HDFS: HDFSDependency,
     Schemes.HTTP: HTTPDependency,
diff --git a/dvc/dependency/azure.py b/dvc/dependency/azure.py
new file mode 100644
--- /dev/null
+++ b/dvc/dependency/azure.py
@@ -0,0 +1,7 @@
+from dvc.dependency.base import BaseDependency
+from dvc.output.base import BaseOutput
+from dvc.remote.azure import AzureRemote
+
+
+class AzureDependency(BaseDependency, BaseOutput):
+    REMOTE = AzureRemote
diff --git a/dvc/remote/azure.py b/dvc/remote/azure.py
--- a/dvc/remote/azure.py
+++ b/dvc/remote/azure.py
@@ -29,10 +29,8 @@ def __init__(self, repo, config):
         self.path_info = self.path_cls(url)
 
         if not self.path_info.bucket:
-            self.path_info = self.path_cls.from_parts(
-                scheme=self.scheme,
-                netloc=os.getenv("AZURE_STORAGE_CONTAINER_NAME"),
-            )
+            container = os.getenv("AZURE_STORAGE_CONTAINER_NAME")
+            self.path_info = self.path_cls(f"azure://{container}")
 
         self.connection_string = config.get("connection_string") or os.getenv(
             "AZURE_STORAGE_CONNECTION_STRING"
@@ -58,6 +56,15 @@ def blob_service(self):
             blob_service.create_container(self.path_info.bucket)
         return blob_service
 
+    def get_etag(self, path_info):
+        etag = self.blob_service.get_blob_properties(
+            path_info.bucket, path_info.path
+        ).properties.etag
+        return etag.strip('"')
+
+    def get_file_checksum(self, path_info):
+        return self.get_etag(path_info)
+
     def remove(self, path_info):
         if path_info.scheme != self.scheme:
             raise NotImplementedError


Test patch:
diff --git a/tests/unit/dependency/test_azure.py b/tests/unit/dependency/test_azure.py
new file mode 100644
--- /dev/null
+++ b/tests/unit/dependency/test_azure.py
@@ -0,0 +1,7 @@
+from dvc.dependency.azure import AzureDependency
+from tests.unit.dependency.test_local import TestLocalDependency
+
+
+class TestAzureDependency(TestLocalDependency):
+    def _get_cls(self):
+        return AzureDependency