strongdm 4.1.0 → 4.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.git/ORIG_HEAD +1 -1
- data/.git/index +0 -0
- data/.git/logs/HEAD +3 -3
- data/.git/logs/refs/heads/master +2 -2
- data/.git/logs/refs/remotes/origin/HEAD +1 -1
- data/.git/objects/pack/{pack-a77bc20aa46066f594f08fd56a297068f69715b9.idx → pack-ab429bd34d8703aafaf2a617c2c9379839382f37.idx} +0 -0
- data/.git/objects/pack/{pack-a77bc20aa46066f594f08fd56a297068f69715b9.pack → pack-ab429bd34d8703aafaf2a617c2c9379839382f37.pack} +0 -0
- data/.git/packed-refs +3 -2
- data/.git/refs/heads/master +1 -1
- data/lib/constants.rb +3 -0
- data/lib/grpc/options_pb.rb +1 -0
- data/lib/grpc/peering_group_nodes_pb.rb +77 -0
- data/lib/grpc/peering_group_nodes_services_pb.rb +43 -0
- data/lib/grpc/peering_group_peers_pb.rb +77 -0
- data/lib/grpc/peering_group_peers_services_pb.rb +43 -0
- data/lib/grpc/peering_group_resources_pb.rb +77 -0
- data/lib/grpc/peering_group_resources_services_pb.rb +43 -0
- data/lib/grpc/peering_groups_pb.rb +76 -0
- data/lib/grpc/peering_groups_services_pb.rb +43 -0
- data/lib/grpc/plumbing.rb +602 -0
- data/lib/models/porcelain.rb +429 -0
- data/lib/strongdm.rb +45 -1
- data/lib/svc.rb +732 -0
- data/lib/version +1 -1
- data/lib/version.rb +1 -1
- metadata +12 -4
data/lib/svc.rb
CHANGED
@@ -1486,6 +1486,738 @@ module SDM #:nodoc:
|
|
1486
1486
|
end
|
1487
1487
|
end
|
1488
1488
|
|
1489
|
+
# PeeringGroupNodes provides the building blocks necessary to obtain attach a node to a peering group.
|
1490
|
+
#
|
1491
|
+
# See {PeeringGroupNode}.
|
1492
|
+
class PeeringGroupNodes
|
1493
|
+
extend Gem::Deprecate
|
1494
|
+
|
1495
|
+
def initialize(channel, parent)
|
1496
|
+
begin
|
1497
|
+
@stub = V1::PeeringGroupNodes::Stub.new(nil, nil, channel_override: channel)
|
1498
|
+
rescue => exception
|
1499
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1500
|
+
end
|
1501
|
+
@parent = parent
|
1502
|
+
end
|
1503
|
+
|
1504
|
+
# Create attaches a Node to a PeeringGroup
|
1505
|
+
def create(
|
1506
|
+
peering_group_node,
|
1507
|
+
deadline: nil
|
1508
|
+
)
|
1509
|
+
req = V1::PeeringGroupNodeCreateRequest.new()
|
1510
|
+
|
1511
|
+
req.peering_group_node = Plumbing::convert_peering_group_node_to_plumbing(peering_group_node)
|
1512
|
+
tries = 0
|
1513
|
+
plumbing_response = nil
|
1514
|
+
loop do
|
1515
|
+
begin
|
1516
|
+
plumbing_response = @stub.create(req, metadata: @parent.get_metadata("PeeringGroupNodes.Create", req), deadline: deadline)
|
1517
|
+
rescue => exception
|
1518
|
+
if (@parent.shouldRetry(tries, exception))
|
1519
|
+
tries + +@parent.jitterSleep(tries)
|
1520
|
+
next
|
1521
|
+
end
|
1522
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1523
|
+
end
|
1524
|
+
break
|
1525
|
+
end
|
1526
|
+
|
1527
|
+
resp = PeeringGroupNodeCreateResponse.new()
|
1528
|
+
resp.meta = Plumbing::convert_create_response_metadata_to_porcelain(plumbing_response.meta)
|
1529
|
+
resp.peering_group_node = Plumbing::convert_peering_group_node_to_porcelain(plumbing_response.peering_group_node)
|
1530
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1531
|
+
resp
|
1532
|
+
end
|
1533
|
+
|
1534
|
+
# Delete detaches a Node to a PeeringGroup.
|
1535
|
+
def delete(
|
1536
|
+
id,
|
1537
|
+
deadline: nil
|
1538
|
+
)
|
1539
|
+
req = V1::PeeringGroupNodeDeleteRequest.new()
|
1540
|
+
|
1541
|
+
req.id = (id)
|
1542
|
+
tries = 0
|
1543
|
+
plumbing_response = nil
|
1544
|
+
loop do
|
1545
|
+
begin
|
1546
|
+
plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("PeeringGroupNodes.Delete", req), deadline: deadline)
|
1547
|
+
rescue => exception
|
1548
|
+
if (@parent.shouldRetry(tries, exception))
|
1549
|
+
tries + +@parent.jitterSleep(tries)
|
1550
|
+
next
|
1551
|
+
end
|
1552
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1553
|
+
end
|
1554
|
+
break
|
1555
|
+
end
|
1556
|
+
|
1557
|
+
resp = PeeringGroupNodeDeleteResponse.new()
|
1558
|
+
resp.meta = Plumbing::convert_delete_response_metadata_to_porcelain(plumbing_response.meta)
|
1559
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1560
|
+
resp
|
1561
|
+
end
|
1562
|
+
|
1563
|
+
# Get reads the information of one peering group to node attachment.
|
1564
|
+
def get(
|
1565
|
+
id,
|
1566
|
+
deadline: nil
|
1567
|
+
)
|
1568
|
+
req = V1::PeeringGroupNodeGetRequest.new()
|
1569
|
+
if not @parent.snapshot_time.nil?
|
1570
|
+
req.meta = V1::GetRequestMetadata.new()
|
1571
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1572
|
+
end
|
1573
|
+
|
1574
|
+
req.id = (id)
|
1575
|
+
tries = 0
|
1576
|
+
plumbing_response = nil
|
1577
|
+
loop do
|
1578
|
+
begin
|
1579
|
+
plumbing_response = @stub.get(req, metadata: @parent.get_metadata("PeeringGroupNodes.Get", req), deadline: deadline)
|
1580
|
+
rescue => exception
|
1581
|
+
if (@parent.shouldRetry(tries, exception))
|
1582
|
+
tries + +@parent.jitterSleep(tries)
|
1583
|
+
next
|
1584
|
+
end
|
1585
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1586
|
+
end
|
1587
|
+
break
|
1588
|
+
end
|
1589
|
+
|
1590
|
+
resp = PeeringGroupNodeGetResponse.new()
|
1591
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
1592
|
+
resp.peering_group_node = Plumbing::convert_peering_group_node_to_porcelain(plumbing_response.peering_group_node)
|
1593
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1594
|
+
resp
|
1595
|
+
end
|
1596
|
+
|
1597
|
+
# List gets a list of peering group node attachments.
|
1598
|
+
def list(
|
1599
|
+
filter,
|
1600
|
+
*args,
|
1601
|
+
deadline: nil
|
1602
|
+
)
|
1603
|
+
req = V1::PeeringGroupNodeListRequest.new()
|
1604
|
+
req.meta = V1::ListRequestMetadata.new()
|
1605
|
+
page_size_option = @parent._test_options["PageSize"]
|
1606
|
+
if page_size_option.is_a? Integer
|
1607
|
+
req.meta.limit = page_size_option
|
1608
|
+
end
|
1609
|
+
if not @parent.snapshot_time.nil?
|
1610
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1611
|
+
end
|
1612
|
+
|
1613
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1614
|
+
resp = Enumerator::Generator.new { |g|
|
1615
|
+
tries = 0
|
1616
|
+
loop do
|
1617
|
+
begin
|
1618
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("PeeringGroupNodes.List", req), deadline: deadline)
|
1619
|
+
rescue => exception
|
1620
|
+
if (@parent.shouldRetry(tries, exception))
|
1621
|
+
tries + +@parent.jitterSleep(tries)
|
1622
|
+
next
|
1623
|
+
end
|
1624
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1625
|
+
end
|
1626
|
+
tries = 0
|
1627
|
+
plumbing_response.peering_group_nodes.each do |plumbing_item|
|
1628
|
+
g.yield Plumbing::convert_peering_group_node_to_porcelain(plumbing_item)
|
1629
|
+
end
|
1630
|
+
break if plumbing_response.meta.next_cursor == ""
|
1631
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1632
|
+
end
|
1633
|
+
}
|
1634
|
+
resp
|
1635
|
+
end
|
1636
|
+
end
|
1637
|
+
|
1638
|
+
# SnapshotPeeringGroupNodes exposes the read only methods of the PeeringGroupNodes
|
1639
|
+
# service for historical queries.
|
1640
|
+
class SnapshotPeeringGroupNodes
|
1641
|
+
extend Gem::Deprecate
|
1642
|
+
|
1643
|
+
def initialize(peering_group_nodes)
|
1644
|
+
@peering_group_nodes = peering_group_nodes
|
1645
|
+
end
|
1646
|
+
|
1647
|
+
# Get reads the information of one peering group to node attachment.
|
1648
|
+
def get(
|
1649
|
+
id,
|
1650
|
+
deadline: nil
|
1651
|
+
)
|
1652
|
+
return @peering_group_nodes.get(
|
1653
|
+
id,
|
1654
|
+
deadline: deadline,
|
1655
|
+
)
|
1656
|
+
end
|
1657
|
+
|
1658
|
+
# List gets a list of peering group node attachments.
|
1659
|
+
def list(
|
1660
|
+
filter,
|
1661
|
+
*args,
|
1662
|
+
deadline: nil
|
1663
|
+
)
|
1664
|
+
return @peering_group_nodes.list(
|
1665
|
+
filter,
|
1666
|
+
*args,
|
1667
|
+
deadline: deadline,
|
1668
|
+
)
|
1669
|
+
end
|
1670
|
+
end
|
1671
|
+
|
1672
|
+
# PeeringGroupPeers provides the building blocks necessary to link two peering groups.
|
1673
|
+
#
|
1674
|
+
# See {PeeringGroupPeer}.
|
1675
|
+
class PeeringGroupPeers
|
1676
|
+
extend Gem::Deprecate
|
1677
|
+
|
1678
|
+
def initialize(channel, parent)
|
1679
|
+
begin
|
1680
|
+
@stub = V1::PeeringGroupPeers::Stub.new(nil, nil, channel_override: channel)
|
1681
|
+
rescue => exception
|
1682
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1683
|
+
end
|
1684
|
+
@parent = parent
|
1685
|
+
end
|
1686
|
+
|
1687
|
+
# Create links two peering groups.
|
1688
|
+
def create(
|
1689
|
+
peering_group_peer,
|
1690
|
+
deadline: nil
|
1691
|
+
)
|
1692
|
+
req = V1::PeeringGroupPeerCreateRequest.new()
|
1693
|
+
|
1694
|
+
req.peering_group_peer = Plumbing::convert_peering_group_peer_to_plumbing(peering_group_peer)
|
1695
|
+
tries = 0
|
1696
|
+
plumbing_response = nil
|
1697
|
+
loop do
|
1698
|
+
begin
|
1699
|
+
plumbing_response = @stub.create(req, metadata: @parent.get_metadata("PeeringGroupPeers.Create", req), deadline: deadline)
|
1700
|
+
rescue => exception
|
1701
|
+
if (@parent.shouldRetry(tries, exception))
|
1702
|
+
tries + +@parent.jitterSleep(tries)
|
1703
|
+
next
|
1704
|
+
end
|
1705
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1706
|
+
end
|
1707
|
+
break
|
1708
|
+
end
|
1709
|
+
|
1710
|
+
resp = PeeringGroupPeerCreateResponse.new()
|
1711
|
+
resp.meta = Plumbing::convert_create_response_metadata_to_porcelain(plumbing_response.meta)
|
1712
|
+
resp.peering_group_peer = Plumbing::convert_peering_group_peer_to_porcelain(plumbing_response.peering_group_peer)
|
1713
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1714
|
+
resp
|
1715
|
+
end
|
1716
|
+
|
1717
|
+
# Delete unlinks two peering groups.
|
1718
|
+
def delete(
|
1719
|
+
id,
|
1720
|
+
deadline: nil
|
1721
|
+
)
|
1722
|
+
req = V1::PeeringGroupPeerDeleteRequest.new()
|
1723
|
+
|
1724
|
+
req.id = (id)
|
1725
|
+
tries = 0
|
1726
|
+
plumbing_response = nil
|
1727
|
+
loop do
|
1728
|
+
begin
|
1729
|
+
plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("PeeringGroupPeers.Delete", req), deadline: deadline)
|
1730
|
+
rescue => exception
|
1731
|
+
if (@parent.shouldRetry(tries, exception))
|
1732
|
+
tries + +@parent.jitterSleep(tries)
|
1733
|
+
next
|
1734
|
+
end
|
1735
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1736
|
+
end
|
1737
|
+
break
|
1738
|
+
end
|
1739
|
+
|
1740
|
+
resp = PeeringGroupPeerDeleteResponse.new()
|
1741
|
+
resp.meta = Plumbing::convert_delete_response_metadata_to_porcelain(plumbing_response.meta)
|
1742
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1743
|
+
resp
|
1744
|
+
end
|
1745
|
+
|
1746
|
+
# Get reads the information of one peering group link.
|
1747
|
+
def get(
|
1748
|
+
id,
|
1749
|
+
deadline: nil
|
1750
|
+
)
|
1751
|
+
req = V1::PeeringGroupPeerGetRequest.new()
|
1752
|
+
if not @parent.snapshot_time.nil?
|
1753
|
+
req.meta = V1::GetRequestMetadata.new()
|
1754
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1755
|
+
end
|
1756
|
+
|
1757
|
+
req.id = (id)
|
1758
|
+
tries = 0
|
1759
|
+
plumbing_response = nil
|
1760
|
+
loop do
|
1761
|
+
begin
|
1762
|
+
plumbing_response = @stub.get(req, metadata: @parent.get_metadata("PeeringGroupPeers.Get", req), deadline: deadline)
|
1763
|
+
rescue => exception
|
1764
|
+
if (@parent.shouldRetry(tries, exception))
|
1765
|
+
tries + +@parent.jitterSleep(tries)
|
1766
|
+
next
|
1767
|
+
end
|
1768
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1769
|
+
end
|
1770
|
+
break
|
1771
|
+
end
|
1772
|
+
|
1773
|
+
resp = PeeringGroupPeerGetResponse.new()
|
1774
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
1775
|
+
resp.peering_group_peer = Plumbing::convert_peering_group_peer_to_porcelain(plumbing_response.peering_group_peer)
|
1776
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1777
|
+
resp
|
1778
|
+
end
|
1779
|
+
|
1780
|
+
# List gets a list of peering group links.
|
1781
|
+
def list(
|
1782
|
+
filter,
|
1783
|
+
*args,
|
1784
|
+
deadline: nil
|
1785
|
+
)
|
1786
|
+
req = V1::PeeringGroupPeerListRequest.new()
|
1787
|
+
req.meta = V1::ListRequestMetadata.new()
|
1788
|
+
page_size_option = @parent._test_options["PageSize"]
|
1789
|
+
if page_size_option.is_a? Integer
|
1790
|
+
req.meta.limit = page_size_option
|
1791
|
+
end
|
1792
|
+
if not @parent.snapshot_time.nil?
|
1793
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1794
|
+
end
|
1795
|
+
|
1796
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1797
|
+
resp = Enumerator::Generator.new { |g|
|
1798
|
+
tries = 0
|
1799
|
+
loop do
|
1800
|
+
begin
|
1801
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("PeeringGroupPeers.List", req), deadline: deadline)
|
1802
|
+
rescue => exception
|
1803
|
+
if (@parent.shouldRetry(tries, exception))
|
1804
|
+
tries + +@parent.jitterSleep(tries)
|
1805
|
+
next
|
1806
|
+
end
|
1807
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1808
|
+
end
|
1809
|
+
tries = 0
|
1810
|
+
plumbing_response.peering_group_peers.each do |plumbing_item|
|
1811
|
+
g.yield Plumbing::convert_peering_group_peer_to_porcelain(plumbing_item)
|
1812
|
+
end
|
1813
|
+
break if plumbing_response.meta.next_cursor == ""
|
1814
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1815
|
+
end
|
1816
|
+
}
|
1817
|
+
resp
|
1818
|
+
end
|
1819
|
+
end
|
1820
|
+
|
1821
|
+
# SnapshotPeeringGroupPeers exposes the read only methods of the PeeringGroupPeers
|
1822
|
+
# service for historical queries.
|
1823
|
+
class SnapshotPeeringGroupPeers
|
1824
|
+
extend Gem::Deprecate
|
1825
|
+
|
1826
|
+
def initialize(peering_group_peers)
|
1827
|
+
@peering_group_peers = peering_group_peers
|
1828
|
+
end
|
1829
|
+
|
1830
|
+
# Get reads the information of one peering group link.
|
1831
|
+
def get(
|
1832
|
+
id,
|
1833
|
+
deadline: nil
|
1834
|
+
)
|
1835
|
+
return @peering_group_peers.get(
|
1836
|
+
id,
|
1837
|
+
deadline: deadline,
|
1838
|
+
)
|
1839
|
+
end
|
1840
|
+
|
1841
|
+
# List gets a list of peering group links.
|
1842
|
+
def list(
|
1843
|
+
filter,
|
1844
|
+
*args,
|
1845
|
+
deadline: nil
|
1846
|
+
)
|
1847
|
+
return @peering_group_peers.list(
|
1848
|
+
filter,
|
1849
|
+
*args,
|
1850
|
+
deadline: deadline,
|
1851
|
+
)
|
1852
|
+
end
|
1853
|
+
end
|
1854
|
+
|
1855
|
+
# PeeringGroupResources provides the building blocks necessary to obtain attach a resource to a peering group.
|
1856
|
+
#
|
1857
|
+
# See {PeeringGroupResource}.
|
1858
|
+
class PeeringGroupResources
|
1859
|
+
extend Gem::Deprecate
|
1860
|
+
|
1861
|
+
def initialize(channel, parent)
|
1862
|
+
begin
|
1863
|
+
@stub = V1::PeeringGroupResources::Stub.new(nil, nil, channel_override: channel)
|
1864
|
+
rescue => exception
|
1865
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1866
|
+
end
|
1867
|
+
@parent = parent
|
1868
|
+
end
|
1869
|
+
|
1870
|
+
# Create attaches a Resource to a PeeringGroup
|
1871
|
+
def create(
|
1872
|
+
peering_group_resource,
|
1873
|
+
deadline: nil
|
1874
|
+
)
|
1875
|
+
req = V1::PeeringGroupResourceCreateRequest.new()
|
1876
|
+
|
1877
|
+
req.peering_group_resource = Plumbing::convert_peering_group_resource_to_plumbing(peering_group_resource)
|
1878
|
+
tries = 0
|
1879
|
+
plumbing_response = nil
|
1880
|
+
loop do
|
1881
|
+
begin
|
1882
|
+
plumbing_response = @stub.create(req, metadata: @parent.get_metadata("PeeringGroupResources.Create", req), deadline: deadline)
|
1883
|
+
rescue => exception
|
1884
|
+
if (@parent.shouldRetry(tries, exception))
|
1885
|
+
tries + +@parent.jitterSleep(tries)
|
1886
|
+
next
|
1887
|
+
end
|
1888
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1889
|
+
end
|
1890
|
+
break
|
1891
|
+
end
|
1892
|
+
|
1893
|
+
resp = PeeringGroupResourceCreateResponse.new()
|
1894
|
+
resp.meta = Plumbing::convert_create_response_metadata_to_porcelain(plumbing_response.meta)
|
1895
|
+
resp.peering_group_resource = Plumbing::convert_peering_group_resource_to_porcelain(plumbing_response.peering_group_resource)
|
1896
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1897
|
+
resp
|
1898
|
+
end
|
1899
|
+
|
1900
|
+
# Delete detaches a Resource to a PeeringGroup
|
1901
|
+
def delete(
|
1902
|
+
id,
|
1903
|
+
deadline: nil
|
1904
|
+
)
|
1905
|
+
req = V1::PeeringGroupResourceDeleteRequest.new()
|
1906
|
+
|
1907
|
+
req.id = (id)
|
1908
|
+
tries = 0
|
1909
|
+
plumbing_response = nil
|
1910
|
+
loop do
|
1911
|
+
begin
|
1912
|
+
plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("PeeringGroupResources.Delete", req), deadline: deadline)
|
1913
|
+
rescue => exception
|
1914
|
+
if (@parent.shouldRetry(tries, exception))
|
1915
|
+
tries + +@parent.jitterSleep(tries)
|
1916
|
+
next
|
1917
|
+
end
|
1918
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1919
|
+
end
|
1920
|
+
break
|
1921
|
+
end
|
1922
|
+
|
1923
|
+
resp = PeeringGroupResourceDeleteResponse.new()
|
1924
|
+
resp.meta = Plumbing::convert_delete_response_metadata_to_porcelain(plumbing_response.meta)
|
1925
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1926
|
+
resp
|
1927
|
+
end
|
1928
|
+
|
1929
|
+
# Get reads the information of one peering group to resource attachment.
|
1930
|
+
def get(
|
1931
|
+
id,
|
1932
|
+
deadline: nil
|
1933
|
+
)
|
1934
|
+
req = V1::PeeringGroupResourceGetRequest.new()
|
1935
|
+
if not @parent.snapshot_time.nil?
|
1936
|
+
req.meta = V1::GetRequestMetadata.new()
|
1937
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1938
|
+
end
|
1939
|
+
|
1940
|
+
req.id = (id)
|
1941
|
+
tries = 0
|
1942
|
+
plumbing_response = nil
|
1943
|
+
loop do
|
1944
|
+
begin
|
1945
|
+
plumbing_response = @stub.get(req, metadata: @parent.get_metadata("PeeringGroupResources.Get", req), deadline: deadline)
|
1946
|
+
rescue => exception
|
1947
|
+
if (@parent.shouldRetry(tries, exception))
|
1948
|
+
tries + +@parent.jitterSleep(tries)
|
1949
|
+
next
|
1950
|
+
end
|
1951
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1952
|
+
end
|
1953
|
+
break
|
1954
|
+
end
|
1955
|
+
|
1956
|
+
resp = PeeringGroupResourceGetResponse.new()
|
1957
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
1958
|
+
resp.peering_group_resource = Plumbing::convert_peering_group_resource_to_porcelain(plumbing_response.peering_group_resource)
|
1959
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
1960
|
+
resp
|
1961
|
+
end
|
1962
|
+
|
1963
|
+
# List gets a list of peering group resource attachments.
|
1964
|
+
def list(
|
1965
|
+
filter,
|
1966
|
+
*args,
|
1967
|
+
deadline: nil
|
1968
|
+
)
|
1969
|
+
req = V1::PeeringGroupResourceListRequest.new()
|
1970
|
+
req.meta = V1::ListRequestMetadata.new()
|
1971
|
+
page_size_option = @parent._test_options["PageSize"]
|
1972
|
+
if page_size_option.is_a? Integer
|
1973
|
+
req.meta.limit = page_size_option
|
1974
|
+
end
|
1975
|
+
if not @parent.snapshot_time.nil?
|
1976
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
1977
|
+
end
|
1978
|
+
|
1979
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
1980
|
+
resp = Enumerator::Generator.new { |g|
|
1981
|
+
tries = 0
|
1982
|
+
loop do
|
1983
|
+
begin
|
1984
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("PeeringGroupResources.List", req), deadline: deadline)
|
1985
|
+
rescue => exception
|
1986
|
+
if (@parent.shouldRetry(tries, exception))
|
1987
|
+
tries + +@parent.jitterSleep(tries)
|
1988
|
+
next
|
1989
|
+
end
|
1990
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
1991
|
+
end
|
1992
|
+
tries = 0
|
1993
|
+
plumbing_response.peering_group_resources.each do |plumbing_item|
|
1994
|
+
g.yield Plumbing::convert_peering_group_resource_to_porcelain(plumbing_item)
|
1995
|
+
end
|
1996
|
+
break if plumbing_response.meta.next_cursor == ""
|
1997
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
1998
|
+
end
|
1999
|
+
}
|
2000
|
+
resp
|
2001
|
+
end
|
2002
|
+
end
|
2003
|
+
|
2004
|
+
# SnapshotPeeringGroupResources exposes the read only methods of the PeeringGroupResources
|
2005
|
+
# service for historical queries.
|
2006
|
+
class SnapshotPeeringGroupResources
|
2007
|
+
extend Gem::Deprecate
|
2008
|
+
|
2009
|
+
def initialize(peering_group_resources)
|
2010
|
+
@peering_group_resources = peering_group_resources
|
2011
|
+
end
|
2012
|
+
|
2013
|
+
# Get reads the information of one peering group to resource attachment.
|
2014
|
+
def get(
|
2015
|
+
id,
|
2016
|
+
deadline: nil
|
2017
|
+
)
|
2018
|
+
return @peering_group_resources.get(
|
2019
|
+
id,
|
2020
|
+
deadline: deadline,
|
2021
|
+
)
|
2022
|
+
end
|
2023
|
+
|
2024
|
+
# List gets a list of peering group resource attachments.
|
2025
|
+
def list(
|
2026
|
+
filter,
|
2027
|
+
*args,
|
2028
|
+
deadline: nil
|
2029
|
+
)
|
2030
|
+
return @peering_group_resources.list(
|
2031
|
+
filter,
|
2032
|
+
*args,
|
2033
|
+
deadline: deadline,
|
2034
|
+
)
|
2035
|
+
end
|
2036
|
+
end
|
2037
|
+
|
2038
|
+
# PeeringGroups provides the building blocks necessary to obtain explicit network topology and routing.
|
2039
|
+
#
|
2040
|
+
# See {PeeringGroup}.
|
2041
|
+
class PeeringGroups
|
2042
|
+
extend Gem::Deprecate
|
2043
|
+
|
2044
|
+
def initialize(channel, parent)
|
2045
|
+
begin
|
2046
|
+
@stub = V1::PeeringGroups::Stub.new(nil, nil, channel_override: channel)
|
2047
|
+
rescue => exception
|
2048
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2049
|
+
end
|
2050
|
+
@parent = parent
|
2051
|
+
end
|
2052
|
+
|
2053
|
+
# Create registers a new PeeringGroup.
|
2054
|
+
def create(
|
2055
|
+
peering_group,
|
2056
|
+
deadline: nil
|
2057
|
+
)
|
2058
|
+
req = V1::PeeringGroupCreateRequest.new()
|
2059
|
+
|
2060
|
+
req.peering_group = Plumbing::convert_peering_group_to_plumbing(peering_group)
|
2061
|
+
tries = 0
|
2062
|
+
plumbing_response = nil
|
2063
|
+
loop do
|
2064
|
+
begin
|
2065
|
+
plumbing_response = @stub.create(req, metadata: @parent.get_metadata("PeeringGroups.Create", req), deadline: deadline)
|
2066
|
+
rescue => exception
|
2067
|
+
if (@parent.shouldRetry(tries, exception))
|
2068
|
+
tries + +@parent.jitterSleep(tries)
|
2069
|
+
next
|
2070
|
+
end
|
2071
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2072
|
+
end
|
2073
|
+
break
|
2074
|
+
end
|
2075
|
+
|
2076
|
+
resp = PeeringGroupCreateResponse.new()
|
2077
|
+
resp.meta = Plumbing::convert_create_response_metadata_to_porcelain(plumbing_response.meta)
|
2078
|
+
resp.peering_group = Plumbing::convert_peering_group_to_porcelain(plumbing_response.peering_group)
|
2079
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
2080
|
+
resp
|
2081
|
+
end
|
2082
|
+
|
2083
|
+
# Delete removes a PeeringGroup by ID.
|
2084
|
+
def delete(
|
2085
|
+
id,
|
2086
|
+
deadline: nil
|
2087
|
+
)
|
2088
|
+
req = V1::PeeringGroupDeleteRequest.new()
|
2089
|
+
|
2090
|
+
req.id = (id)
|
2091
|
+
tries = 0
|
2092
|
+
plumbing_response = nil
|
2093
|
+
loop do
|
2094
|
+
begin
|
2095
|
+
plumbing_response = @stub.delete(req, metadata: @parent.get_metadata("PeeringGroups.Delete", req), deadline: deadline)
|
2096
|
+
rescue => exception
|
2097
|
+
if (@parent.shouldRetry(tries, exception))
|
2098
|
+
tries + +@parent.jitterSleep(tries)
|
2099
|
+
next
|
2100
|
+
end
|
2101
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2102
|
+
end
|
2103
|
+
break
|
2104
|
+
end
|
2105
|
+
|
2106
|
+
resp = PeeringGroupDeleteResponse.new()
|
2107
|
+
resp.meta = Plumbing::convert_delete_response_metadata_to_porcelain(plumbing_response.meta)
|
2108
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
2109
|
+
resp
|
2110
|
+
end
|
2111
|
+
|
2112
|
+
# Get reads one PeeringGroup by ID. It will load all its dependencies.
|
2113
|
+
def get(
|
2114
|
+
id,
|
2115
|
+
deadline: nil
|
2116
|
+
)
|
2117
|
+
req = V1::PeeringGroupGetRequest.new()
|
2118
|
+
if not @parent.snapshot_time.nil?
|
2119
|
+
req.meta = V1::GetRequestMetadata.new()
|
2120
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2121
|
+
end
|
2122
|
+
|
2123
|
+
req.id = (id)
|
2124
|
+
tries = 0
|
2125
|
+
plumbing_response = nil
|
2126
|
+
loop do
|
2127
|
+
begin
|
2128
|
+
plumbing_response = @stub.get(req, metadata: @parent.get_metadata("PeeringGroups.Get", req), deadline: deadline)
|
2129
|
+
rescue => exception
|
2130
|
+
if (@parent.shouldRetry(tries, exception))
|
2131
|
+
tries + +@parent.jitterSleep(tries)
|
2132
|
+
next
|
2133
|
+
end
|
2134
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2135
|
+
end
|
2136
|
+
break
|
2137
|
+
end
|
2138
|
+
|
2139
|
+
resp = PeeringGroupGetResponse.new()
|
2140
|
+
resp.meta = Plumbing::convert_get_response_metadata_to_porcelain(plumbing_response.meta)
|
2141
|
+
resp.peering_group = Plumbing::convert_peering_group_to_porcelain(plumbing_response.peering_group)
|
2142
|
+
resp.rate_limit = Plumbing::convert_rate_limit_metadata_to_porcelain(plumbing_response.rate_limit)
|
2143
|
+
resp
|
2144
|
+
end
|
2145
|
+
|
2146
|
+
# List gets a list of Peering Groups.
|
2147
|
+
def list(
|
2148
|
+
filter,
|
2149
|
+
*args,
|
2150
|
+
deadline: nil
|
2151
|
+
)
|
2152
|
+
req = V1::PeeringGroupListRequest.new()
|
2153
|
+
req.meta = V1::ListRequestMetadata.new()
|
2154
|
+
page_size_option = @parent._test_options["PageSize"]
|
2155
|
+
if page_size_option.is_a? Integer
|
2156
|
+
req.meta.limit = page_size_option
|
2157
|
+
end
|
2158
|
+
if not @parent.snapshot_time.nil?
|
2159
|
+
req.meta.snapshot_at = @parent.snapshot_time
|
2160
|
+
end
|
2161
|
+
|
2162
|
+
req.filter = Plumbing::quote_filter_args(filter, *args)
|
2163
|
+
resp = Enumerator::Generator.new { |g|
|
2164
|
+
tries = 0
|
2165
|
+
loop do
|
2166
|
+
begin
|
2167
|
+
plumbing_response = @stub.list(req, metadata: @parent.get_metadata("PeeringGroups.List", req), deadline: deadline)
|
2168
|
+
rescue => exception
|
2169
|
+
if (@parent.shouldRetry(tries, exception))
|
2170
|
+
tries + +@parent.jitterSleep(tries)
|
2171
|
+
next
|
2172
|
+
end
|
2173
|
+
raise Plumbing::convert_error_to_porcelain(exception)
|
2174
|
+
end
|
2175
|
+
tries = 0
|
2176
|
+
plumbing_response.peering_groups.each do |plumbing_item|
|
2177
|
+
g.yield Plumbing::convert_peering_group_to_porcelain(plumbing_item)
|
2178
|
+
end
|
2179
|
+
break if plumbing_response.meta.next_cursor == ""
|
2180
|
+
req.meta.cursor = plumbing_response.meta.next_cursor
|
2181
|
+
end
|
2182
|
+
}
|
2183
|
+
resp
|
2184
|
+
end
|
2185
|
+
end
|
2186
|
+
|
2187
|
+
# SnapshotPeeringGroups exposes the read only methods of the PeeringGroups
|
2188
|
+
# service for historical queries.
|
2189
|
+
class SnapshotPeeringGroups
|
2190
|
+
extend Gem::Deprecate
|
2191
|
+
|
2192
|
+
def initialize(peering_groups)
|
2193
|
+
@peering_groups = peering_groups
|
2194
|
+
end
|
2195
|
+
|
2196
|
+
# Get reads one PeeringGroup by ID. It will load all its dependencies.
|
2197
|
+
def get(
|
2198
|
+
id,
|
2199
|
+
deadline: nil
|
2200
|
+
)
|
2201
|
+
return @peering_groups.get(
|
2202
|
+
id,
|
2203
|
+
deadline: deadline,
|
2204
|
+
)
|
2205
|
+
end
|
2206
|
+
|
2207
|
+
# List gets a list of Peering Groups.
|
2208
|
+
def list(
|
2209
|
+
filter,
|
2210
|
+
*args,
|
2211
|
+
deadline: nil
|
2212
|
+
)
|
2213
|
+
return @peering_groups.list(
|
2214
|
+
filter,
|
2215
|
+
*args,
|
2216
|
+
deadline: deadline,
|
2217
|
+
)
|
2218
|
+
end
|
2219
|
+
end
|
2220
|
+
|
1489
2221
|
# A Query is a record of a single client request to a resource, such as a SQL query.
|
1490
2222
|
# Long-running SSH, RDP, or Kubernetes interactive sessions also count as queries.
|
1491
2223
|
# The Queries service is read-only.
|