ibm_power_hmc 0.17.0 → 0.19.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,72 +2,8 @@
2
2
 
3
3
  require 'erb'
4
4
 
5
- # Module for IBM HMC Rest API Client
6
5
  module IbmPowerHmc
7
- class Error < StandardError; end
8
-
9
- ##
10
- # HMC REST Client connection.
11
6
  class Connection
12
- ##
13
- # @!method initialize(host:, password:, username: "hscroot", port: 12_443, validate_ssl: true, timeout: 60)
14
- # Create a new HMC connection.
15
- #
16
- # @param host [String] Hostname of the HMC.
17
- # @param password [String] Password.
18
- # @param username [String] User name.
19
- # @param port [Integer] TCP port number.
20
- # @param validate_ssl [Boolean] Verify SSL certificates.
21
- # @param timeout [Integer] The default HTTP timeout in seconds.
22
- def initialize(host:, password:, username: "hscroot", port: 12_443, validate_ssl: true, timeout: 60)
23
- @hostname = "#{host}:#{port}"
24
- @username = username
25
- @password = password
26
- @verify_ssl = validate_ssl
27
- @api_session_token = nil
28
- @timeout = timeout
29
- end
30
-
31
- ##
32
- # @!method logon
33
- # Establish a trusted session with the Web Services APIs.
34
- # @return [String] The X-API-Session token.
35
- def logon
36
- method_url = "/rest/api/web/Logon"
37
- headers = {
38
- :content_type => "application/vnd.ibm.powervm.web+xml; type=LogonRequest"
39
- }
40
- doc = REXML::Document.new("")
41
- doc.add_element("LogonRequest", "schemaVersion" => "V1_1_0")
42
- doc.root.add_namespace("http://www.ibm.com/xmlns/systems/power/firmware/web/mc/2012_10/")
43
- doc.root.add_element("UserID").text = @username
44
- doc.root.add_element("Password").text = @password
45
-
46
- @api_session_token = ""
47
- response = request(:put, method_url, headers, doc.to_s)
48
- doc = REXML::Document.new(response.body)
49
- elem = doc.elements["LogonResponse/X-API-Session"]
50
- raise Error, "LogonResponse/X-API-Session not found" if elem.nil?
51
-
52
- @api_session_token = elem.text
53
- end
54
-
55
- ##
56
- # @!method logoff
57
- # Close the session.
58
- def logoff
59
- # Don't want to trigger automatic logon here!
60
- return if @api_session_token.nil?
61
-
62
- method_url = "/rest/api/web/Logon"
63
- begin
64
- request(:delete, method_url)
65
- rescue
66
- # Ignore exceptions as this is best effort attempt to log off.
67
- end
68
- @api_session_token = nil
69
- end
70
-
71
7
  ##
72
8
  # @!method management_console
73
9
  # Retrieve information about the management console.
@@ -94,7 +30,7 @@ module IbmPowerHmc
94
30
  end
95
31
 
96
32
  ##
97
- # @!method managed_system(sys_uuid = nil, group_name = nil)
33
+ # @!method managed_system(sys_uuid, group_name = nil)
98
34
  # Retrieve information about a managed system.
99
35
  # @param sys_uuid [String] The UUID of the managed system.
100
36
  # @param group_name [String] The extended group attributes.
@@ -194,17 +130,6 @@ module IbmPowerHmc
194
130
  response.body[1..-2]
195
131
  end
196
132
 
197
- ##
198
- # @!method rename_lpar(lpar_uuid, new_name)
199
- # Rename a logical partition.
200
- # @param lpar_uuid [String] The UUID of the logical partition.
201
- # @param new_name [String] The new name of the logical partition.
202
- def rename_lpar(lpar_uuid, new_name)
203
- modify_object do
204
- lpar(lpar_uuid).tap { |lpar| lpar.name = new_name }
205
- end
206
- end
207
-
208
133
  ##
209
134
  # @!method lpar_migrate_validate(lpar_uuid, target_sys_name, sync = true)
210
135
  # Validate if a logical partition can be migrated to another managed system.
@@ -242,6 +167,16 @@ module IbmPowerHmc
242
167
  end
243
168
  end
244
169
 
