eni_model.py 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # -*- coding: utf-8 -*-
  2. # Copyright (c) 2023 Baidu.com, Inc. All Rights Reserved
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. # use this file except in compliance with the License. You may obtain a copy
  6. # of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. # License for the specific language governing permissions
  14. # and limitations under the License.
  15. """
  16. This module provide eni settings information.
  17. """
  18. class EniIPSet(object):
  19. """ENI IP Set"""
  20. def __init__(self, public_ip=None, private_ip=None, primary=None):
  21. """
  22. :param public_ip: public IP
  23. :type public_ip: string
  24. :param private_ip: private IP
  25. :type private_ip: string
  26. :param primary: The parameter to specify whether is primary IP
  27. :type primary: bool
  28. """
  29. self.public_ip = public_ip
  30. self.private_ip = private_ip
  31. self.primary = primary