Skip to content

Commit

Permalink
Generated from 9f7596678ca7d381fcd4ce9f87101541e0693bcc
Browse files Browse the repository at this point in the history
Merge pull request #1 from AlexanderYukhanov/more

BatchAI. Additional API changes

1. Batch AI will report suffix for stdouterr directory of the start task
2. Batch AI needs application insights resource id to be able to navigate to them in portal
  • Loading branch information
AutorestCI committed Feb 26, 2018
1 parent 01cc96e commit c512b67
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 28 deletions.
4 changes: 2 additions & 2 deletions azure-mgmt-batchai/azure/mgmt/batchai/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from .file_server_reference import FileServerReference
from .unmanaged_file_system_reference import UnmanagedFileSystemReference
from .mount_volumes import MountVolumes
from .app_insights_destination import AppInsightsDestination
from .app_insights_reference import AppInsightsReference
from .performance_counters_settings import PerformanceCountersSettings
from .node_setup import NodeSetup
from .node_state_counts import NodeStateCounts
Expand Down Expand Up @@ -121,7 +121,7 @@
'FileServerReference',
'UnmanagedFileSystemReference',
'MountVolumes',
'AppInsightsDestination',
'AppInsightsReference',
'PerformanceCountersSettings',
'NodeSetup',
'NodeStateCounts',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,37 @@
from msrest.serialization import Model


class AppInsightsDestination(Model):
"""AppInsightsDestination.
class AppInsightsReference(Model):
"""Specifies Azure Application Insights information for performance counters
reporting.
:param instrumentation_key: Value of the App Insight instrumentation key.
:param component: Specifies the Azure Application Insights component
resource id.
:type component: ~azure.mgmt.batchai.models.ResourceId
:param instrumentation_key: Value of the Azure Application Insights
instrumentation key.
:type instrumentation_key: str
:param instrumentation_key_secret_reference: Specifies a KeyVault Secret
containing Application Insights instrumentation key. Specifies KeyVault
Store and Secret which contains Application Insights instrumentation key.
One of instumentationKey or instrumentationKeySecretReference must be
specified.
containing Azure Application Insights instrumentation key. Specifies
KeyVault Store and Secret which contains Azure Application Insights
instrumentation key. One of instumentationKey or
instrumentationKeySecretReference must be specified.
:type instrumentation_key_secret_reference:
~azure.mgmt.batchai.models.KeyVaultSecretReference
"""

_validation = {
'component': {'required': True},
}

_attribute_map = {
'component': {'key': 'component', 'type': 'ResourceId'},
'instrumentation_key': {'key': 'instrumentationKey', 'type': 'str'},
'instrumentation_key_secret_reference': {'key': 'instrumentationKeySecretReference', 'type': 'KeyVaultSecretReference'},
}

def __init__(self, instrumentation_key=None, instrumentation_key_secret_reference=None):
super(AppInsightsDestination, self).__init__()
def __init__(self, component, instrumentation_key=None, instrumentation_key_secret_reference=None):
super(AppInsightsReference, self).__init__()
self.component = component
self.instrumentation_key = instrumentation_key
self.instrumentation_key_secret_reference = instrumentation_key_secret_reference
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class FileServerCreateParameters(Model):
information about available VM sizes for fileservers from the Virtual
Machines Marketplace, see Sizes for Virtual Machines (Linux).
:type vm_size: str
:param ssh_configuration: SSH settings for the file server.
:param ssh_configuration: SSH configuration for the file server.
:type ssh_configuration: ~azure.mgmt.batchai.models.SshConfiguration
:param data_disks: Settings for the data disk which would be created for
the file server.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,24 @@


class PerformanceCountersSettings(Model):
"""PerformanceCountersSettings.
"""Performance counters reporting settings.
:param app_insights_destination: Specifies Azure Application Insights
instrumentation key for performance counters reporting. If provided, Batch
AI will upload node performance counters to the corresponding Application
:param app_insights_reference: Specifies Azure Application Insights
information for performance counters reporting. If provided, Batch AI will
upload node performance counters to the corresponding Azure Application
Insights account.
:type app_insights_destination:
~azure.mgmt.batchai.models.AppInsightsDestination
:type app_insights_reference:
~azure.mgmt.batchai.models.AppInsightsReference
"""