170
+ ##
171
+ # @!method lpar_delete(lpar_uuid)
172
+ # Delete a logical partition.
173
+ # @param lpar_uuid [String] The UUID of the logical partition to delete.
174
+ def lpar_delete(lpar_uuid)
175
+ method_url = "/rest/api/uom/LogicalPartition/#{lpar_uuid}"
176
+ request(:delete, method_url)
177
+ # Returns HTTP 204 if ok
178
+ end
179
+
245
180
  ##
246
181
  # @!method vioses(sys_uuid = nil, search = nil, group_name = nil, permissive = true)
247
182
  # Retrieve the list of virtual I/O servers managed by the HMC.
@@ -377,6 +312,19 @@ module IbmPowerHmc
377
312
  network_adapter("VirtualIOServer", vios_uuid, netadap_uuid)
378
313
  end
379
314
 
315
+ def network_adapter(obj_type, lpar_uuid, netadap_uuid)
316
+ if netadap_uuid.nil?
317
+ method_url = "/rest/api/uom/#{obj_type}/#{lpar_uuid}/ClientNetworkAdapter"
318
+ response = request(:get, method_url)
319
+ FeedParser.new(response.body).objects(:ClientNetworkAdapter)
320
+ else
321
+ method_url = "/rest/api/uom/#{obj_type}/#{lpar_uuid}/ClientNetworkAdapter/#{netadap_uuid}"
322
+ response = request(:get, method_url)
323
+ Parser.new(response.body).object(:ClientNetworkAdapter)
324
+ end
325
+ end
326
+ private :network_adapter
327
+
380
328
  ##
381
329
  # @!method sriov_elp_lpar(lpar_uuid, sriov_elp_uuid = nil)
382
330
  # Retrieve one or all SR-IOV ethernet logical ports attached to a logical partition.
@@ -384,18 +332,31 @@ module IbmPowerHmc
384
332
  # @param sriov_elp_uuid [String] UUID of the port to match (returns all ports if omitted).
385
333
  # @return [Array<IbmPowerHmc::SRIOVEthernetLogicalPort>, IbmPowerHmc::SRIOVEthernetLogicalPort] The list of ports.
386
334
  def sriov_elp_lpar(lpar_uuid, sriov_elp_uuid = nil)
387
- sriov_ethernet_port("LogicalPartition", lpar_uuid, sriov_elp_uuid)
335
+ sriov_elp("LogicalPartition", lpar_uuid, sriov_elp_uuid)
388
336
  end
389
337
 
390
338
  ##
391
- # @!method network_adapter_vios(vios_uuid, sriov_elp_uuid = nil)
339
+ # @!method sriov_elp_vios(vios_uuid, sriov_elp_uuid = nil)
392
340
  # Retrieve one or all SR-IOV ethernet logical ports attached to a Virtual I/O Server.
393
341
  # @param vios_uuid [String] UUID of the Virtual I/O Server.
394
342
  # @param sriov_elp_uuid [String] UUID of the port to match (returns all ports if omitted).
395
343
  # @return [Array<IbmPowerHmc::SRIOVEthernetLogicalPort>, IbmPowerHmc::SRIOVEthernetLogicalPort] The list of ports.
396
344
  def sriov_elp_vios(vios_uuid, sriov_elp_uuid = nil)
397
- sriov_ethernet_port("VirtualIOServer", vios_uuid, sriov_elp_uuid)
345
+ sriov_elp("VirtualIOServer", vios_uuid, sriov_elp_uuid)
346
+ end
347
+
348
+ def sriov_elp(obj_type, lpar_uuid, sriov_elp_uuid)
349
+ if sriov_elp_uuid.nil?
350
+ method_url = "/rest/api/uom/#{obj_type}/#{lpar_uuid}/SRIOVEthernetLogicalPort"
351
+ response = request(:get, method_url)
352
+ FeedParser.new(response.body).objects(:SRIOVEthernetLogicalPort)
353
+ else
354
+ method_url = "/rest/api/uom/#{obj_type}/#{lpar_uuid}/SRIOVEthernetLogicalPort/#{sriov_elp_uuid}"
355
+ response = request(:get, method_url)
356
+ Parser.new(response.body).object(:SRIOVEthernetLogicalPort)
357
+ end
398
358
  end
359
+ private :sriov_elp
399
360
 
400
361
  ##
401
362
  # @!method vnic_dedicated(lpar_uuid, vnic_uuid = nil)
@@ -528,7 +489,7 @@ module IbmPowerHmc
528
489
  # @!method shared_processor_pool(sys_uuid, pool_uuid = nil)
