Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
91c38f3
Support security group (#101)
ysssasaki Mar 17, 2022
1cd42e9
delete setup.cfg author-email (#108)
shimisho May 9, 2022
ca0fd2b
Delete author-email (#109)
shimisho May 10, 2022
d9fbb5d
:sparkles: IF-5247 Remove MSS v1 (#110)
sugimo-s Jun 8, 2022
6f111e9
:sparkles: IF-7320 add smb_propaerties to storage (#120) (#123)
KashiwabaraY Oct 5, 2022
dccbc05
:sparkles: Implement volume retype support IF-14543 (#174) (#177)
akaishizawa-n Jun 10, 2025
2435107
Dev/volume retype (#180)
akaishizawa-n Jun 26, 2025
3beb048
:sparkles: Add vna allocation IF-14793 (#178) (#181)
KashiwabaraY Jul 4, 2025
f03fb1b
:bug: Fix added japanese translation for volume list status IF-15753 …
akaishizawa-n Jul 25, 2025
2921d2d
:sparkles: IF-15429 Support vThunder ADC (#195) (#196)
MikuInoueTx Oct 22, 2025
74216a7
✨ Support Block storage Gen2 IF-16696 (#198)
t-yokoix Nov 4, 2025
f4c06e6
🐛 Fix Process to check param for Block storage Gen2 IF-16696 (#199)
t-yokoix Nov 12, 2025
a9896c8
Dev/lbs vthunder (#204)
sugimo-s Jan 13, 2026
98eabae
:bug: Fixed to display the error message of API response IF-17111 (#205)
sugimo-s Jan 14, 2026
de06aa5
:sparkles: IF-17146 Support Update BMC Password (#209) (#210)
MikuInoueTx Feb 25, 2026
e91d2fb
✨Support Baremetal New RCA IF-16036 (#218)
t-yokoix Mar 12, 2026
1608568
:sparkles:Support mVNA Day5 IF-17231 (#220) (#222)
MikuInoueTx Mar 30, 2026
58f6e77
Revert "Revert ":sparkles: Closing MSS v2 IF-16030 (#200)" (#211)" (#…
sugimo-s Apr 2, 2026
730da61
:bookmark: IF-18437 Version Up
sugimo-s Aug 14, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions ecl/baremetal/v2/_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,54 @@ def reset_bmc(self, server_id, type):
server = _server.ServerAction()
return server.reset_bmc(self.session, server_id, type)

def get_remote_console_access(self, server_id):
"""This API provides the necessary information to access the Bare Metal Server's
Baseboard Management Controller (BMC).
Specifically, it provides the destination URL and the access_code
required for access.
By appending /remote-console-token-exchange to the issued
URL, and sending a POST request with the access_code
specified in the request body in JSON format ({ "access_code": "" }), the access_token
will be returned in the Set-Cookie field of the response header.
You can then access the Bare Metal Server's BMC by accessing the issuedURL
with this access_token specified in the Cookie.
Please note that the validity period for the access_code is 1 minute, and the validity
period for the access_token is 1 hour. Once the access_token is retrieved
from an access_code, that access_code becomes invalid.

:param string server_id: ID for the server.
:return: :class:`~ecl.baremetal.v2.server.ServerAction`
"""
server = _server.ServerAction()
return server.get_remote_console_access(self.session, server_id)

def disconnect_remote_console_access(self, server_id):
"""This API immediately revokes the access_token that was
issued by the aforementioned Get Remote Console Access
API, effectively expiring it prematurely.
Once the access_token is revoked, access to the BMC
using that access_token will no longer be possible, and
it will also become impossible to retrieve a access_token
using the access_code.

:param string server_id: ID for the server.
:return: ``None``
"""
server = _server.ServerAction()
return server.disconnect_remote_console_access(self.session, server_id)

def update_bmc_password(self, server_id, password):
"""Update the password for the Baseboard Management Controller
of the Baremetal Server associated with server_id.
This request will be accepted only when the task_state is None.

:param string server_id: ID for the server.
:param string password: New password for BMC.
:return: ``None``
"""
server = _server.ServerAction()
return server.update_bmc_password(self.session, server_id, password)

def metadata(self, server_id):
"""This API lists metadata for a specified server.

Expand Down
47 changes: 47 additions & 0 deletions ecl/baremetal/v2/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ class ServerAction(resource2.Resource):
user_id = resource2.Body('user_id')
#: Password for sign in to the remote console.
password = resource2.Body('password')
#: Security token to get access_token.
access_code = resource2.Body('access_code')
#: Date and time when the access_code expires.
expired_at = resource2.Body('expired_at')

def start(self, session, server_id):
uri = self.base_path % server_id
Expand Down Expand Up @@ -269,6 +273,49 @@ def reset_bmc(self, session, server_id, type):
self._translate_response(resp, has_body=False)
return self

def get_remote_console_access(self, session, server_id):
self.resource_key = "remote_console"
uri = self.base_path % server_id
body = {
"get-remote-console-url": None
}
resp = session.post(
uri,
endpoint_filter=self.service,
json=body,
headers={"Accept": "application/json"}
)
self._translate_response(resp, has_body=True)
return self

def disconnect_remote_console_access(self, session, server_id):
uri = self.base_path % server_id
body = {
"disconnect-remote-console": None
}
resp = session.post(
uri,
endpoint_filter=self.service,
json=body
)
self._translate_response(resp, has_body=False)
return self

def update_bmc_password(self, session, server_id, password):
uri = self.base_path % server_id
body = {
"update-bmc-password": {
"password": password
}
}
resp = session.post(
uri,
endpoint_filter=self.service,
json=body
)
self._translate_response(resp, has_body=False)
return self

@classmethod
def find(cls, session, name_or_id, ignore_missing=False, **params):
"""Find a resource by its name or id.
Expand Down
12 changes: 12 additions & 0 deletions ecl/block_store/v2/_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,18 @@ def update_bootable(self, volume, bootable=False):
volume = self._get_resource(_volume.Volume, volume)
return volume.update_bootable(self.session, bootable)

def retype_volume(self, volume, volume_type, is_dry_run=False):
"""Retype an volume

:param volume:The value can be either the ID of an volume or a
:class:`~ecl.compute.v2.volume.Volume` instance.
:param volume_type: volume type of volume to retype.
:param bool is_dry_run:When set to "True" will enable dry run mode.
:returns: <Response 202>
"""
volume = self._get_resource(_volume.Volume, volume)
return volume.retype(self.session, volume_type, is_dry_run)

def availability_zones(self):
"""Return a list of availability zones

Expand Down
12 changes: 12 additions & 0 deletions ecl/block_store/v2/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,18 @@ def update_bootable(self, session, bootable=False):
}}
return self._action(session, body)

def retype(self, session, volume_type, is_dry_run=False):
""" Volume type change and dry run configuration process. """
body = {
'os-retype': {
'new_type': volume_type,
'migration_policy': 'on-demand'
}
}
if is_dry_run:
body['os-retype']['dry_run'] = True
self._action(session, body)


class VolumeDetail(Volume):

Expand Down
5 changes: 3 additions & 2 deletions ecl/compute/v2/_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,16 +227,17 @@ def stop_server(self, server):
virtual_server = self.get_server(server)
return virtual_server.stop(self.session)

def resize_server(self, server, flavor_id):
def resize_server(self, server, flavor_id, is_dry_run=False):
"""Resize the server to flavor reference

:param server: Either the ID of a server or a
:class:`~ecl.compute.v2.server.Server` instance.
:param string flavor_id: ID of flavor to resize
:param bool is_dry_run:When set to "True" will enable dry run mode.
:return: <Response 202>
"""
virtual_server = self.get_server(server)
return virtual_server.resize(self.session, flavor_id)
return virtual_server.resize(self.session, flavor_id, is_dry_run)

def get_server_metadata(self, server):
"""Return a dictionary of metadata for a server
Expand Down
7 changes: 4 additions & 3 deletions ecl/compute/v2/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,15 @@ def stop(self, session):
body = {"os-stop": None}
return self._action(session, body)

def resize(self, session, flavor):
def resize(self, session, flavor, is_dry_run=False):
"""Resize server to flavor reference."""
body = {
'resize': {
'flavorRef': flavor,
'OS-DCF:diskConfig': 'AUTO'
'flavorRef': flavor
}
}
if is_dry_run:
body['resize']['dryRun'] = True
self._action(session, body)

def change_password(self, session, new_password):
Expand Down
1 change: 0 additions & 1 deletion ecl/compute/v2/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from ecl.compute import compute_service
from ecl import resource2


class Volume(resource2.Resource):
resource_key = 'volume'
resources_key = 'volumes'
Expand Down
3 changes: 3 additions & 0 deletions ecl/mvna/v1/system_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class SystemUpdate(resource2.Resource):
"current_revision",
"next_revision",
"applicable",
"is_rollback_allowed",
"latest"
)

Expand Down Expand Up @@ -48,3 +49,5 @@ class SystemUpdate(resource2.Resource):
next_revision = resource2.Body('next_revision')
#: Applicable of system update
applicable = resource2.Body('applicable')
#: Whether the system update can be rolled back
is_rollback_allowed = resource2.Body('is_rollback_allowed')
Loading