This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 5060785988 Add network_profile param in 
AzureContainerInstancesOperator (#26117)
5060785988 is described below

commit 5060785988f69d01ee2513b1e3bba73fbbc0f310
Author: Pankaj Singh <[email protected]>
AuthorDate: Fri Sep 9 08:20:26 2022 +0530

    Add network_profile param in AzureContainerInstancesOperator (#26117)
---
 airflow/providers/microsoft/azure/operators/container_instances.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/airflow/providers/microsoft/azure/operators/container_instances.py 
b/airflow/providers/microsoft/azure/operators/container_instances.py
index 2a33f89fd5..3ecf0edaac 100644
--- a/airflow/providers/microsoft/azure/operators/container_instances.py
+++ b/airflow/providers/microsoft/azure/operators/container_instances.py
@@ -24,6 +24,7 @@ from typing import TYPE_CHECKING, Any, Dict, List, Optional, 
Sequence, Union
 from azure.mgmt.containerinstance.models import (
     Container,
     ContainerGroup,
+    ContainerGroupNetworkProfile,
     ContainerPort,
     EnvironmentVariable,
     IpAddress,
@@ -88,6 +89,7 @@ class AzureContainerInstancesOperator(BaseOperator):
     :param restart_policy: Restart policy for all containers within the 
container group.
         Possible values include: 'Always', 'OnFailure', 'Never'
     :param ip_address: The IP address type of the container group.
+    :param network_profile: The network profile information for a container 
group.
 
     **Example**::
 
@@ -142,6 +144,7 @@ class AzureContainerInstancesOperator(BaseOperator):
         restart_policy: str = 'Never',
         ip_address: Optional[IpAddress] = None,
         ports: Optional[List[ContainerPort]] = None,
+        network_profile: Optional[ContainerGroupNetworkProfile] = None,
         **kwargs,
     ) -> None:
         super().__init__(**kwargs)
@@ -179,6 +182,7 @@ class AzureContainerInstancesOperator(BaseOperator):
             )
         self.ip_address = ip_address
         self.ports = ports
+        self.network_profile = network_profile
 
     def execute(self, context: "Context") -> int:
         # Check name again in case it was templated.
@@ -251,6 +255,7 @@ class AzureContainerInstancesOperator(BaseOperator):
                 os_type=self.os_type,
                 tags=self.tags,
                 ip_address=self.ip_address,
+                network_profile=self.network_profile,
             )
 
             self._ci_hook.create_or_update(self.resource_group, self.name, 
container_group)

Reply via email to