Skip to content

Commit 135b519

Browse files
Migrate NetworkFunction from generation to main (#24582)
* Move NetworkFunction to main * Update ChangeLog.md --------- Co-authored-by: NanxiangLiu <33285578+Nickcandy@users.noreply.github.com>
1 parent 1862a9a commit 135b519

File tree

96 files changed

+3890
-656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+3890
-656
lines changed
Lines changed: 21 additions & 138 deletions
Original file line numberDiff line numberDiff line change
@@ -1,141 +1,24 @@
1-
#
2-
# Module manifest for module 'Az.NetworkFunction'
3-
#
4-
# Generated by: Microsoft Corporation
5-
#
6-
# Generated on: 6/1/2023
7-
#
8-
91
@{
10-
11-
# Script module or binary module file associated with this manifest.
12-
RootModule = './Az.NetworkFunction.psm1'
13-
14-
# Version number of this module.
15-
ModuleVersion = '0.1.2'
16-
17-
# Supported PSEditions
18-
CompatiblePSEditions = 'Core', 'Desktop'
19-
20-
# ID used to uniquely identify this module
21-
GUID = '1d339b1c-5a86-4fbd-9a2e-d0497c39b397'
22-
23-
# Author of this module
24-
Author = 'Microsoft Corporation'
25-
26-
# Company or vendor of this module
27-
CompanyName = 'Microsoft Corporation'
28-
29-
# Copyright statement for this module
30-
Copyright = 'Microsoft Corporation. All rights reserved.'
31-
32-
# Description of the functionality provided by this module
33-
Description = 'Microsoft Azure PowerShell: NetworkFunction cmdlets'
34-
35-
# Minimum version of the PowerShell engine required by this module
36-
PowerShellVersion = '5.1'
37-
38-
# Name of the PowerShell host required by this module
39-
# PowerShellHostName = ''
40-
41-
# Minimum version of the PowerShell host required by this module
42-
# PowerShellHostVersion = ''
43-
44-
# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
45-
DotNetFrameworkVersion = '4.7.2'
46-
47-
# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
48-
# ClrVersion = ''
49-
50-
# Processor architecture (None, X86, Amd64) required by this module
51-
# ProcessorArchitecture = ''
52-
53-
# Modules that must be imported into the global environment prior to importing this module
54-
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.10.3'; })
55-
56-
# Assemblies that must be loaded prior to importing this module
57-
RequiredAssemblies = './bin/Az.NetworkFunction.private.dll'
58-
59-
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
60-
# ScriptsToProcess = @()
61-
62-
# Type files (.ps1xml) to be loaded when importing this module
63-
# TypesToProcess = @()
64-
65-
# Format files (.ps1xml) to be loaded when importing this module
66-
FormatsToProcess = './Az.NetworkFunction.format.ps1xml'
67-
68-
# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
69-
# NestedModules = @()
70-
71-
# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
72-
FunctionsToExport = 'Get-AzNetworkFunctionCollectorPolicy',
73-
'Get-AzNetworkFunctionTrafficCollector',
74-
'New-AzNetworkFunctionCollectorPolicy',
75-
'New-AzNetworkFunctionTrafficCollector',
76-
'Remove-AzNetworkFunctionCollectorPolicy',
77-
'Remove-AzNetworkFunctionTrafficCollector',
78-
'Update-AzNetworkFunctionCollectorPolicy',
79-
'Update-AzNetworkFunctionCollectorPolicyTag',
80-
'Update-AzNetworkFunctionTrafficCollector',
81-
'Update-AzNetworkFunctionTrafficCollectorTag'
82-
83-
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
84-
CmdletsToExport = @()
85-
86-
# Variables to export from this module
87-
# VariablesToExport = @()
88-
89-
# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
90-
AliasesToExport = '*'
91-
92-
# DSC resources to export from this module
93-
# DscResourcesToExport = @()
94-
95-
# List of all modules packaged with this module
96-
# ModuleList = @()
97-
98-
# List of all files packaged with this module
99-
# FileList = @()
100-
101-
# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
102-
PrivateData = @{
103-
2+
GUID = '1d339b1c-5a86-4fbd-9a2e-d0497c39b397'
3+
RootModule = './Az.NetworkFunction.psm1'
4+
ModuleVersion = '0.1.0'
5+
CompatiblePSEditions = 'Core', 'Desktop'
6+
Author = 'Microsoft Corporation'
7+
CompanyName = 'Microsoft Corporation'
8+
Copyright = 'Microsoft Corporation. All rights reserved.'
9+
Description = 'Microsoft Azure PowerShell: NetworkFunction cmdlets'
10+
PowerShellVersion = '5.1'
11+
DotNetFrameworkVersion = '4.7.2'
12+
RequiredAssemblies = './bin/Az.NetworkFunction.private.dll'
13+
FormatsToProcess = './Az.NetworkFunction.format.ps1xml'
14+
FunctionsToExport = 'Get-AzNetworkFunctionCollectorPolicy', 'Get-AzNetworkFunctionTrafficCollector', 'New-AzNetworkFunctionCollectorPolicy', 'New-AzNetworkFunctionTrafficCollector', 'Remove-AzNetworkFunctionCollectorPolicy', 'Remove-AzNetworkFunctionTrafficCollector', 'Update-AzNetworkFunctionCollectorPolicy', 'Update-AzNetworkFunctionCollectorPolicyTag', 'Update-AzNetworkFunctionTrafficCollector', 'Update-AzNetworkFunctionTrafficCollectorTag', '*'
15+
AliasesToExport = '*'
16+
PrivateData = @{
10417
PSData = @{
105-
106-
# Tags applied to this module. These help with module discovery in online galleries.
107-
Tags = 'Azure','ResourceManager','ARM','PSModule','NetworkFunction'
108-
109-
# A URL to the license for this module.
110-
LicenseUri = 'https://aka.ms/azps-license'
111-
112-
# A URL to the main website for this project.
113-
ProjectUri = 'https://github.com/Azure/azure-powershell'
114-
115-
# A URL to an icon representing this module.
116-
# IconUri = ''
117-
118-
# ReleaseNotes of this module
119-
# ReleaseNotes = ''
120-
121-
# Prerelease string of this module
122-
# Prerelease = ''
123-
124-
# Flag to indicate whether the module requires explicit user acceptance for install/update/save
125-
# RequireLicenseAcceptance = $false
126-
127-
# External dependent modules of this module
128-
# ExternalModuleDependencies = @()
129-
130-
} # End of PSData hashtable
131-
132-
} # End of PrivateData hashtable
133-
134-
# HelpInfo URI of this module
135-
# HelpInfoURI = ''
136-
137-
# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
138-
# DefaultCommandPrefix = ''
139-
18+
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'NetworkFunction'
19+
LicenseUri = 'https://aka.ms/azps-license'
20+
ProjectUri = 'https://github.com/Azure/azure-powershell'
21+
ReleaseNotes = ''
22+
}
23+
}
14024
}
141-

