diff --git a/overlays/default.nix b/overlays/default.nix index 752a2c8..220fd11 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -5,6 +5,7 @@ builtins.map (path: import path) [ ./ccache.nix ./eww.nix ./material-icons.nix + ./oci-cli.nix ./steam.nix ./utillinux.nix ./wpa-supplicant.nix diff --git a/overlays/oci-cli.nix b/overlays/oci-cli.nix new file mode 100644 index 0000000..78a8a23 --- /dev/null +++ b/overlays/oci-cli.nix @@ -0,0 +1,5 @@ +self: super: { + oci-cli = super.oci-cli.overrideAttrs(o: { + patches = (o.patches or []) ++ [ ./patches/oci.patch ]; + }); +} diff --git a/overlays/patches/oci.patch b/overlays/patches/oci.patch new file mode 100644 index 0000000..bdc80f7 --- /dev/null +++ b/overlays/patches/oci.patch @@ -0,0 +1,30 @@ +diff --git a/services/core/src/oci_cli_virtual_network/virtualnetwork_cli_extended.py b/services/core/src/oci_cli_virtual_network/virtualnetwork_cli_extended.py +index 44562fd9780..ae426944a47 100644 +--- a/services/core/src/oci_cli_virtual_network/virtualnetwork_cli_extended.py ++++ b/services/core/src/oci_cli_virtual_network/virtualnetwork_cli_extended.py +@@ -285,13 +285,13 @@ def unassign_private_ip(ctx, from_json, vnic_id, ip_address): + click.echo('Unassigned IP address {} from VNIC {}'.format(ip_address, vnic_id), err=True) + + +-@cli_util.copy_params_from_generated_command(virtualnetwork_cli.create_ipv6, params_to_exclude=['wait_for_state', 'max_wait_seconds', 'wait_interval_seconds']) ++@cli_util.copy_params_from_generated_command(virtualnetwork_cli.create_ipv6, params_to_exclude=['wait_for_state', 'max_wait_seconds', 'wait_interval_seconds', 'subnet_id']) + @virtualnetwork_cli.vnic_group.command(name='assign-ipv6', help=virtualnetwork_cli.create_ipv6.help) + @cli_util.option('--unassign-if-already-assigned', is_flag=True, default=False, help="""Force reassignment of the IP address if it's already assigned to another VNIC in the subnet. This is only relevant if an IP address is associated with this command.""") + @click.pass_context + @json_skeleton_utils.json_skeleton_generation_handler(input_params_to_complex_types={'defined-tags': {'module': 'core', 'class': 'dict(str, dict(str, object))'}, 'freeform-tags': {'module': 'core', 'class': 'dict(str, string)'}}, output_type={'module': 'core', 'class': 'PrivateIp'}) + @cli_util.wrap_exceptions +-def assign_ipv6(ctx, from_json, vnic_id, defined_tags, display_name, freeform_tags, ip_address, unassign_if_already_assigned, ipv6_subnet_cidr, route_table_id): ++def assign_ipv6(ctx, from_json, vnic_id, defined_tags, display_name, freeform_tags, ip_address, unassign_if_already_assigned, ipv6_subnet_cidr, route_table_id, lifetime): + networking_client = cli_util.build_client('core', 'virtual_network', ctx) + + # First we get the VNIC because we need to know the subnet OCID for the ListIpv6s call +@@ -348,6 +348,9 @@ def assign_ipv6(ctx, from_json, vnic_id, defined_tags, display_name, freeform_ta + if route_table_id is not None: + assign_ip_request_body['routeTableId'] = route_table_id + ++ if lifetime is not None: ++ assign_ip_request_body['lifetime'] = lifetime ++ + # If we are here then either the IP address does not exist or it is a candidate to be moved + if not is_ip_reassignment: + if ip_address is not None: