Skip to content

Commit eedac5e

Browse files
authored
Releasing version 1.3.0 (#12)
1 parent a1ee832 commit eedac5e

16 files changed

+333
-71
lines changed

CHANGELOG.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on `Keep a Changelog <http://keepachangelog.com/>`_.
66

7+
====================
8+
1.3.0 - 2017-04-06
9+
====================
10+
11+
-------
12+
Added
13+
-------
14+
15+
* Support for DHCP Search Domain Option.
16+
* Support for ComputeClient.get_windows_instance_initial_credentials.
17+
718
====================
819
1.2.0 - 2017-03-28
920
====================

oraclebmc/core/compute_client.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,43 @@ def get_volume_attachment(self, volume_attachment_id, **kwargs):
533533
header_params=header_params,
534534
response_type="VolumeAttachment")
535535

536+
def get_windows_instance_initial_credentials(self, instance_id, **kwargs):
537+
"""
538+
GetWindowsInstanceInitialCredentials
539+
Gets the generated credentials for the instance. Only works for Windows instances. The returned credentials
540+
are only valid for the initial login.
541+
542+
543+
:param str instance_id: (required)
544+
The OCID of the instance.
545+
546+
:return: A Response object with data of type InstanceCredentials
547+
:rtype: InstanceCredentials
548+
"""
549+
resource_path = "/instances/{instanceId}/initialCredentials"
550+
method = "GET"
551+
552+
if kwargs:
553+
raise ValueError(
554+
"get_windows_instance_initial_credentials got unknown kwargs: {!r}".format(kwargs))
555+
556+
path_params = {
557+
"instanceId": instance_id
558+
}
559+
path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}
560+
561+
header_params = {
562+
"accept": "application/json",
563+
"content-type": "application/json"
564+
}
565+
566+
return self.base_client.call_api(
567+
resource_path=resource_path,
568+
method=method,
569+
path_params=path_params,
570+
header_params=header_params,
571+
response_type="InstanceCredentials")
572+
536573
def instance_action(self, instance_id, action, **kwargs):
537574
"""
538575
InstanceAction

oraclebmc/core/models/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from .dhcp_dns_option import DhcpDnsOption
2525
from .dhcp_option import DhcpOption
2626
from .dhcp_options import DhcpOptions
27+
from .dhcp_search_domain_option import DhcpSearchDomainOption
2728
from .drg import Drg
2829
from .drg_attachment import DrgAttachment
2930
from .egress_security_rule import EgressSecurityRule
@@ -35,6 +36,7 @@
3536
from .image import Image
3637
from .ingress_security_rule import IngressSecurityRule
3738
from .instance import Instance
39+
from .instance_credentials import InstanceCredentials
3840
from .internet_gateway import InternetGateway
3941
from .launch_instance_details import LaunchInstanceDetails
4042
from .port_range import PortRange
@@ -91,6 +93,7 @@
9193
"DhcpDnsOption": DhcpDnsOption,
9294
"DhcpOption": DhcpOption,
9395
"DhcpOptions": DhcpOptions,
96+
"DhcpSearchDomainOption": DhcpSearchDomainOption,
9497
"Drg": Drg,
9598
"DrgAttachment": DrgAttachment,
9699
"EgressSecurityRule": EgressSecurityRule,
@@ -102,6 +105,7 @@
102105
"Image": Image,
103106
"IngressSecurityRule": IngressSecurityRule,
104107
"Instance": Instance,
108+
"InstanceCredentials": InstanceCredentials,
105109
"InternetGateway": InternetGateway,
106110
"LaunchInstanceDetails": LaunchInstanceDetails,
107111
"PortRange": PortRange,

oraclebmc/core/models/create_subnet_details.py

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -179,22 +179,19 @@ def dns_label(self):
179179
Gets the dns_label of this CreateSubnetDetails.
180180
A DNS label for the subnet, used in conjunction with the VNIC's hostname and
181181
VCN's DNS label to form a fully qualified domain name (FQDN) for each VNIC
182-
within this subnet (e.g., `bminstance-1.subnet-123.vcn-1.oraclevcn.com`).
183-
Must be unique within the VCN and comply with
184-
`RFC 952`__ and
185-
`RFC 1123`__. The value cannot be changed.
182+
within this subnet (e.g., `bminstance-1.subnet123.vcn1.oraclevcn.com`).
183+
Must be an alphanumeric string that begins with a letter and is unique within the VCN.
184+
The value cannot be changed.
186185
187-
This value must be set if you want to use the VCN Resolver to resolve the
186+
This value must be set if you want to use the Internet and VCN Resolver to resolve the
188187
hostnames of instances in the subnet. It can only be set if the VCN itself
189188
was created with a DNS label.
190189
191190
For more information, see
192191
`DNS in Your Virtual Cloud Network`__.
193192
194-
Example: `subnet-123`
193+
Example: `subnet123`
195194
196-
__ https://tools.ietf.org/html/rfc952
197-
__ https://tools.ietf.org/html/rfc1123
198195
__ {{DOC_SERVER_URL}}/Content/Network/Concepts/dns.htm
199196
200197
@@ -209,22 +206,19 @@ def dns_label(self, dns_label):
209206
Sets the dns_label of this CreateSubnetDetails.
210207
A DNS label for the subnet, used in conjunction with the VNIC's hostname and
211208
VCN's DNS label to form a fully qualified domain name (FQDN) for each VNIC
212-
within this subnet (e.g., `bminstance-1.subnet-123.vcn-1.oraclevcn.com`).
213-
Must be unique within the VCN and comply with
214-
`RFC 952`__ and
215-
`RFC 1123`__. The value cannot be changed.
209+
within this subnet (e.g., `bminstance-1.subnet123.vcn1.oraclevcn.com`).
210+
Must be an alphanumeric string that begins with a letter and is unique within the VCN.
211+
The value cannot be changed.
216212
217-
This value must be set if you want to use the VCN Resolver to resolve the
213+
This value must be set if you want to use the Internet and VCN Resolver to resolve the
218214
hostnames of instances in the subnet. It can only be set if the VCN itself
219215
was created with a DNS label.
220216
221217
For more information, see
222218
`DNS in Your Virtual Cloud Network`__.
223219
224-
Example: `subnet-123`
220+
Example: `subnet123`
225221
226-
__ https://tools.ietf.org/html/rfc952
227-
__ https://tools.ietf.org/html/rfc1123
228222
__ {{DOC_SERVER_URL}}/Content/Network/Concepts/dns.htm
229223
230224

oraclebmc/core/models/create_vcn_details.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -110,22 +110,21 @@ def dns_label(self):
110110
Gets the dns_label of this CreateVcnDetails.
111111
A DNS label for the VCN, used in conjunction with the VNIC's hostname and
112112
subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC
113-
within this subnet (e.g., `bminstance-1.subnet-123.vcn-1.oraclevcn.com`).
113+
within this subnet (e.g., `bminstance-1.subnet123.vcn1.oraclevcn.com`).
114114
Not required to be unique, but it's a best practice to set unique DNS labels
115-
for VCNs in your tenancy. Must comply with
116-
`RFC 952`__ and
117-
`RFC 1123`__. The value cannot be changed.
115+
for VCNs in your tenancy.
116+
Must be an alphanumeric string that begins with a letter.
117+
The value cannot be changed.
118118
119119
You must set this value if you want instances to be able to use hostnames to
120-
resolve other instances in the VCN. Otherwise the VCN Resolver will not work.
120+
resolve other instances in the VCN. Otherwise the Internet and VCN Resolver
121+
will not work.
121122
122123
For more information, see
123124
`DNS in Your Virtual Cloud Network`__.
124125
125-
Example: `vcn-1`
126+
Example: `vcn1`
126127
127-
__ https://tools.ietf.org/html/rfc952
128-
__ https://tools.ietf.org/html/rfc1123
129128
__ {{DOC_SERVER_URL}}/Content/Network/Concepts/dns.htm
130129
131130
@@ -140,22 +139,21 @@ def dns_label(self, dns_label):
140139
Sets the dns_label of this CreateVcnDetails.
141140
A DNS label for the VCN, used in conjunction with the VNIC's hostname and
142141
subnet's DNS label to form a fully qualified domain name (FQDN) for each VNIC
143-
within this subnet (e.g., `bminstance-1.subnet-123.vcn-1.oraclevcn.com`).
142+
within this subnet (e.g., `bminstance-1.subnet123.vcn1.oraclevcn.com`).
144143
Not required to be unique, but it's a best practice to set unique DNS labels
145-
for VCNs in your tenancy. Must comply with
146-
`RFC 952`__ and
147-
`RFC 1123`__. The value cannot be changed.
144+
for VCNs in your tenancy.
145+
Must be an alphanumeric string that begins with a letter.
146+
The value cannot be changed.
148147
149148
You must set this value if you want instances to be able to use hostnames to
150-
resolve other instances in the VCN. Otherwise the VCN Resolver will not work.
149+
resolve other instances in the VCN. Otherwise the Internet and VCN Resolver
150+
will not work.
151151
152152
For more information, see
153153
`DNS in Your Virtual Cloud Network`__.
154154
155-
Example: `vcn-1`
155+
Example: `vcn1`
156156
157-
__ https://tools.ietf.org/html/rfc952
158-
__ https://tools.ietf.org/html/rfc1123
159157
__ {{DOC_SERVER_URL}}/Content/Network/Concepts/dns.htm
160158
161159

oraclebmc/core/models/dhcp_dns_option.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,13 @@ def server_type(self):
6161
- **VcnLocalPlusInternet:** Also referred to as \"Internet and VCN Resolver\".
6262
Instances can resolve internet hostnames (no Internet Gateway is required),
6363
and can resolve hostnames of instances in the VCN. This is the default
64-
value in the default set of DHCP options in the VCN. For the VCN Resolver to
65-
work across the VCN, there must also be a DNS label set for the VCN, a DNS
66-
label set for each subnet, and a hostname for each instance. For more information,
67-
see `DNS in Your Virtual Cloud Network`__.
64+
value in the default set of DHCP options in the VCN. For the Internet and
65+
VCN Resolver to work across the VCN, there must also be a DNS label set for
66+
the VCN, a DNS label set for each subnet, and a hostname for each instance.
67+
The Internet and VCN Resolver also enables reverse DNS lookup, which lets
68+
you determine the hostname corresponding to the private IP address. For more
69+
information, see
70+
`DNS in Your Virtual Cloud Network`__.
6871
6972
- **CustomDnsServer:** Instances use a DNS server of your choice (three maximum).
7073
@@ -85,10 +88,13 @@ def server_type(self, server_type):
8588
- **VcnLocalPlusInternet:** Also referred to as \"Internet and VCN Resolver\".
8689
Instances can resolve internet hostnames (no Internet Gateway is required),
8790
and can resolve hostnames of instances in the VCN. This is the default
88-
value in the default set of DHCP options in the VCN. For the VCN Resolver to
89-
work across the VCN, there must also be a DNS label set for the VCN, a DNS
90-
label set for each subnet, and a hostname for each instance. For more information,
91-
see `DNS in Your Virtual Cloud Network`__.
91+
value in the default set of DHCP options in the VCN. For the Internet and
92+
VCN Resolver to work across the VCN, there must also be a DNS label set for
93+
the VCN, a DNS label set for each subnet, and a hostname for each instance.
94+
The Internet and VCN Resolver also enables reverse DNS lookup, which lets
95+
you determine the hostname corresponding to the private IP address. For more
96+
information, see
97+
`DNS in Your Virtual Cloud Network`__.
9298
9399
- **CustomDnsServer:** Instances use a DNS server of your choice (three maximum).
94100

oraclebmc/core/models/dhcp_option.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,19 @@ def get_subtype(object_dictionary):
2929

3030
if type == 'DomainNameServer':
3131
return 'DhcpDnsOption'
32+
33+
if type == 'SearchDomain':
34+
return 'DhcpSearchDomainOption'
3235
else:
3336
return 'DhcpOption'
3437

3538
@property
3639
def type(self):
3740
"""
3841
Gets the type of this DhcpOption.
39-
The specific DHCP option. `DomainNameServer`
40-
(for :class:`DhcpDnsOption`).
42+
The specific DHCP option. Either `DomainNameServer`
43+
(for :class:`DhcpDnsOption`) or
44+
`SearchDomain` (for :class:`DhcpSearchDomainOption`).
4145
4246
4347
:return: The type of this DhcpOption.
@@ -49,8 +53,9 @@ def type(self):
4953
def type(self, type):
5054
"""
5155
Sets the type of this DhcpOption.
52-
The specific DHCP option. `DomainNameServer`
53-
(for :class:`DhcpDnsOption`).
56+
The specific DHCP option. Either `DomainNameServer`
57+
(for :class:`DhcpDnsOption`) or
58+
`SearchDomain` (for :class:`DhcpSearchDomainOption`).
5459
5560
5661
:param type: The type of this DhcpOption.
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# coding: utf-8
2+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
3+
4+
from .dhcp_option import DhcpOption
5+
from ...util import formatted_flat_dict
6+
7+
8+
class DhcpSearchDomainOption(DhcpOption):
9+
10+
def __init__(self):
11+
12+
self.swagger_types = {
13+
'type': 'str',
14+
'search_domain_names': 'list[str]'
15+
}
16+
17+
self.attribute_map = {
18+
'type': 'type',
19+
'search_domain_names': 'searchDomainNames'
20+
}
21+
22+
self._type = None
23+
self._search_domain_names = None
24+
self._type = 'SearchDomain'
25+
26+
@property
27+
def search_domain_names(self):
28+
"""
29+
Gets the search_domain_names of this DhcpSearchDomainOption.
30+
A single search domain name according to `RFC 952`__
31+
and `RFC 1123`__. During a DNS query,
32+
the OS will append this search domain name to the value being queried, but only if
33+
that value is not a fully qualified domain name (FQDN).
34+
35+
If you set :class:`DhcpDnsOption` to `VcnLocalPlusInternet`,
36+
and you assign a DNS label to the VCN during creation, the search domain name in the
37+
VCN's default set of DHCP options is automatically set to the VCN domain
38+
(e.g., `vcn1.oraclevcn.com`).
39+
40+
If you don't want to use a search domain name, omit this option from the
41+
set of DHCP options. Do not include this option with an empty list
42+
of search domain names, or with an empty string as the value for any search
43+
domain name.
44+
45+
__ https://tools.ietf.org/html/rfc952
46+
__ https://tools.ietf.org/html/rfc1123
47+
48+
49+
:return: The search_domain_names of this DhcpSearchDomainOption.
50+
:rtype: list[str]
51+
"""
52+
return self._search_domain_names
53+
54+
@search_domain_names.setter
55+
def search_domain_names(self, search_domain_names):
56+
"""
57+
Sets the search_domain_names of this DhcpSearchDomainOption.
58+
A single search domain name according to `RFC 952`__
59+
and `RFC 1123`__. During a DNS query,
60+
the OS will append this search domain name to the value being queried, but only if
61+
that value is not a fully qualified domain name (FQDN).
62+
63+
If you set :class:`DhcpDnsOption` to `VcnLocalPlusInternet`,
64+
and you assign a DNS label to the VCN during creation, the search domain name in the
65+
VCN's default set of DHCP options is automatically set to the VCN domain
66+
(e.g., `vcn1.oraclevcn.com`).
67+
68+
If you don't want to use a search domain name, omit this option from the
69+
set of DHCP options. Do not include this option with an empty list
70+
of search domain names, or with an empty string as the value for any search
71+
domain name.
72+
73+
__ https://tools.ietf.org/html/rfc952
74+
__ https://tools.ietf.org/html/rfc1123
75+
76+
77+
:param search_domain_names: The search_domain_names of this DhcpSearchDomainOption.
78+
:type: list[str]
79+
"""
80+
self._search_domain_names = search_domain_names
81+
82+
def __repr__(self):
83+
return formatted_flat_dict(self)
84+
85+
def __eq__(self, other):
86+
if other is None:
87+
return False
88+
89+
return self.__dict__ == other.__dict__
90+
91+
def __ne__(self, other):
92+
return not self == other

oraclebmc/core/models/instance.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,11 @@ def ipxe_script(self):
200200
following iSCSI IP address: 169.254.0.2, and boot volume IQN:
201201
iqn.2015-02.oracle.boot.
202202
203+
For more information about the Bring Your Own Image feature of
204+
Oracle Bare Metal Cloud Services, see [Bring Your Own Custom
205+
Image: RHEL 7.x & Derivatives (CentOS, Oracle Linux)]
206+
(/Content/General/Reference/aqswhitepapers.htm).
207+
203208
For more information about iPXE, see http://ipxe.org.
204209
205210
@@ -229,6 +234,11 @@ def ipxe_script(self, ipxe_script):
229234
following iSCSI IP address: 169.254.0.2, and boot volume IQN:
230235
iqn.2015-02.oracle.boot.
231236
237+
For more information about the Bring Your Own Image feature of
238+
Oracle Bare Metal Cloud Services, see [Bring Your Own Custom
239+
Image: RHEL 7.x & Derivatives (CentOS, Oracle Linux)]
240+
(/Content/General/Reference/aqswhitepapers.htm).
241+
232242
For more information about iPXE, see http://ipxe.org.
233243
234244

0 commit comments

Comments
 (0)