src/NetworkFunction/NetworkFunction.Autorest/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
This directory contains the PowerShell module for the NetworkFunction service.
44

55
---
6-
76
## Info
87
- Modifiable: yes
98
- Generated: all
@@ -28,9 +27,9 @@ For information on how to develop for `Az.NetworkFunction`, see [how-to.md](how-
2827
> see https://aka.ms/autorest
2928
3029
``` yaml
31-
branch: 5ef93469c04983e472e57ca227fc5159d13a172a
30+
commit: 5ef93469c04983e472e57ca227fc5159d13a172a
3231
require:
33-
- $(this-folder)/../readme.azure.noprofile.md
32+
- $(this-folder)/../../readme.azure.noprofile.md
3433
input-file:
3534
- $(repo)/specification/networkfunction/resource-manager/Microsoft.NetworkFunction/stable/2022-11-01/AzureTrafficCollector.json
3635
module-version: 0.1.0
@@ -40,6 +39,10 @@ identity-correction-for-post: true
4039
resourcegroup-append: true
4140
nested-object-to-string: true
4241

42+
# For new modules, please avoid setting 3.x using the use-extension method and instead, use 4.x as the default option
43+
use-extension:
44+
"@autorest/powershell": "3.x"
45+
4346
directive:
4447
- where:
4548
subject: ^AzureTrafficCollector(.*)
@@ -57,4 +60,8 @@ directive:
5760
- where:
5861
verb: Set
5962
hide: true
63+
- where:
64+
verb: New
65+
subject: ^CollectorPolicy(.*)
66+
hide: true
6067
```

src/NetworkFunction/NetworkFunction.Autorest/build-module.ps1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ if($NoDocs) {
143143
$null = Get-ChildItem -Path $docsFolder -Recurse -Exclude 'README.md' | Remove-Item -Recurse -ErrorAction SilentlyContinue
144144
}
145145
$null = New-Item -ItemType Directory -Force -Path $docsFolder
146-
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid
146+
$addComplexInterfaceInfo = ![System.Convert]::ToBoolean('true')
147+
Export-ProxyCmdlet -ModuleName $moduleName -ModulePath $modulePaths -ExportsFolder $exportsFolder -InternalFolder $internalFolder -ModuleDescription $moduleDescription -DocsFolder $docsFolder -ExamplesFolder $examplesFolder -ModuleGuid $guid -AddComplexInterfaceInfo:$addComplexInterfaceInfo
147148
}
148149

149150
Write-Host -ForegroundColor Green 'Creating format.ps1xml...'
@@ -162,4 +163,10 @@ Export-TestStub -ModuleName $moduleName -ExportsFolder $exportsFolder -OutputFol
162163
Write-Host -ForegroundColor Green 'Creating example stubs...'
163164
Export-ExampleStub -ExportsFolder $exportsFolder -OutputFolder $examplesFolder
164165

166+
if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1'))
167+
{
168+
Write-Host -ForegroundColor Green 'Creating ux metadata...'
169+
. (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')
170+
}
171+
165172
Write-Host -ForegroundColor Green '-------------Done-------------'

0 commit comments

Comments
 (0)