Skip to content

Commit

Permalink
Initial Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
glennsarti committed Nov 6, 2017
0 parents commit 92d842a
Show file tree
Hide file tree
Showing 6 changed files with 566 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto

# Declare files that will always have LF line endings on checkout.
*.ps1 text eol=lf
*.psm1 text eol=lf
*.psd1 text eol=lf
*.ps1xml text eol=lf

*.xaml text eol=lf
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tmp/
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2017 Glenn Sarti

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
212 changes: 212 additions & 0 deletions PuppetPSDrive.Format.ps1xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,212 @@
<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
<Controls>
<Control>
<Name>PuppetPSDriveFormatControl</Name>
<CustomControl>
<CustomEntries>
<CustomEntry>
<CustomItem>
<Frame>
<LeftIndent>4</LeftIndent>
<CustomItem>
<Text>Directory: </Text>
<ExpressionBinding>
<ScriptBlock>$drv = $_.PSDRIVE; $_.PSPARENTPATH -replace ".*#" -replace "^.[^\\/]*","${drv}:"</ScriptBlock>
</ExpressionBinding>
<NewLine/>
</CustomItem>
</Frame>
</CustomItem>
</CustomEntry>
</CustomEntries>
</CustomControl>
</Control>
</Controls>

<ViewDefinitions>
<!-- Default Views -->
<View>
<Name>PuppetPSDriveDefaultTableView</Name>
<ViewSelectedBy>
<TypeName>PuppetConsole</TypeName>
<TypeName>PuppetConsoleServiceStatusCollection</TypeName>
</ViewSelectedBy>
<GroupBy>
<PropertyName>PSParentPath</PropertyName>
<CustomControlName>PuppetPSDriveFormatControl</CustomControlName>
</GroupBy>
<TableControl>
<AutoSize/>
<TableHeaders>
<TableColumnHeader><Label>Mode</Label></TableColumnHeader>
<TableColumnHeader><Label>Name</Label></TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<Wrap/>
<TableColumnItems>
<TableColumnItem><PropertyName>SSItemMode</PropertyName></TableColumnItem>
<TableColumnItem><PropertyName>Name</PropertyName></TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>PuppetPSDriveDefaultListView</Name>
<ViewSelectedBy>
<TypeName>PuppetConsole</TypeName>
<TypeName>PuppetConsoleServiceStatusCollection</TypeName>
</ViewSelectedBy>
<GroupBy>
<PropertyName>PSParentPath</PropertyName>
<CustomControlName>PuppetPSDriveFormatControl</CustomControlName>
</GroupBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<PropertyName>Name</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>

<!-- Status Item Views -->
<View>
<Name>PuppetPSDriveServiceStatusItemTableView</Name>
<ViewSelectedBy>
<TypeName>PuppetConsoleServiceStatusItem</TypeName>
</ViewSelectedBy>
<GroupBy>
<PropertyName>PSParentPath</PropertyName>
<CustomControlName>PuppetPSDriveFormatControl</CustomControlName>
</GroupBy>
<TableControl>
<AutoSize/>
<TableHeaders>
<TableColumnHeader><Label>DisplayName</Label></TableColumnHeader>
<TableColumnHeader><Label>Status</Label></TableColumnHeader>
<TableColumnHeader><Label>ServiceVersion</Label></TableColumnHeader>
<TableColumnHeader><Label>Url</Label></TableColumnHeader>
<TableColumnHeader><Label>Timestamp</Label></TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<Wrap/>
<TableColumnItems>
<TableColumnItem><PropertyName>DisplayName</PropertyName></TableColumnItem>
<TableColumnItem><PropertyName>Status</PropertyName></TableColumnItem>
<TableColumnItem><PropertyName>ServiceVersion</PropertyName></TableColumnItem>
<TableColumnItem><PropertyName>Url</PropertyName></TableColumnItem>
<TableColumnItem><PropertyName>Timestamp</PropertyName></TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>PuppetPSDriveServiceStatusItemListView</Name>
<ViewSelectedBy>
<TypeName>PuppetConsoleServiceStatusItem</TypeName>
</ViewSelectedBy>
<GroupBy>
<PropertyName>PSParentPath</PropertyName>
<CustomControlName>PuppetPSDriveFormatControl</CustomControlName>
</GroupBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<PropertyName>DisplayName</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Status</PropertyName>
</ListItem>
<ListItem>
<PropertyName>ServiceVersion</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Url</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Timestamp</PropertyName>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>

<!-- Node Group Views -->
<View>
<Name>PuppetPSDriveDefaultTableView</Name>
<ViewSelectedBy>
<TypeName>PuppetConsoleNodeGroup</TypeName>
</ViewSelectedBy>
<GroupBy>
<PropertyName>PSParentPath</PropertyName>
<CustomControlName>PuppetPSDriveFormatControl</CustomControlName>
</GroupBy>
<TableControl>
<AutoSize/>
<TableHeaders>
<TableColumnHeader><Label>Name</Label></TableColumnHeader>
<TableColumnHeader><Label>Description</Label></TableColumnHeader>
<TableColumnHeader><Label>Environment</Label></TableColumnHeader>
<TableColumnHeader><Label>Node Group Path</Label></TableColumnHeader>
</TableHeaders>
<TableRowEntries>
<TableRowEntry>
<Wrap/>
<TableColumnItems>
<TableColumnItem><PropertyName>Name</PropertyName></TableColumnItem>
<TableColumnItem><PropertyName>Description</PropertyName></TableColumnItem>
<TableColumnItem><PropertyName>Environment</PropertyName></TableColumnItem>
<TableColumnItem>
<ScriptBlock>$_.PSPATH -replace ".*#" -replace "^.[^\\/]*" -replace "^\\Classification\\"</ScriptBlock>
</TableColumnItem>
</TableColumnItems>
</TableRowEntry>
</TableRowEntries>
</TableControl>
</View>
<View>
<Name>PuppetPSDriveServiceStatusItemListView</Name>
<ViewSelectedBy>
<TypeName>PuppetConsoleNodeGroup</TypeName>
</ViewSelectedBy>
<GroupBy>
<PropertyName>PSParentPath</PropertyName>
<CustomControlName>PuppetPSDriveFormatControl</CustomControlName>
</GroupBy>
<ListControl>
<ListEntries>
<ListEntry>
<ListItems>
<ListItem>
<PropertyName>Name</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Description</PropertyName>
</ListItem>
<ListItem>
<PropertyName>Environment</PropertyName>
</ListItem>
<ListItem>
<Label>Node Group Path</Label>
<ScriptBlock>$_.PSPATH -replace ".*#" -replace "^.[^\\/]*" -replace "^\\Classification\\"</ScriptBlock>
</ListItem>
</ListItems>
</ListEntry>
</ListEntries>
</ListControl>
</View>

</ViewDefinitions>
</Configuration>
117 changes: 117 additions & 0 deletions PuppetPSDrive.psd1
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#
# Module manifest for module 'PuppetPSDrive'
#

@{

# Script module or binary module file associated with this manifest.
RootModule = '.\PuppetPSDrive.psm1'

# Version number of this module.
ModuleVersion = '0.0.1'

# Supported PSEditions
# CompatiblePSEditions = @()

# ID used to uniquely identify this module
GUID = 'ba347d1b-8129-4a15-a65c-3b82e2da2ab4'

# Author of this module
Author = 'Glenn Sarti'

# Company or vendor of this module
CompanyName = 'Glenn Sarti'

# Copyright statement for this module
Copyright = ''

# Description of the functionality provided by this module
Description = 'Puppet PowerShell Provider is a SHiPS based PowerShell provider to simplify navigation and discovery of Puppet Console items'

# Minimum version of the Windows PowerShell engine required by this module
# PowerShellVersion = ''

# Name of the Windows PowerShell host required by this module
# PowerShellHostName = ''

# Minimum version of the Windows PowerShell host required by this module
# PowerShellHostVersion = ''

# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# DotNetFrameworkVersion = ''

# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
# CLRVersion = ''

# Processor architecture (None, X86, Amd64) required by this module
# ProcessorArchitecture = ''

# Modules that must be imported into the global environment prior to importing this module
RequiredModules = @('SHiPS')

# Assemblies that must be loaded prior to importing this module
# RequiredAssemblies = @()

# Script files (.ps1) that are run in the caller's environment prior to importing this module.
# ScriptsToProcess = @()

# Type files (.ps1xml) to be loaded when importing this module
# TypesToProcess = @()

# Format files (.ps1xml) to be loaded when importing this module
FormatsToProcess = @('PuppetPSDrive.Format.ps1xml')

# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
# NestedModules = @()

# 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.
FunctionsToExport = @()

# 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.
CmdletsToExport = @()

# Variables to export from this module
VariablesToExport = @()

# 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.
AliasesToExport = @()

# DSC resources to export from this module
# DscResourcesToExport = @()

# List of all modules packaged with this module
# ModuleList = @()

# List of all files packaged with this module
# FileList = @()

# 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.
PrivateData = @{

PSData = @{

# Tags applied to this module. These help with module discovery in online galleries.
Tags = 'Puppet', 'SHiPS', 'PuppetCsonole'

# A URL to the license for this module.
LicenseUri = 'https://github.com/glennsarti/PuppetPSDrive/blob/master/LICENSE'

# A URL to the main website for this project.
ProjectUri = 'https://github.com/glennsarti/PuppetPSDrive.git'

# A URL to an icon representing this module.
# IconUri = ''

# ReleaseNotes of this module
ReleaseNotes = ''

} # End of PSData hashtable

} # End of PrivateData hashtable

# HelpInfo URI of this module
# HelpInfoURI = ''

# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
# DefaultCommandPrefix = ''
}
Loading

0 comments on commit 92d842a

Please sign in to comment.