529
490
  # Retrieve information about Shared Processor Pools.
530
491
  # @param sys_uuid [String] The UUID of the managed system.
531
- # @param pool_uuid [String] The UUID of the shared storage pool (return all pools if omitted)
492
+ # @param pool_uuid [String] The UUID of the shared processor pool (return all pools if omitted)
532
493
  # @return [Array<IbmPowerHmc::SharedProcessorPool>, IbmPowerHmc::SharedProcessorPool] The list of shared processor pools.
533
494
  def shared_processor_pool(sys_uuid, pool_uuid = nil)
534
495
  if pool_uuid.nil?
@@ -542,172 +503,6 @@ module IbmPowerHmc
542
503
  end
543
504
  end
544
505
 
545
- ##
546
- # @!method templates_summary(draft = false)
547
- # Retrieve the list of partition template summaries.
548
- # @param draft [Boolean] Retrieve draft templates as well
549
- # @return [Array<IbmPowerHmc::PartitionTemplateSummary>] The list of partition template summaries.
550
- def templates_summary(draft = false)
551
- method_url = "/rest/api/templates/PartitionTemplate#{'?draft=false' unless draft}"
552
- response = request(:get, method_url)
553
- FeedParser.new(response.body).objects(:PartitionTemplateSummary)
554
- end
555
-
556
- ##
557
- # @!method templates(draft = false)
558
- # Retrieve the list of partition templates.
559
- # @param draft [Boolean] Retrieve draft templates as well
560
- # @return [Array<IbmPowerHmc::PartitionTemplate>] The list of partition templates.
561
- def templates(draft = false)
562
- method_url = "/rest/api/templates/PartitionTemplate?detail=full#{'&draft=false' unless draft}"
563
- response = request(:get, method_url)
564
- FeedParser.new(response.body).objects(:PartitionTemplate)
565
- end
566
-
567
- ##
568
- # @!method template(template_uuid)
569
- # Retrieve details for a particular partition template.
570
- # @param template_uuid [String] UUID of the partition template.
571
- # @return [IbmPowerHmc::PartitionTemplate] The partition template.
572
- def template(template_uuid)
573
- method_url = "/rest/api/templates/PartitionTemplate/#{template_uuid}"
574
- response = request(:get, method_url)
575
- Parser.new(response.body).object(:PartitionTemplate)
576
- end
577
-
578
- ##
579
- # @!method capture_lpar(lpar_uuid, sys_uuid, template_name, sync = true)
580
- # Capture partition configuration as template.
581
- # @param lpar_uuid [String] The UUID of the logical partition.
582
- # @param sys_uuid [String] The UUID of the managed system.
583
- # @param template_name [String] The name to be given for the new template.
584
- # @param sync [Boolean] Start the job and wait for its completion.
585
- # @return [IbmPowerHmc::HmcJob] The HMC job.
586
- def capture_lpar(lpar_uuid, sys_uuid, template_name, sync = true)
587
- # Need to include session token in payload so make sure we are logged in
588
- logon if @api_session_token.nil?
589
- method_url = "/rest/api/templates/PartitionTemplate/do/capture"
590
- params = {
591
- "TargetUuid" => lpar_uuid,
592
- "NewTemplateName" => template_name,
593
- "ManagedSystemUuid" => sys_uuid,
594
- "K_X_API_SESSION_MEMENTO" => @api_session_token
595
- }
596
- job = HmcJob.new(self, method_url, "Capture", "PartitionTemplate", params)
597
- job.run if sync
598
- job
599
- end
600
-
601
- ##
602
- # @!method template_check(template_uuid, target_sys_uuid, sync = true)
603
- # Start Template Check job (first of three steps to deploy an LPAR from a Template).
604
- # @param template_uuid [String] The UUID of the Template to deploy an LPAR from.
605
- # @param target_sys_uuid [String] The UUID of the Managed System to deploy the LPAR on.
606
- # @param sync [Boolean] Start the job and wait for its completion.
607
- # @return [IbmPowerHmc::HmcJob] The HMC job.
608
- def template_check(template_uuid, target_sys_uuid, sync = true)
609
- # Need to include session token in payload so make sure we are logged in
610
- logon if @api_session_token.nil?
611
- method_url = "/rest/api/templates/PartitionTemplate/#{template_uuid}/do/check"
612
- params = {
613
- "TargetUuid" => target_sys_uuid,
614
- "K_X_API_SESSION_MEMENTO" => @api_session_token
615
- }
616
- job = HmcJob.new(self, method_url, "Check", "PartitionTemplate", params)
617
- job.run if sync
618
- job
619
- end
620
-
621
- ##
622
- # @!method template_transform(draft_template_uuid, target_sys_uuid, sync = true)
623
- # Start Template Transform job (second of three steps to deploy an LPAR from a Template).
624
- # @param draft_template_uuid [String] The UUID of the Draft Template created by the Template Check job.
625
- # @param target_sys_uuid [String] The UUID of the Managed System to deploy the LPAR on.
626
- # @param sync [Boolean] Start the job and wait for its completion.
627
- # @return [IbmPowerHmc::HmcJob] The HMC job.
628
- def template_transform(draft_template_uuid, target_sys_uuid, sync = true)
629
- # Need to include session token in payload so make sure we are logged in
630
- logon if @api_session_token.nil?
631
- method_url = "/rest/api/templates/PartitionTemplate/#{draft_template_uuid}/do/transform"
632
- params = {
633
- "TargetUuid" => target_sys_uuid,
634
- "K_X_API_SESSION_MEMENTO" => @api_session_token
635
- }
636
- job = HmcJob.new(self, method_url, "Transform", "PartitionTemplate", params)
637
- job.run if sync
638
- job
639
- end
640
-
641
- ##
642
- # @!method template_deploy(draft_template_uuid, target_sys_uuid, sync = true)
643
- # Start Template Deploy job (last of three steps to deploy an LPAR from a Template).
644
- # @param draft_template_uuid [String] The UUID of the Draft Template created by the Template Check job.
645
- # @param target_sys_uuid [String] The UUID of the Managed System to deploy the LPAR on.
646
- # @param sync [Boolean] Start the job and wait for its completion.
647
- # @return [IbmPowerHmc::HmcJob] The HMC job.
648
- def template_deploy(draft_template_uuid, target_sys_uuid, sync = true)
649
- # Need to include session token in payload so make sure we are logged in
650
- logon if @api_session_token.nil?
651
- method_url = "/rest/api/templates/PartitionTemplate/#{draft_template_uuid}/do/deploy"
652
- params = {
653
- "TargetUuid" => target_sys_uuid,
654
- "TemplateUuid" => draft_template_uuid,
655
- "K_X_API_SESSION_MEMENTO" => @api_session_token
656
- }
657
- job = HmcJob.new(self, method_url, "Deploy", "PartitionTemplate", params)
658
- job.run if sync
659
- job
660
- end
661
-
662
- ##
663
- # @!method template_provision(template_uuid, target_sys_uuid, changes)
664
- # Deploy Logical Partition from a Template (performs Check, Transform and Deploy steps in a single method).
665
- # @param template_uuid [String] The UUID of the Template to deploy an LPAR from.
666
- # @param target_sys_uuid [String] The UUID of the Managed System to deploy the LPAR on.
667
- # @param changes [Hash] Modifications to apply to the Template before deploying Logical Partition.
668
- # @return [String] The UUID of the deployed Logical Partition.
669
- def template_provision(template_uuid, target_sys_uuid, changes)
670
- draft_uuid = template_check(template_uuid, target_sys_uuid).results["TEMPLATE_UUID"]
671
- template_transform(draft_uuid, target_sys_uuid)
672
- template_modify(draft_uuid, changes)
673
- template_deploy(draft_uuid, target_sys_uuid).results["PartitionUuid"]
674
- end
675
-
676
- ##
677
- # @!method template_modify(template_uuid, changes)
678
- # Modify a template.
679
- # @param template_uuid [String] UUID of the partition template to modify.
680
- # @param changes [Hash] Hash of changes to make.
681
- def template_modify(template_uuid, changes)
682
- method_url = "/rest/api/templates/PartitionTemplate/#{template_uuid}"
683
-
684
- # Templates have no href so need to use modify_object_url.
685
- modify_object_url(method_url) do
686
- template(template_uuid).tap do |obj|
687
- changes.each do |key, value|
688
- obj.send("#{key}=", value)
689
- end
690
- end
691
- end
692
- end
693
-
694
- ##
695
- # @!method template_copy(template_uuid, new_name)
696
- # Copy existing template to a new one.
697
- # @param template_uuid [String] UUID of the partition template to copy.
698
- # @param new_name [String] Name of the new template.
699
- # @return [IbmPowerHmc::PartitionTemplate] The new partition template.
700
- def template_copy(template_uuid, new_name)
701
- method_url = "/rest/api/templates/PartitionTemplate"
702
- headers = {
703
- :content_type => "application/vnd.ibm.powervm.templates+xml;type=PartitionTemplate"
704
- }
705
- original = template(template_uuid)
706
- original.name = new_name
707
- response = request(:put, method_url, headers, original.xml.to_s)
708
- Parser.new(response.body).object(:PartitionTemplate)
709
- end
710
-
711
506
  ##
