Skip to content

Validation of Server is incorrect #5033

Description

@3dquattro

Description

There is incorrect validation for server details when it is requested on early stage - when it is starting, when cloud returns it without properly configured networks.

Steps to reproduce

  1. Run server on eu01 region (looks like it is heavy loaded now)
  2. Request server details like this when it is being created:
server = client.get_server(
                    self.project_id, self.region, server_id, details=True)

Actual behavior

Error like this:

ValidationError: resources.vm3-clone3: 2 validation errors for ServerNetwork
mac
Value error, must validate the regular expression /^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/ [type=value_error, input_value='', input_type=str]
For further information visit https://errors.pydantic.dev/2.13/v/value_error
networkName
Value error, must validate the regular expression /^[A-Za-z0-9]+([ \/._-]*[A-Za-z0-9]+)*$/ [type=value_error, input_value='', input_type=str]
For further information visit https://errors.pydantic.dev/2.13/v/value_error

Expected behavior

Validation should pass, because it is correct response from cloud API

Environment

  • OS: Ubuntu 23.04
  • Python version (see python --version): 3.11
  • Version of the Python STACKIT SDK: 1.4.0
# please run the following command to get the versions of the STACKIT Python SDK versions and add the output here in this code block

$ pip list | grep "stackit"
stackit                   0.1.7
stackit-core              0.2.0a1
stackit-iaas              1.4.0

Additional information

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions