forked from dell-asm/vmware-vcenter
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request dell-asm#139 from bodepd/sync_resource_files
Sync resource files
- Loading branch information
Showing
4 changed files
with
141 additions
and
169 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
# | ||
# This class is used to get wwpns from Dell servers | ||
# | ||
class ASM::WWPN | ||
|
||
def self.get(ipaddress, username, password) | ||
# TODO do we need to specify this external link? | ||
# it makes it seem this has an external dependency | ||
# on network connectivity which we know is not | ||
# true | ||
wsmanCmdResponse = `wsman enumerate http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/root/DCIM/DCIM_FCView -h "#{ipaddress}" -V -v -c dummy.cert -P 443 -u "#{username}" -p "#{password}" -j utf-8 -y basic` | ||
wsmanCmdResponse.split(/\n/).collect do |ele| | ||
if ele =~ /<n1:VirtualWWPN>(\S+)<\/n1:VirtualWWPN>/ | ||
$1 | ||
end | ||
end | ||
end | ||
|
||
end |
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