712
507
  # @!method poweron_lpar(lpar_uuid, params = {}, sync = true)
713
508
  # Power on a logical partition.
@@ -851,167 +646,5 @@ module IbmPowerHmc
851
646
  e
852
647
  end.compact
853
648
  end
854
-
855
- ##
856
- # @!method usertask(uuid = true)
857
- # Retrieve details of an event of type "user task".
858
- # @param uuid [String] UUID of user task.
859
- # @return [Hash] Hash of user task attributes.
860
- def usertask(uuid)
861
- method_url = "/rest/api/ui/UserTask/#{uuid}"
862
- response = request(:get, method_url)
863
- j = JSON.parse(response.body)
864
- if j['status'].eql?("Completed")
865
- case j['key']
866
- when "TEMPLATE_PARTITION_SAVE", "TEMPLATE_PARTITION_SAVE_AS", "TEMPLATE_PARTITION_CAPTURE"
867
- j['template_uuid'] = templates_summary.find { |t| t.name.eql?(j['labelParams'].first) }&.uuid
868
- end
869
- end
870
- j
871
- end
872
-
873
- ##
874
- # @!method schema(type)
875
- # Retrieve the XML schema file for a given object type.
876
- # @param type [String] The object type (e.g. "LogicalPartition", "inc/Types")
877
- # @return [REXML::Document] The XML schema file.
878
- def schema(type)
879
- method_url = "/rest/api/web/schema/#{type}.xsd"
880
- response = request(:get, method_url)
881
- REXML::Document.new(response.body)
882
- end
883
-
884
- class HttpError < Error
885
- attr_reader :status, :uri, :reason, :message, :original_exception
886
-
887
- ##
888
- # @!method initialize(err)
889
- # Create a new HttpError exception.
890
- # @param err [RestClient::Exception] The REST client exception.
891
- def initialize(err)
892
- super
893
- @original_exception = err
894
- @status = err.http_code
895
- @message = err.message
896
-
897
- # Try to parse body as an HttpErrorResponse.
898
- unless err.response.nil?
899
- begin
900
- resp = Parser.new(err.response.body).object(:HttpErrorResponse)
901
- @uri = resp.uri
902
- @reason = resp.reason
903
- @message = resp.message
904
- rescue
905
- # not an XML body
906
- end
907
- end
908
- end
909
-
910
- def to_s
911
- "msg=\"#{@message}\" status=\"#{@status}\" reason=\"#{@reason}\" uri=#{@uri}"
912
- end
913
- end
914
-
915
- ##
916
- # @!method request(method, url, headers = {}, payload = nil)
917
- # Perform a REST API request.
918
- # @param method [String] The HTTP method.
919
- # @param url [String] The method URL.
920
- # @param headers [Hash] HTTP headers.
921
- # @param payload [String] HTTP request payload.
922
- # @return [RestClient::Response] The response from the HMC.
923
- def request(method, url, headers = {}, payload = nil)
924
- logon if @api_session_token.nil?
925
- reauth = false
926
- # Check for relative URLs
927
- url = "https://#{@hostname}#{url}" if url.start_with?("/")
928
- begin
929
- headers = headers.merge("X-API-Session" => @api_session_token)
930
- RestClient::Request.execute(
931
- :method => method,
932
- :url => url,
933
- :verify_ssl => @verify_ssl,
934
- :payload => payload,
935
- :headers => headers,
936
- :timeout => @timeout
937
- )
938
- rescue RestClient::Exception => e
939
- # Do not retry on failed logon attempts.
940
- if e.http_code == 401 && @api_session_token != "" && !reauth
941
- # Try to reauth.
942
- reauth = true
943
- logon
944
- retry
945
- end
946
- raise HttpError.new(e), "REST request failed"
947
- end
948
- end
949
-
950
- # @!method modify_object(headers = {}, attempts = 5)
951
- # Post an IbmPowerHmc::AbstractRest object iteratively using ETag.
952
- # @param headers [Hash] HTTP headers.
953
- # @param attempts [Integer] Maximum number of retries.
954
- # @yieldreturn [IbmPowerHmc::AbstractRest] The object to modify.
955
- def modify_object(headers = {}, attempts = 5, &block)
956
- modify_object_url(nil, headers, attempts, &block)
957
- end
958
-
959
- private
960
-
961
- def modify_object_url(method_url = nil, headers = {}, attempts = 5)
962
- while attempts > 0
963
- obj = yield
964
- raise "object has no href" if method_url.nil? && (!obj.kind_of?(AbstractRest) || obj.href.nil?)
965
-
966
- # Use ETag to ensure object has not changed.
967
- headers = headers.merge("If-Match" => obj.etag, :content_type => obj.content_type)
968
- begin
969
- request(:post, method_url.nil? ? obj.href.path : method_url, headers, obj.xml.to_s)
970
- break
971
- rescue HttpError => e
972
- attempts -= 1
973
- # Will get 412 ("Precondition Failed") if ETag mismatches.
974
- raise if e.status != 412 || attempts == 0
975
- end
976
- end
977
- end
978
-
979
- ##
980
- # @!method network_adapter(vm_type, lpar_uuid, netadap_uuid)
981
- # Retrieve one or all virtual ethernet network adapters attached to a Logical Partition or a Virtual I/O Server.
982
- # @param vm_type [String] "LogicalPartition" or "VirtualIOServer".
983
- # @param lpar_uuid [String] UUID of the Logical Partition or the Virtual I/O Server.
984
- # @param netadap_uuid [String] UUID of the adapter to match (returns all adapters if nil).
985
- # @return [Array<IbmPowerHmc::ClientNetworkAdapter>, IbmPowerHmc::ClientNetworkAdapter] The list of network adapters.
986
- def network_adapter(vm_type, lpar_uuid, netadap_uuid)
987
- if netadap_uuid.nil?
988
- method_url = "/rest/api/uom/#{vm_type}/#{lpar_uuid}/ClientNetworkAdapter"
989
- response = request(:get, method_url)
990
- FeedParser.new(response.body).objects(:ClientNetworkAdapter)
991
- else
992
- method_url = "/rest/api/uom/#{vm_type}/#{lpar_uuid}/ClientNetworkAdapter/#{netadap_uuid}"
993
- response = request(:get, method_url)
994
- Parser.new(response.body).object(:ClientNetworkAdapter)
995
- end
996
- end
997
-
998
- ##
999
- # @!method sriov_ethernet_port(vm_type, lpar_uuid, sriov_elp_uuid)
1000
- # Retrieve one or all SR-IOV Ethernet loical ports attached to a Logical Partition or a Virtual I/O Server.
1001
- # @param vm_type [String] "LogicalPartition" or "VirtualIOServer".
1002
- # @param lpar_uuid [String] UUID of the Logical Partition or the Virtual I/O Server.
1003
- # @param sriov_elp_uuid [String] UUID of the port to match (returns all ports if nil).
1004
- # @return [Array<IbmPowerHmc::SRIOVEthernetLogicalPort>, IbmPowerHmc::SRIOVEthernetLogicalPort] The list of ports.
1005
- def sriov_ethernet_port(vm_type, lpar_uuid, sriov_elp_uuid)
1006
- if sriov_elp_uuid.nil?
1007
- method_url = "/rest/api/uom/#{vm_type}/#{lpar_uuid}/SRIOVEthernetLogicalPort"
1008
- response = request(:get, method_url)
1009
- FeedParser.new(response.body).objects(:SRIOVEthernetLogicalPort)
1010
- else
1011
- method_url = "/rest/api/uom/#{vm_type}/#{lpar_uuid}/SRIOVEthernetLogicalPort/#{sriov_elp_uuid}"
1012
- response = request(:get, method_url)
1013
- Parser.new(response.body).object(:SRIOVEthernetLogicalPort)
1014
- end
1015
- end
1016
649
  end
1017
650
  end