black formating in create-sc-instance
This commit is contained in:
parent
c3e5ff46af
commit
a00eb2a63f
1 changed files with 7 additions and 8 deletions
|
@ -77,9 +77,7 @@ def get_port( # pylint:disable=too-many-arguments,too-many-branches
|
|||
return port
|
||||
|
||||
print(f"creating port: {port_name}")
|
||||
port = conn.network.create_port(
|
||||
network_id=network.id, name=port_name
|
||||
)
|
||||
port = conn.network.create_port(network_id=network.id, name=port_name)
|
||||
if not isinstance(port, Port):
|
||||
raise TypeError(f"port should be {Port} but is {type(port)}")
|
||||
|
||||
|
@ -113,15 +111,15 @@ def create_server( # pylint: disable=too-many-arguments, too-many-locals
|
|||
f"flavor '{flavor.name}' includes no disk, using block storage for all disks"
|
||||
)
|
||||
volume_type_name = "fast"
|
||||
#volume_type = conn.volume.find_type(volume_type_name)
|
||||
#if volume_type is None:
|
||||
#raise RuntimeError(f"unable to find volume type '{volume_type_name}'")
|
||||
# volume_type = conn.volume.find_type(volume_type_name)
|
||||
# if volume_type is None:
|
||||
# raise RuntimeError(f"unable to find volume type '{volume_type_name}'")
|
||||
for i, size in enumerate(disk_sizes):
|
||||
block_mapping = {
|
||||
"delete_on_termination": True,
|
||||
"destination_type": "volume",
|
||||
"volume_size": size,
|
||||
#"volume_type": volume_type.name,
|
||||
# "volume_type": volume_type.name,
|
||||
}
|
||||
# The first disk is the OS disk, base it on the selected image and bootable
|
||||
if i == 0:
|
||||
|
@ -161,6 +159,7 @@ def create_server( # pylint: disable=too-many-arguments, too-many-locals
|
|||
|
||||
return server
|
||||
|
||||
|
||||
def main() -> (
|
||||
None
|
||||
): # pylint: disable=too-many-locals,too-many-statements,too-many-branches
|
||||
|
@ -199,7 +198,7 @@ def main() -> (
|
|||
)
|
||||
parser.add_argument(
|
||||
"--network-name",
|
||||
help="provide disk size in GB",
|
||||
help="The network name in safespring, ex 'public'",
|
||||
required=True,
|
||||
)
|
||||
parser.add_argument(
|
||||
|
|
Loading…
Add table
Reference in a new issue