Building cmdlets for a REST API with PowerShell classes, Azure-based ... by Jeremy Murrah

Channel:
Subscribers:
42,400
Published on ● Video Link: https://www.youtube.com/watch?v=keKJbJ2Bliw



Duration: 1:37:54
37 views
0


Building cmdlets for a REST API with PowerShell classes, Azure-based Integration tests and Continuous Deployment by Jeremy Murrah

This talk will cover a project to write a set of cmdlets for an Infoblox dns appliance. Code is split between cmdlets for the interface and parameter validation, and classes for modeling all the REST calls. Will also cover the CD pipeline via appveyor with tests against an Azure appliance.
Classes, the new feature in PowerShell 5.0, was added just for writing DSC resources right? Not so! Come see how classes can be used as part of a PowerShell cmdlet, providing code separation, easier parameter validation, and more. This session will cover a working module that uses class definitions alongside standard PowerShell cmdlets to integrate with a REST API. Learn how using defined classes makes integration between get and set cmdlets easier and potentially safer. It will also cover the release pipeline for testing and deployment, with a little Azure Resource Manager template design thrown in for fun. All code for this session will be available on GitHub.
This session will cover:
- How to build a REST Uri and payload from user-provided parameter values
- How to model objects and build class definitions and methods to reflect actions on those objects
- How to build cmdlets that interface with both the user and the class definitions, isolating code for improved readability
- How to build a test environment in Azure for running Pester tests and deploy to the PS Gallery with Appveyor
This has been an amazing side project that I've been working on for over a year. I've learned a ton about classes, github, appveyor, azure, etc. and I'm eager to share all that. Current project code can be found here: github.com/murrahjm/Infoblox-Classy




Other Videos By Confreaks


2022-01-13PowerShell Team: Managing Server State using Configuration as Code by Michael Greene
2022-01-13Defending against PowerShell attacks - in theory, and in practice by Lee holmes
2022-01-13OpenSSH Internals for PowerShell Pros by Anthony Nocentino
2022-01-13Writing Award Winning PowerShell Functions and Script Modules by Mike Robbins
2022-01-13Time to Use Regular Expressions More, Um, Regularly by Mark Minasi
2022-01-13Developing with PowerShell Classes: Here be Dragons by Brandon Olin
2022-01-13Building PowerShell Applications that Operate on a Planetary Scale by Justin Sider
2022-01-13Become a PowerShell Debugging Ninja by Kirk Munro
2022-01-13DSC vs. "The Others" - A Song of Configuration Management by Missy Januszko
2022-01-13Connecting the Dots with PowerShell by Warren Frame
2022-01-13Building cmdlets for a REST API with PowerShell classes, Azure-based ... by Jeremy Murrah
2022-01-13Deploy Infrastructure As A Service with Azure Resource Manager Templates by Will Anderson
2022-01-13PowerShell Team: PowerShell Core by Joey Aiello
2022-01-13One MOF to rule them all, and in the Azure bind them by Jacob Morrison
2022-01-13Team Leadership Session by Michael Greene & Joey Aiello
2022-01-13A Historical Architectural Tour of PowerShell by Bruce Payette
2022-01-13State of the Art by Jeffrey Snover
2022-01-13Keynote: State of the Community by Don Jones
2022-01-13EMPEX LA 2018 - Shipping a Replacement Architecture in Elixir by Chris Bell
2022-01-13EMPEX LA 2018 - Inclusion Starts with Docs by Pete Gamache
2022-01-13EMPEX LA 2018 - Life is but a Stream by Geoffrey Lessel