File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010# License for the specific language governing permissions and limitations
1111# under the License.
1212
13+ import datetime
1314import logging
1415import json
1516
2021from esileapclient .v1 .offer import Offer as OFFER_RESOURCE
2122from esileapclient .common import utils
2223
24+ END_OF_TIME = '9999-12-31T00:00:00'
2325LOG = logging .getLogger (__name__ )
2426
2527
@@ -161,6 +163,16 @@ def get_parser(self, prog_name):
161163 "Can be specified multiple times. "
162164 f"Supported operators are: { ', ' .join (utils .OPS .keys ())} " ,
163165 metavar = '"key>=value"' )
166+ parser .add_argument (
167+ '--now' ,
168+ action = 'store_const' ,
169+ dest = 'availability_range' ,
170+ const = [
171+ datetime .datetime .now ().isoformat (timespec = 'seconds' ),
172+ END_OF_TIME
173+ ],
174+ help = 'Only list offers that have availability right now' ,
175+ )
164176
165177 return parser
166178
You can’t perform that action at this time.
0 commit comments