diff options
Diffstat (limited to 'examples/python/gi')
| -rwxr-xr-x | examples/python/gi/add_connection.py | 18 | ||||
| -rwxr-xr-x | examples/python/gi/deactivate-all.py | 18 | ||||
| -rwxr-xr-x | examples/python/gi/device-state-ip4config.py | 16 | ||||
| -rwxr-xr-x | examples/python/gi/firewall-zone.py | 17 | ||||
| -rwxr-xr-x | examples/python/gi/get-active-connections.py | 15 | ||||
| -rwxr-xr-x | examples/python/gi/get_ips.py | 18 | ||||
| -rwxr-xr-x | examples/python/gi/list-connections.py | 18 | ||||
| -rwxr-xr-x | examples/python/gi/nm-add-connection2.py | 26 | ||||
| -rwxr-xr-x | examples/python/gi/nm-connection-update-stable-id.py | 17 | ||||
| -rwxr-xr-x | examples/python/gi/nm-update2.py | 26 | ||||
| -rwxr-xr-x | examples/python/gi/nm-wg-set | 16 | ||||
| -rwxr-xr-x | examples/python/gi/setting-user-data.py | 17 | ||||
| -rwxr-xr-x | examples/python/gi/show-wifi-networks.py | 15 | ||||
| -rwxr-xr-x | examples/python/gi/update-ip4-method.py | 17 |
14 files changed, 39 insertions, 215 deletions
diff --git a/examples/python/gi/add_connection.py b/examples/python/gi/add_connection.py index 3b0abef1..9cf9e348 100755 --- a/examples/python/gi/add_connection.py +++ b/examples/python/gi/add_connection.py @@ -1,21 +1,7 @@ #!/usr/bin/env python - -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# SPDX-License-Identifier: GPL-2.0+ # -# Copyright 2014 Red Hat, Inc. +# Copyright (C) 2014 Red Hat, Inc. # # diff --git a/examples/python/gi/deactivate-all.py b/examples/python/gi/deactivate-all.py index 7a9b2ce1..3af350e4 100755 --- a/examples/python/gi/deactivate-all.py +++ b/examples/python/gi/deactivate-all.py @@ -1,21 +1,7 @@ #!/usr/bin/env python - -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# SPDX-License-Identifier: GPL-2.0+ # -# Copyright 2015 Red Hat, Inc. +# Copyright (C) 2015 Red Hat, Inc. # # diff --git a/examples/python/gi/device-state-ip4config.py b/examples/python/gi/device-state-ip4config.py index 70ab8871..18848d07 100755 --- a/examples/python/gi/device-state-ip4config.py +++ b/examples/python/gi/device-state-ip4config.py @@ -1,19 +1,5 @@ #!/usr/bin/env python -# -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# SPDX-License-Identifier: GPL-2.0+ # # Copyright (C) 2012 Red Hat, Inc. # diff --git a/examples/python/gi/firewall-zone.py b/examples/python/gi/firewall-zone.py index 6be18dd9..6cbd8c25 100755 --- a/examples/python/gi/firewall-zone.py +++ b/examples/python/gi/firewall-zone.py @@ -1,20 +1,7 @@ #!/usr/bin/env python +# SPDX-License-Identifier: GPL-2.0+ # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright 2013 - 2014 Red Hat, Inc. +# Copyright (C) 2013 - 2014 Red Hat, Inc. # import sys diff --git a/examples/python/gi/get-active-connections.py b/examples/python/gi/get-active-connections.py index d7d35663..072f245a 100755 --- a/examples/python/gi/get-active-connections.py +++ b/examples/python/gi/get-active-connections.py @@ -1,18 +1,5 @@ #!/usr/bin/env python -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# SPDX-License-Identifier: GPL-2.0+ # # Copyright (C) 2014 Red Hat, Inc. # diff --git a/examples/python/gi/get_ips.py b/examples/python/gi/get_ips.py index 48bbac6d..13b0a8b6 100755 --- a/examples/python/gi/get_ips.py +++ b/examples/python/gi/get_ips.py @@ -1,21 +1,7 @@ #!/usr/bin/env python +# SPDX-License-Identifier: GPL-2.0+ # -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright 2014 Red Hat, Inc. +# Copyright (C) 2014 Red Hat, Inc. # import sys, socket diff --git a/examples/python/gi/list-connections.py b/examples/python/gi/list-connections.py index 4cd15feb..7278fafd 100755 --- a/examples/python/gi/list-connections.py +++ b/examples/python/gi/list-connections.py @@ -1,21 +1,7 @@ #!/usr/bin/env python - -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# SPDX-License-Identifier: GPL-2.0+ # -# Copyright 2012 - 2014 Red Hat, Inc. +# Copyright (C) 2012 - 2014 Red Hat, Inc. # import gi diff --git a/examples/python/gi/nm-add-connection2.py b/examples/python/gi/nm-add-connection2.py index b78016db..01c1ae7b 100755 --- a/examples/python/gi/nm-add-connection2.py +++ b/examples/python/gi/nm-add-connection2.py @@ -1,20 +1,7 @@ #!/usr/bin/env python +# SPDX-License-Identifier: GPL-2.0+ # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright 2019 Red Hat, Inc. +# Copyright (C) 2019 Red Hat, Inc. # import sys @@ -40,8 +27,13 @@ def con_to_str(con): return '"%s" (%s)' % (s_con.get_id(), s_con.get_uuid()) def usage(): - print('Usage: %s --clone [[id] <id>]' % (sys.argv[0])) - print(' %s --clone [[uuid] <uuid>]' % (sys.argv[0])) + arg0 = sys.argv[0] + arg0_spaced = ' ' * len(arg0) + print('Usage: %s [ --clone ( [id] <id> | [uuid] <uuid> ) ] \\' % (arg0)) + print(' %s [ --to-disk | --in-memory ] \\' % (arg0_spaced)) + print(' %s [ --block-autoconnect ] \\' % (arg0_spaced)) + print(' %s [ --id <new-id> ] \\' % (arg0_spaced)) + print(' %s [ --uuid <new-uuid> ] \\' % (arg0_spaced)) return 1 def die(msg, print_usage=False): diff --git a/examples/python/gi/nm-connection-update-stable-id.py b/examples/python/gi/nm-connection-update-stable-id.py index bd4f12b6..3629d072 100755 --- a/examples/python/gi/nm-connection-update-stable-id.py +++ b/examples/python/gi/nm-connection-update-stable-id.py @@ -1,20 +1,7 @@ #!/usr/bin/env python +# SPDX-License-Identifier: GPL-2.0+ # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright 2017 Red Hat, Inc. +# Copyright (C) 2017 Red Hat, Inc. # # diff --git a/examples/python/gi/nm-update2.py b/examples/python/gi/nm-update2.py index 36449fd8..5a658793 100755 --- a/examples/python/gi/nm-update2.py +++ b/examples/python/gi/nm-update2.py @@ -1,20 +1,7 @@ #!/usr/bin/env python +# SPDX-License-Identifier: GPL-2.0+ # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright 2019 Red Hat, Inc. +# Copyright (C) 2019 Red Hat, Inc. # import sys @@ -40,8 +27,13 @@ def con_to_str(con): return '"%s" (%s)' % (s_con.get_id(), s_con.get_uuid()) def usage(): - print('Usage: %s [[id] <id>]' % (sys.argv[0])) - print(' %s [[uuid] <uuid>]' % (sys.argv[0])) + arg0 = sys.argv[0] + arg0_spaced = ' ' * len(arg0) + print('Usage: %s [ [id] <id> | [uuid] <uuid> ] \\' % (arg0)) + print(' %s [ --to-disk | --in-memory | --in-memory-detached | --in-memory-only ] \\' % (arg0_spaced)) + print(' %s [ --block-autoconnect ] \\' % (arg0_spaced)) + print(' %s [ --volatile ] \\' % (arg0_spaced)) + print(' %s [ --no-reapply ] \\' % (arg0_spaced)) return 1 def die(msg, print_usage=False): diff --git a/examples/python/gi/nm-wg-set b/examples/python/gi/nm-wg-set index 5f284c2c..ca31ac72 100755 --- a/examples/python/gi/nm-wg-set +++ b/examples/python/gi/nm-wg-set @@ -1,20 +1,8 @@ #!/usr/bin/env python +# SPDX-License-Identifier: GPL-2.0+ # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. +# Copyright (C) 2018 - 2019 Red Hat, Inc. # -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright 2018 - 2019 Red Hat, Inc. # nm-wg-set: modify an existing WireGuard connection profile. # diff --git a/examples/python/gi/setting-user-data.py b/examples/python/gi/setting-user-data.py index d5e00105..fd86445b 100755 --- a/examples/python/gi/setting-user-data.py +++ b/examples/python/gi/setting-user-data.py @@ -1,21 +1,8 @@ #!/usr/bin/env python - -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# SPDX-License-Identifier: GPL-2.0+ # -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# Copyright (C) 2017 Red Hat, Inc. # -# Copyright 2017 Red Hat, Inc. # # set and show user-data for a connection: diff --git a/examples/python/gi/show-wifi-networks.py b/examples/python/gi/show-wifi-networks.py index 6eb6ac91..e1ee4c3d 100755 --- a/examples/python/gi/show-wifi-networks.py +++ b/examples/python/gi/show-wifi-networks.py @@ -1,19 +1,6 @@ #!/usr/bin/env python # coding=utf-8 -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# SPDX-License-Identifier: GPL-2.0+ # # Copyright (C) 2013 Red Hat, Inc. # diff --git a/examples/python/gi/update-ip4-method.py b/examples/python/gi/update-ip4-method.py index e4c603fb..9bba6199 100755 --- a/examples/python/gi/update-ip4-method.py +++ b/examples/python/gi/update-ip4-method.py @@ -1,20 +1,7 @@ #!/usr/bin/env python +# SPDX-License-Identifier: GPL-2.0+ # -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# Copyright 2014 Red Hat, Inc. +# Copyright (C) 2014 Red Hat, Inc. # # |