Skip to content

Commit bd9306a

Browse files
committed
[squashme] howto pyhon enum plz?
1 parent 82442d8 commit bd9306a

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

include/netplan.h

-3
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ netplan_netdef_get_vlan_link(const NetplanNetDefinition* netdef);
118118
NETPLAN_PUBLIC NetplanNetDefinition*
119119
netplan_netdef_get_sriov_link(const NetplanNetDefinition* netdef);
120120

121-
NETPLAN_PUBLIC char *
122-
netplan_netdef_get_keep_configuration(const NetplanNetDefinition* netdef);
123-
124121
NETPLAN_PUBLIC ssize_t
125122
netplan_netdef_get_set_name(const NetplanNetDefinition* netdef, char* out_buffer, size_t out_buffer_size);
126123

python-cffi/netplan/_build_cffi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@
112112
ssize_t _netplan_netdef_get_embedded_switch_mode(const NetplanNetDefinition* netdef, char* out_buffer, size_t out_buf_size);
113113
gboolean _netplan_netdef_get_sriov_vlan_filter(const NetplanNetDefinition* netdef);
114114
guint _netplan_netdef_get_vlan_id(const NetplanNetDefinition* netdef);
115-
char* netplan_netdef_get_keep_configuration(const NetplanNetDefinition* netdef);
115+
NetplanCriticalOption _netplan_netdef_get_critical(const NetplanNetDefinition* netdef);
116116
gboolean _netplan_netdef_is_trivial_compound_itf(const NetplanNetDefinition* netdef);
117117
int _netplan_state_get_vf_count_for_def(
118118
const NetplanState* np_state, const NetplanNetDefinition* netdef, NetplanError** error);

python-cffi/netplan/netdef.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ def set_name(self) -> str:
7575
return _string_realloc_call_no_error(lambda b: lib.netplan_netdef_get_set_name(self._ptr, b, len(b)))
7676

7777
@property
78-
def keep_configuration(self) -> str:
79-
return _string_realloc_call_no_error(lambda b: lib.netplan_netdef_get_keep_configuration(self._ptr, b, len(b)))
78+
def critical(self) -> bool:
79+
return bool(lib._netplan_netdef_get_critical(self._ptr))
8080

8181
@property
8282
def links(self) -> dict:

0 commit comments

Comments
 (0)