_validation = {
'app_insights_reference': {'required': True},
}

_attribute_map = {
'app_insights_destination': {'key': 'appInsightsDestination', 'type': 'AppInsightsDestination'},
'app_insights_reference': {'key': 'appInsightsReference', 'type': 'AppInsightsReference'},
}

def __init__(self, app_insights_destination=None):
def __init__(self, app_insights_reference):
super(PerformanceCountersSettings, self).__init__()
self.app_insights_destination = app_insights_destination
self.app_insights_reference = app_insights_reference
23 changes: 19 additions & 4 deletions azure-mgmt-batchai/azure/mgmt/batchai/models/setup_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class SetupTask(Model):
"""Specifies a setup task which can be used to customize the compute nodes of
the cluster.
Variables are only populated by the server, and will be ignored when
sending a request.
:param command_line: Command Line to start Setup process.
:type command_line: str
:param environment_variables: Collection of environment variables to be
Expand All @@ -27,17 +30,27 @@ class SetupTask(Model):
back.
:type secrets:
list[~azure.mgmt.batchai.models.EnvironmentVariableWithSecretValue]
:param run_elevated: Specifies whether to run the setup task in elevated
mode. The default value is false. Default value: False .
:param run_elevated: Specifies whether to run the setup task under root
account. The default value is false. Note. Non-elevated tasks are run
under an account added into sudoer list and can perform sudo when
required. Default value: False .
:type run_elevated: bool
:param std_out_err_path_prefix: The path where the Batch AI service will
upload the stdout and stderror of setup task.
:param std_out_err_path_prefix: The prefix of a path where the Batch AI
service will upload the stdout and stderr of the setup task.
:type std_out_err_path_prefix: str
:ivar std_out_err_path_suffix: A path segment appended by Batch AI to
stdOutErrPathPrefix to form a path where stdout and stderr of the setup
task will be uploaded. Batch AI creates the setup task output directories
under an unique path to avoid conflicts between different clusters. You
can concatinate stdOutErrPathPrefix and stdOutErrPathSuffix to get the
full path to the output directory.
:vartype std_out_err_path_suffix: str
"""

_validation = {
'command_line': {'required': True},
'std_out_err_path_prefix': {'required': True},
'std_out_err_path_suffix': {'readonly': True},
}

_attribute_map = {
Expand All @@ -46,6 +59,7 @@ class SetupTask(Model):
'secrets': {'key': 'secrets', 'type': '[EnvironmentVariableWithSecretValue]'},
'run_elevated': {'key': 'runElevated', 'type': 'bool'},
'std_out_err_path_prefix': {'key': 'stdOutErrPathPrefix', 'type': 'str'},
'std_out_err_path_suffix': {'key': 'stdOutErrPathSuffix', 'type': 'str'},
}

def __init__(self, command_line, std_out_err_path_prefix, environment_variables=None, secrets=None, run_elevated=False):
Expand All @@ -55,3 +69,4 @@ def __init__(self, command_line, std_out_err_path_prefix, environment_variables=
self.secrets = secrets
self.run_elevated = run_elevated
self.std_out_err_path_prefix = std_out_err_path_prefix
self.std_out_err_path_suffix = None
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ class SshConfiguration(Model):
"""SSH configuration settings for the VM.
:param public_ips_to_allow: List of source IP ranges to allow SSH
connection to VM. Default value is '*' can be used to match all source
IPs. Maximum number of publicIPs that can be specified are 400.
connection to a node. Default value is '*' can be used to match all source
IPs. Maximum number of IP ranges that can be specified are 400.
:type public_ips_to_allow: list[str]
:param user_account_settings: Settings for user account of VMs.
:param user_account_settings: Settings for user account to be created on a
node.
:type user_account_settings:
~azure.mgmt.batchai.models.UserAccountSettings
"""
Expand Down

0 comments on commit c512b67

Please sign in to comment.