Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
Changelog
=========
--------------------
3.25.2 (2025-10-28)
--------------------
- Added remote execution support for `eb migrate explore` command
- Fixed `namedtuple` import for Python 3.9+ compatibility
- Fixed AttributeError when selecting platform branch interactively in `eb migrate`

--------------------
3.25.1 (2025-09-30)
--------------------
Expand Down
2 changes: 1 addition & 1 deletion ebcli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
# ANY KIND, either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
__version__ = '3.25.1'
__version__ = '3.25.2'
43 changes: 34 additions & 9 deletions ebcli/controllers/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import zipfile
from typing import Dict, List, Any, Union, Optional, Tuple, Set
import collections
from collections import namedtuple
import json
import argparse
from fabric import Connection
Expand Down Expand Up @@ -67,14 +68,14 @@ def is_supported() -> bool:
from ebcli.core import io, fileoperations
from ebcli.lib import utils, ec2, elasticbeanstalk, aws
from ebcli.objects import requests
from ebcli.objects.platform import PlatformVersion
from ebcli.objects.platform import PlatformVersion, PlatformBranch
from ebcli.objects.exceptions import (
NotFoundError,
NotAnEC2Instance,
NotSupportedError,
)
from ebcli.resources.strings import prompts, flag_text
from ebcli.operations import commonops, createops, platformops, statusops
from ebcli.operations import commonops, createops, platformops, statusops, platform_version_ops
from ebcli.operations.tagops import tagops
from ebcli.resources.statics import namespaces

Expand All @@ -87,16 +88,37 @@ class Meta:
usage = "eb migrate explore"
stacked_on = "migrate"
stacked_type = "nested"
arguments = [
(["--remote"], dict(action="store_true", help="Enable remote execution mode")),
(["--target-ip"], dict(help="IP address of the remote machine")),
(["--username"], dict(help="Username for authentication")),
(["--password"], dict(help="Password for authentication")),
]

def do_command(self):
if not is_supported():
raise NotSupportedError("'eb migrate explore' is only supported on Windows with IIS installed")
verbose = self.app.pargs.verbose

if verbose:
list_sites_verbosely()
remote = self.app.pargs.remote

if remote:
target_ip = self.app.pargs.target_ip
username = self.app.pargs.username
password = self.app.pargs.password

if not target_ip or not username or not password:
raise ValueError("--target-ip, --username, and --password are required with --remote")

remote_connection = initialize_ssh_connection(target_ip, username, password)
validate_iis_and_powershell_remote(remote_connection)
site_names = establish_candidate_sites_remote(remote_connection, None)
io.echo("\n".join(site_names))
else:
io.echo("\n".join([s.Name for s in ServerManager().Sites]))
if not is_supported():
raise NotSupportedError("'eb migrate explore' is only supported on Windows with IIS installed")
verbose = self.app.pargs.verbose

if verbose:
list_sites_verbosely()
else:
io.echo("\n".join([s.Name for s in ServerManager().Sites]))


class MigrateCleanupController(AbstractBaseController):
Expand Down Expand Up @@ -866,6 +888,9 @@ def process_keyname(keyname):
def establish_platform(platform, interactive):
if not platform and interactive:
platform = platformops.prompt_for_platform()
# If prompt returns a PlatformBranch, convert it to PlatformVersion
if isinstance(platform, PlatformBranch):
platform = platform_version_ops.get_preferred_platform_version_for_branch(platform.branch_name)
elif not platform:
io.echo("Determining EB platform based on host machine properties")
platform = _determine_platform(platform_string=get_windows_server_version())
Expand Down
Loading