diff --git a/.gitignore b/.gitignore index cad5c2103..267e4101b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ *.swo *.swp *~ +otcextensions-*/ .coverage .idea .stestr/ diff --git a/otcextensions/osclient/rds/v3/instance.py b/otcextensions/osclient/rds/v3/instance.py index b03f0f863..5b1fc6e40 100644 --- a/otcextensions/osclient/rds/v3/instance.py +++ b/otcextensions/osclient/rds/v3/instance.py @@ -179,14 +179,15 @@ def get_parser(self, prog_name): help=_("Name of the instance.") ) parser.add_argument( - 'flavor_ref', - metavar='', + 'flavor', + metavar='', help=_("Flavor spec_code") ) disk_group = parser.add_argument_group('Disk data') disk_group.add_argument( '--size', metavar='', + dest='volume_size', type=int, required=True, help=_("Size of the instance disk volume in GB. ") @@ -196,6 +197,7 @@ def get_parser(self, prog_name): metavar='{' + ','.join(DISK_TYPE_CHOICES) + '}', type=lambda s: s.upper(), required=True, + dest='volume_type', choices=[s.upper() for s in DISK_TYPE_CHOICES], help=_("Volume type. (COMMON, ULTRAHIGH).") ) @@ -224,7 +226,7 @@ def get_parser(self, prog_name): ) parser.add_argument( '--configuration', - dest='configuration_id', + dest='configuration', metavar='', default=None, help=_("ID of the configuration group to attach to the instance.") @@ -253,16 +255,18 @@ def get_parser(self, prog_name): new_instance_group.add_argument( '--router-id', metavar='', + dest='router', help=_('ID of a Router the DB should be connected to') ) new_instance_group.add_argument( '--network-id', metavar='', + dest='network', help=_('ID of a Neutron network the DB should be connected to.') ) new_instance_group.add_argument( '--security-group-id', - dest='security_group_id', + dest='security_group', metavar='', help=_('Security group ID') ) @@ -301,6 +305,17 @@ def get_parser(self, prog_name): metavar='', help=_('Backup ID or Name to create new instance from.') ) + create_from_group.add_argument( + '--backup-keepdays', + metavar='', + help=_('Specifies the retention days for specific backup files.') + ) + create_from_group.add_argument( + '--backup-timeframe', + metavar='', + help=_('Specifies the backup time window. Automated backups will ' + 'be triggered during the backup time window.') + ) create_from_group.add_argument( '--restore-time', metavar='