-
Notifications
You must be signed in to change notification settings - Fork 327
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
1,366 additions
and
830 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# Contribute to the vCheck-vSphere repository | ||
|
||
Hi! We can't thank you enough for wanting to contribute; the community is what keeps the wheels moving on this awesome project. | ||
All we ask is that you follow some simple guidelines. The roots of these guidelines stem from the developer community and the actual document has been borrowed from [Microsoft's DscResources](https://github.com/PowerShell/DscResources) repository; they did an excellent job putting these guidelines together; why reinvent the wheel? | ||
|
||
## Using GitHub, Git, and this repository | ||
|
||
We are working on more detailed instructions that outline the basics. | ||
|
||
## Contributing to the existing vCheck-vSphere repository | ||
|
||
### Forks and Pull Requests | ||
|
||
GitHub fosters collaboration through the notion of [pull requests](https://help.github.com/articles/using-pull-requests/). | ||
On GitHub, anyone can [fork](https://help.github.com/articles/fork-a-repo/) an existing repository into their own branch where they can make private changes to the original repository. | ||
To contribute these changes back into the original repository, a user simply creates a pull request in order to "request" that the changes be taken "upstream". | ||
|
||
#### Lifecycle of a pull reqeust | ||
|
||
* **Always create pull requests to the `dev` branch of a repository**. | ||
For more information, learn about the [branch structure](#branch-structure) that we are using. | ||
|
||
![PR-Dev.png](https://github.com/vScripter/vCheck-vSphere/blob/dev/Images/PR-Dev.PNG) | ||
|
||
* When you create a pull request, fill out the description with a summary of what's included in your changes. | ||
If the changes are related to an existing GitHub issue, please reference the issue in your description. | ||
* Once the PR is submitted, we will review your code | ||
* Once the code review is done, and all merge conflicts are resolved, a maintainer will merge your changes. | ||
|
||
### Contributing to documentation | ||
One of the easiest ways to contribute to a PowerShell project is by helping to write and edit documentation. | ||
All of our documentation hosted on GitHub is written using [GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/) | ||
|
||
*We are at lest working on shifting things over to GFM, for 'core' documentation. Some things may still live on the GitHub wiki, but using GFM allows the documentation to exist in the repo, so you always have a local copy to reference ;)* | ||
|
||
To [edit an existing file](https://help.github.com/articles/editing-files-in-another-user-s-repository/), simply navigate to it and click the "Edit" button. | ||
GitHub will automatically create your own fork of our repository where you can make your changes. | ||
Once you're finished, save your edits and submit a pull request to get your changes merged upstream. | ||
|
||
If you want to contribute new documentation, first check for [issues tagged as "Documentation"](https://github.com/alanrenouf/vCheck-vSphere/labels/documentation) to make sure you're not duplicating efforts. | ||
If no one seems to be working on what you have planned: | ||
* Open a new issue tagged as "Documentation" to tell others what you're working on | ||
* Create a fork of our repository and start adding new Markdown-based documentation to it | ||
* When you're ready to contribute your documentation, submit a pull request to the *dev* branch | ||
|
||
|
||
#### GitHub Flavored Markdown (GFM) | ||
|
||
All of the articles in this repository use [GitHub Flavored Markdown (GFM)](https://help.github.com/articles/github-flavored-markdown/). | ||
|
||
If you are looking for a good editor, try [Markdown Pad](http://markdownpad.com/) or | ||
GitHub also provides a web interface for Markdown editing with syntax highlighting and the ability to preview changes. | ||
|
||
Some of the more basic GFM syntax includes: | ||
|
||
* **Line breaks vs. paragraphs:** In Markdown there is no HTML `<br />` or `<p />` element. | ||
Instead, a new paragraph is designated by an empty line between two blocks of text. | ||
(Note: Please add a single newline after each sentence to simplify the command-line output of diffs and history.) | ||
It will simplify diffs and history. | ||
* **Italics:** The HTML `<em>some text</em>` is written as `*some text*` | ||
* **Bold:** The HTML `<strong>some text</strong>` element is written as `**some text**` | ||
* **Headings:** HTML headings are designated using `#` characters at the start of the line. | ||
The number of `#` characters corresponds to the hierarchical level of the heading (for example, `#` = `<h1>` and `###` = ```<h3>```). | ||
* **Numbered lists:** To make a numbered (ordered) list start the line with `1. `. | ||
If you want multiple elements within a single list element, format your list as follows: | ||
``` | ||
1. For the first element (like this one), insert a tab stop after the 1. | ||
To include a second element (like this one), insert a line break after the first and align indentations. | ||
``` | ||
to get this output: | ||
|
||
1. For the first element (like this one), insert a tab stop after the 1. | ||
|
||
To include a second element (like this one), insert a line break after the first and align indentations. | ||
|
||
* **Bulleted lists:** Bulleted (unordered) lists are almost identical to ordered lists except that the `1. ` is replaced with either `* `, `- `, or `+ `. | ||
Multiple element lists work the same way as with ordered lists. | ||
* **Links:** The syntax for a hyperlink is `[visible link text](link url)`. | ||
Links can also have references, which will be discussed in the "Link and Image References" section below. | ||
|
||
## Editing an existing plugin | ||
|
||
We are in the process of adding/consolidating more detailed documentation around this. | ||
|
||
## Creating a new plugin | ||
|
||
We are in the process of adding/consolidating more detailed documentation around this. In the meantime, you can review the documentation that we do have inside the [README.md](README.md) file for the repo. | ||
|
||
## Gitter & Waffle | ||
|
||
We are using [![Join the chat at https://gitter.im/alanrenouf/vCheck-vSphere](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/alanrenouf/vCheck-vSphere?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) for general discussion around the vCheck utility. This is a good place for general questions or minor issues that someone might be able to answer, on the spot. If something cannot be resolved in the chat, it may warrant the submission of an Issue. | ||
|
||
We are also using Waffle.io to help track and resolve issues. You can visit the the dashboard [![Stories in Ready](http://badge.waffle.io/alanrenouf/vCheck-vSphere.png)](http://waffle.io/alanrenouf/vCheck-vSphere) to view or submit issues (you can also still use the GitHub web interface to submit/view issues). | ||
|
||
|
||
## Style guidelines | ||
|
||
When contributing to this repository, please follow the following guidelines: | ||
|
||
* For all indentation, use 4 spaces instead of tab stops | ||
* Make sure all files are encoding using UTF-8. | ||
* When writing Markdown, if a paragraph includes more than one setence, end each sentence with a newline. | ||
GitHub will still render the sentences as a single paragraph, but the readability of `git diff` will be greatly improved. | ||
|
||
|
||
## Branch structure | ||
|
||
We are using a [git flow](http://nvie.com/posts/a-successful-git-branching-model/) model for development. | ||
We recommend that you create local working branches that target a specific scope of change. | ||
Each branch should be limited to a single feature/bugfix both to streamline workflows and reduce the possibility of merge conflicts. | ||
![git flow picture](http://nvie.com/img/[email protected]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
# Start of Settings | ||
# Start of Settings | ||
# HA VM restart day(s) number | ||
$HAVMrestartold = 5 | ||
# End of Settings | ||
|
||
$EventFilterSpec = New-Object VMware.Vim.EventFilterSpec | ||
$EventFilterSpec.Category = "warning" | ||
$EventFilterSpec.eventTypeId = "com.vmware.vc.ha.VmRestartedByHAEvent" | ||
$EventFilterSpec.Time = New-Object VMware.Vim.EventFilterSpecByTime | ||
$EventFilterSpec.Time.beginTime = (Get-Date).AddDays(-$HAVMrestartold) | ||
|
||
$HAVMrestartlist = @((get-view (get-view ServiceInstance -Property Content.EventManager).Content.EventManager).QueryEvents($EventFilterSpec) | select CreatedTime,FullFormattedMessage |sort CreatedTime -Descending) | ||
$HAVMrestartlist | ||
@(Get-VIEventPlus -EventType "com.vmware.vc.ha.VmRestartedByHAEvent" -Start (Get-Date).AddDays(-$HAVMrestartold) | Select-Object CreatedTime, FullFormattedMessage | Sort-Object CreatedTime -Descending) | ||
|
||
$Title = "HA VMs restarted" | ||
$Header = ("HA: VM restart (Last {0} Day(s)) : {1}" -f $HAVMrestartold, @($HAVMrestartlist).count) | ||
$Header = ("HA: VM restart (Last {0} Day(s)) : [count]" -f $HAVMrestartold) | ||
$Comments = "The following VMs have been restarted by HA in the last $HAVMresetold days" | ||
$Display = "Table" | ||
$Author = "Alan Renouf" | ||
$PluginVersion = 1.1 | ||
$PluginVersion = 1.2 | ||
$PluginCategory = "vSphere" | ||
|
||
Remove-Variable HAVMrestartlist, EventFilterSpec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.